Setup guide
4 Create the volume group “vg00” from the physical volumes you created in the preceding step: vgcreate
vg00 <list of volumes> where <list of volumes> is the list of physical volumes you created in the
preceding step.
TIP You can use the command vgremove to delete any erroneously entered volume.
5 Verify the volume was created and obtain the value of the “Free PE / Size” field: vgdisplay -v. In the
output, find the line that contains the “Free PE / Size” field and write down the value of the “Free PE”.
For example, in the following example output the “Free PE” value is 2124556. Free PE / Size 2124556
/ 8.10 TB
6 Create a new logical volume on “vg00”: lvcreate -l <Free_PE_value> -i <#_of_physical_volumes>
-I 32 -n lvol1 vg00 where <Free_PE_value> is the “Free PE” value you noted in the preceding step
and <#_of_physical_volumes> is the number of physical volumes. If we continue with the example
used in the previous steps, you would type: lvcreate -l 2124556 -i 4 -I 32 -n lvol1 vg00. The
output confirms the creation of the logical volume: Logical volume “lvol1” created
NOTE If the command outputs several lines about a file descriptor leaked on lvdisplay invocation, ignore
them.
7 Check if the adsk_lvm startup script has been installed by the DKU to enable automatic logical volume
reassembly upon reboot: chkconfig --list | grep adsk_lvm. If the script is properly configured, the
command output is: adsk_lvm 0:off 1:off 2:on 3:on 4:on 5:on 6:off. If the command output is
different, enable the script with:
chkconfig --add adsk_lvm
chkconfig adsk_lvm on
Creating the XFS Filesystem on the Logical Volume
After having created the logical volume, you are now ready to create and mount the XFS filesystem.
To create and mount an XFS filesystem:
1 Identify the optimal agsize value for your array by running the mkfs.xfs command: mkfs.xfs -d
agcount=128 -f /dev/vg00/lvol1. This command displays diagnostics information similar to the
following (your values may differ):
meta-data=/dev/vg00/lvol1 agcount=128, agsize=1066667 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=134400000, imaxpct=25
= sunit=16 swidth=64 blks, unwritten=1...
2 From the diagnostic information printed in the previous step, note: agsize on the first line, sunit
and swidth on the fourth line.
3 Depending on the values of sunit and swidth, calculate a new agsize value using one of the following
three methods:
■ If the values of sunit and swidth are both equal to 0, multiply the agsize value by 4096. For
example (your values will differ): 1066667 * 4096 = 4369068032. Proceed using the value calculated
above as the new agsize value.
■ If the command displays a warning message about the agsize being a multiple of the stripe width,
multiply the agsize value by 4096, and subtract the sunit value multiplied by 4096. For example
(your values will differ):
1066667 * 4096 = 4369068032
16 * 4096= 65536
4369068032 - 65536 = 4369002496
Install Linux | 29