Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 10. Creating an XFS file system
As a system administrator, you can create an XFS file system on a block device to enable it to store files and directories.
10.1. Creating an XFS file system with mkfs.xfs Copier lienLien copié sur presse-papiers!
This procedure describes how to create an XFS file system on a block device.
Procedure
To create the file system:
If the device is a regular partition, an LVM volume, an MD volume, a disk, or a similar device, use the following command:
mkfs.xfs block-device
# mkfs.xfs block-deviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 
										Replace block-device with the path to the block device. For example, 
/dev/sdb1,/dev/disk/by-uuid/05e99ec8-def1-4a5e-8a9d-5945339ceb2a, or/dev/my-volgroup/my-lv. - In general, the default options are optimal for common use.
 - 
										When using 
mkfs.xfson a block device containing an existing file system, add the-foption to overwrite that file system. 
- 
										Replace block-device with the path to the block device. For example, 
 To create the file system on a hardware RAID device, check if the system correctly detects the stripe geometry of the device:
If the stripe geometry information is correct, no additional options are needed. Create the file system:
mkfs.xfs block-device
# mkfs.xfs block-deviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the information is incorrect, specify stripe geometry manually with the
suandswparameters of the-doption. Thesuparameter specifies the RAID chunk size, and theswparameter specifies the number of data disks in the RAID device.For example:
mkfs.xfs -d su=64k,sw=4 /dev/sda3
# mkfs.xfs -d su=64k,sw=4 /dev/sda3Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
Use the following command to wait for the system to register the new device node:
udevadm settle
# udevadm settleCopy to Clipboard Copied! Toggle word wrap Toggle overflow