By Xavier Collantes
Created: 3/28/2024; Updated: 9/1/2025
nvme1n1
.When submitting request for a drive you can use a uncommon size to identify it easier such as 202 GB instead of 200 GB.
1NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
2nvme1n1 259:0 0 200G 0 disk
3nvme0n1 259:1 0 20G 0 disk
4├─nvme0n1p1 259:3 0 19.9G 0 part /
5├─nvme0n1p14 259:4 0 3M 0 part
6└─nvme0n1p15 259:5 0 124M 0 part /boot/efi
7nvme2n1 259:2 0 419.1G 0 disk
8
Get information about a specific device, such as its file system type.
sh1# If the output shows simply `data`, as in the following example output,
2# there is no file system on the device.
3sudo file -s /dev/<DRIVE NAME>
4# /dev/xvdf: data -> No filesystem.
5# /dev/xvda1: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs) -> Has filesystem.
6
UUID is for specific EBS volume.
sh1echo "UUID=bcfa0792-edbe-49d5-af46-97cb341c0f23 /<MOUNT DIR> xfs defaults,nofail 0 2" | sudo tee --append /etc/fstab
2df -h
3
/etc/fstab
. If there are no errors,
the /etc/fstab
file is correct and your file system will mount automatically
after reboot.Errors in the `/etc/fstab` file can render a system unbootable. Do not shut down a system that has errors in the `/etc/fstab` file.
/etc/fstab
and created a backup
file in the first step, you can restore from your backup using the following
command.1sudo umount /<DIR ACCESS POINT>
2sudo mount -a # MAKE SURE NO ERRORS SHOW!!!!!!!!!!
3ls -l /<DIR ACCESS POINT>
4
Do not use this command if you are mounting a volume that already has data on it (for example, a volume that was created from a snapshot). Otherwise, you will format the volume and delete the existing data.
1sudo mkfs -t xfs /dev/<DRIVE NAME>
2
3# If you get an error that `mkfs.xfs` is not found, use the following command to install the XFS tools and then repeat the previous command:
4sudo apt-get install xfsprogs -y
5
Related by topics: