Linux 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. Type:

    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 the following values:
    • 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 to step 4 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

      Proceed to step 4 using the value calculated above as the new agsize value.

    • If the values of sunit and swidth are not equal to 0, and no warning message appears, proceed to step 4 using the agsize value displayed by the mkfs.xfs command in step 1.
  4. Run the mkfs.xfs command again to create the XFS filesystem on the device /dev/vg00/lvol1 using the value calculated in one of the previous steps. Type:

    mkfs.xfs -d agsize= -f /dev/vg00/lvol1

    For example (your values will vary):

    mkfs.xfs -d agsize=4369068032 -f /dev/vg00/lvol1

    The filesystem is created on the storage array.

    NoteIf the command fails, redo your calculations starting from step 1.
  5. Verify that the storage can be mounted by typing one of the following commands:
    • For HP Z800 systems: mount /mnt/StorageMedia
    • For older systems: mount /mnt/stoneMedia

    The storage should mount, as the DKU installation script. should have created the mount point directory for your storage (/mnt/StorageMedia on HP Z800 workstations, or /mnt/stoneMedia on older workstations), as well as the corresponding entry in the /etc/fstab file.

    If you receive an error message and the storage does not mount, follow the instructions in the next section to manually mount the storage.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27064837/viewspace-746198/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27064837/viewspace-746198/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值