3-3 Configure Systems to Mount File Systems at Boot by UUID or Label Flashcards
mkfs -t xfs /dev/xvdf1
Make file system
blkid
List available block devices on system
lsblk
List all attached block devices
mount /dev/disk /mnt/mountlocation
Non-persistent mount
Mounting with the UUID ensures the appropriate mount is used
Add to /etc/fstab to mount persistently
tune2fs -L labelname /dev/disk
Mount with file system label for ext
e2label /dev/disk labelname
Mount with file system label for ext
xfs_admin -L labelname /dev/disk
Mount with file system label for XFS
mount LABEL=labelname /mnt/mountlocation defaults 1 1
Mount with label,
non-persistent; edit /etc/fstab for persistence
mount -a
Mount all file systems in /etc/fstab
umount -a
Unmount all file systems in /etc/fstab
man fstab
search for defaults section
man mount
How to see what are fstab command defaults
see how else to mount, options
fstab order
UUID_OrDeviceMount /mount/newdir xfs(file system) defaults 0(flag for dump command to use for backing up, 1 means enable) 2(incase of abrupt restart, in what order fsck check will run on, root / should be set to 1, swap can be set to 0 which means not to run on, and others can be set to 2,3,4 etc)
can be used by dump command to make a file system backup of the device
how to set up line in fstab
mkdir /mnt/{newdir1,newdir1}
command and syntax to make two folders at once
mount -a
mount everything listed in /etc/fstab file
in /etc/fstab
start like with following partitions set to ID or Label
UUID=
LABEL=
mount file systems at boot to UUID or Label