Next | Prev | Up | Top | Contents | Index

Example 1: A Simple Logical Volume

This example shows a simple logical volume composed of a data subvolume created from two entire option disks. The disks are on controller 0, drive addresses 2 and 3. An XFS filesystem is created and mounted at /vol1.

  1. Unmount the disks that will be used in the volume if they are mounted. For example:
# df
Filesystem                 Type  blocks     use   avail %use  Mounted on
/dev/root                   efs 1939714  430115 1509599  22%  /
/dev/dsk/dks0d2s7           efs 2004550      22 2004528   0%  /d2
/dev/dsk/dks0d3s7           efs 3826812      22 3826790   0%  /d3
# umount /d2
# umount /d3

  1. Start xlv_make:

    # xlv_make

    xlv_make>

  2. Start creating the volume by specifying its name, for example xlv0:

    xlv_make> vol xlv0

    xlv0

  3. Begin creating the data subvolume:

    xlv_make> data

    xlv0.data

    xlv_make echoes the name of each object (volume, subvolume, plex, or volume element) you create.

  4. Continue to move down through the hierarchy of the volume by specifying the plex:

    xlv_make> plex

    xlv0.data.0

  5. Specify the volume elements (disk partitions) to be included in the volume, for example /dev/dsk/dks0d2s7 and /dev/dsk/dks0d3s7:

    xlv_make> ve dks0d2s7

    xlv0.data.0.0

    xlv_make> ve dks0d3s7

    xlv0.data.0.1

    You can specify the last portion of the disk partition pathname (as shown) or the full pathname. xlv_make accepts disk partitions that are of types "xlv," "xfs," and "efs." You can use other partition types, for example "lvol," by giving the -force option, for example, ve -force dks0d2s7. xlv_make automatically changes the partition type to "xlv."

  1. Tell xlv_make that you are finished specifying the objects:

    xlv_make> end

    Object specification completed

  2. Review the objects that you've specified:

    xlv_make> show

    Completed Objects

    (1) VOL xlv0

    VE xlv0.data.0.0 [empty]

    start=0, end=2004549, (cat)grp_size=1

    /dev/dsk/dks0d2s7 (2004550 blks)

    VE xlv0.data.0.1 [empty]

    start=2004550, end=5831361, (cat)grp_size=1

    /dev/dsk/dks0d3s7 (3826812 blks)

  3. Write the volume information to the logical volume labels by exiting xlv_make:

    xlv_make> exit

    Newly created objects will be written to disk.

    Is this what you want?(yes) yes

    Invoking xlv_assemble

  4. Make an XFS filesystem using mkfs, for example:
# mkfs /dev/dsk/xlv/xlv0
meta-data=/dev/dsk/xlv/xlv0      isize=256    agcount=8, agsize=16094 blks
data     =                       bsize=4096   blocks=2482901
log      =internal log           bsize=4096   blocks=1000
realtime =none                   bsize=4096   blocks=0, rtextents=0

need correct command line

  1. Mount the filesystem, for example:

    # mkdir /vol1

    # mount /dev/dsk/xlv/xlv0 /vol1

  2. To have the logical volume mounted automatically at system startup, add an entry for the volume to /etc/fstab, for example:

    /dev/dsk/xlv/xlv0 /vol1 xfs rw,raw=/dev/rdsk/xlv/xlv0 0 0


Next | Prev | Up | Top | Contents | Index