Differences
This shows you the differences between two versions of the page.
— | mkfs.xfs [2015/06/04 17:46] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== mkfs.xfs ====== | ||
+ | * [[XFS]] | ||
+ | * [[mount]] | ||
+ | * [[xfs_info]] | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | Creating an XFS filesystem can use a partition or the logical device directly. | ||
+ | |||
+ | < | ||
+ | mkfs.xfs /dev/sda1 | ||
+ | mkfs.xfs /dev/sdb | ||
+ | </ | ||
+ | |||
+ | Do a dry-run and see what filesystem attributes it would set: | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -N /dev/sda1 | ||
+ | </ | ||
+ | |||
+ | If the device already has another filesystem, mkfs will stop. You can safely force it to run: | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -Nf /dev/sda1 | ||
+ | </ | ||
+ | |||
+ | ==== Performance ==== | ||
+ | |||
+ | For the sake of clarity (and not making mistakes) when using additional arguments, use '' | ||
+ | |||
+ | === External Log === | ||
+ | |||
+ | The journal log can be put on a separate device to improve performance. | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -d name=/ | ||
+ | mount -o logdev=/ | ||
+ | </ | ||
+ | |||
+ | === External Metadata === | ||
+ | |||
+ | In addition to having the journal log on a separate device, the metadata and file data can be split up as well. | ||
+ | |||
+ | Create the new XFS filesystem and separate log journal at the same time: | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -d name=/ | ||
+ | mount -o logdev=/ | ||
+ | </ | ||
+ | |||
+ | === Internal Log Block Sizes === | ||
+ | |||
+ | In both cases, the logdev option will want a block size. See '' | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -Nf -d name=/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | meta-data=/ | ||
+ | | ||
+ | | ||
+ | data | ||
+ | | ||
+ | naming | ||
+ | log =internal log | ||
+ | | ||
+ | realtime =none | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | mkfs.xfs -d name=/ | ||
+ | </ |