Linux - Interview
Table of contents
*] How to permanently mount a disk in linux
- create a vol attach it to inst
{ sudo file -s /dev/xvda1 } --> gives the file system type
mkfs -t xfs /dev/xvdf --> to Format to a filesystem
mkdir /mnt --> create an empty directory
mount /dev/xvdf /mnt --> mount FS to that dir
blkid /dev/xvdf --> to get blkID
vi /etc/fstab || UUID=<ID> /mount xfs defaults,nofail || it will be available in d next reboot
mount -a --> to make it available now itself
now if u detach & attach it to another inst, u can directly mount it without creating file system (mkfs)
if we want to increase d size of EBS
we increase it then, xfs_growfs -d /mnt | growpart /dev/xvdf
{ while creating volume out of snapshot we can choose a different AZ in wich we want that volume to be in, but we cannot choose a different Region, to do that 1st we should copy that snaapshot to another region & then we can create volume out of it in diff region }