Next | Prev | Up | Top | Contents | Index

Example 3: A Plexed Logical Volume for an XFS Filesystem With an External Log

The following example shows how you can create an XLV logical volume that has a log subvolume that is plexed and a data subvolume that is concatenated and plexed. The volume will be used to hold an XFS filesystem with an external log.

This example uses four disks on controller 1 at drive addresses 2 through 5. The disks at drive addresses 2 and 3 are partitioned as option drives with xfslog partitions. The disks at drive addresses 4 and 5 are partitioned as option drives without xfslog partitions.

  1. Invoke xlv_make and begin to create the volume, called xfs-mp5, by creating the log subvolume with two plexes:

    # xlv_make

    xlv_make> vol xfs-mp5

    xfs-mp5

    xlv_make> log

    xfs-mp5.log

    xlv_make> plex

    xfs-mp5.log.0

    xlv_make> ve dks1d2s15

    xfs-mp5.log.0.0

    xlv_make> plex

    xfs-mp5.log.1

    xlv_make> ve dks1d3s15

    xfs-mp5.log.1.0

  2. Create the data subvolume with two plexes, each of which has two volume elements:

    xlv_make> data

    xfs-mp5.data

    xlv_make> plex

    xfs-mp5.data.0

    xlv_make> ve dks1d2s7

    xfs-mp5.data.0.0

    xlv_make> ve dks1d4s7

    xfs-mp5.data.0.1

    xlv_make> plex

    xfs-mp5.data.1

    xlv_make> ve dks1d3s7

    xfs-mp5.data.1.0

    xlv_make> ve dks1d5s7

    xfs-mp5.data.1.1

  3. Indicate that you have completed the volume, display it, and exit xlv_make:

    xlv_make> end

    Object specification completed

    xlv_make> show

    Completed Objects

    (1) VOL xfs-mp5

    VE xfs-mp5.log.0.0 [empty]

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

    /dev/dsk/dks1d2s15 (8256 blks)

    VE xfs-mp5.log.1.0 [empty]

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

    /dev/dsk/dks1d3s15 (8256 blks)

    VE xfs-mp5.data.0.0 [empty]

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

    /dev/dsk/dks1d2s7 (3920224 blks)

    VE xfs-mp5.data.0.1 [empty]

    start=3920224, end=7848703, (cat)grp_size=1

    /dev/dsk/dks1d4s7 (3928480 blks)

    VE xfs-mp5.data.1.0 [empty]

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

    /dev/dsk/dks1d3s7 (3920224 blks)

    VE xfs-mp5.data.1.1 [empty]

    start=3920224, end=7848703, (cat)grp_size=1

    /dev/dsk/dks1d5s7 (3928480 blks)

    xlv_make> exit

    Newly created objects will be written to disk.

    Is this what you want?(yes) y

    Invoking xlv_assemble

  4. Make an XFS filesystem by running mkfs. Note how mkfs automatically uses an external log when one is present.
# mkfs /dev/dsk/xlv/xfs-mp5
meta-data=/dev/dsk/xlv/xfs-mp5   isize=256    agcount=8, agsize=122636 blks
data     =                       bsize=4096   blocks=981088
log      =volume log             bsize=4096   blocks=1032
realtime =none                   bsize=65536  blocks=0, rtextents=0

  1. Mount the filesystem, for example:

    # mkdir /v1

    # mount /dev/dsk/xlv/xfs-mp5 /v1

  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/xfs-mp5 /v1 xfs rw,raw=/dev/rdsk/xlv/xfs-mp5 0 0


Next | Prev | Up | Top | Contents | Index