Create and Configure File Systems
-
check and confirm the drive/partition you want to use.
root@TESTVM:~# fdisk -l Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors Disk model: QEMU HARDDISK Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd9de07a1 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 65107967 65105920 31G 83 Linux /dev/sda2 65110014 67106815 1996802 975M 5 Extended /dev/sda5 65110016 67106815 1996800 975M 82 Linux swap / Solaris root@TESTVM:~#
RedHat -> xfs
Ubunutu -> ext4mkfs.xfs /dev/sdb1 mkfs.ext4 /dev/sdb1
You can create a label for a new Filesystem using the -L option.
mkfs.xfs -L "BackupVolume" /dev/sdb1
using mkfs without any argument it will show you some option:
The default behavior is not to override the existing filesystem. -f (force) option is available.
labels chang be changed without overwriting the filesystem.