ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux Creating the XFS Filesystem on the Logical Volume

Linux Creating the XFS Filesystem on the Logical Volume

原创 Linux操作系统 作者:BenX22 时间:2012-10-11 15:26:40 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/27064837/viewspace-746198/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-06-13

  • 博文量
    74
  • 访问量
    110117