In this lab, you will mount and unmount file systems.
Outcomes
The user identifies and mounts a new file system at a specified mount point, then unmounts it.
Reset your serverX system. Run the script lab fs setup before starting the exercise.
A new partition with a file system has been added to the second disk (vdb) on your serverX machine. Mount the newly available partition by UUID at the newly created mount point /mnt/newspace.
Use the blkid to discover the UUID of the newly added partition, vdb1, on serverX.
[root@serverX ~]#blkid/dev/vda1: UUID="46f543fd-78c9-4526-a857-244811be2d88" TYPE="xfs" /dev/vdb1: UUID="7c5e3fbb-34eb-4431-a4a5-9b887c1b6866" TYPE="xfs"
Create the mount point /mnt/newspace on serverX.
[root@serverX ~]#mkdir /mnt/newspace
Mount the file system by UUID on the /mnt/newspace directory of the serverX machine.
[root@serverX ~]#mount UUID="7c5e3fbb-34eb-4431-a4a5-9b887c1b6866" /mnt/newspace
Change to the /mnt/newspace directory and create a new directory, /mnt/newspace/newdir, with an empty file, /mnt/newspace/newdir/newfile, on serverX.
Change to the /mnt/newspace directory on serverX.
[root@serverX ~]#cd /mnt/newspace
Create a new directory, /mnt/newspace/newdir, on serverX.
[root@serverX newspace]#mkdir newdir
Create a new empty file, /mnt/newspace/newdir/newfile, on serverX.
[root@serverX newspace]#touch newdir/newfile
Unmount the file system mounted on the /mnt/newspace directory on serverX.
Try to unmount /mnt/newspace while the current directory on the shell is still /mnt/newspace on serverX.
[root@serverX newspace]#umount /mnt/newspace
Change the current directory on the shell to /root.
[root@serverX newspace]#cd[root@serverX ~]#
Successfully unmount /mnt/newspace on serverX.
[root@serverX ~]#umount /mnt/newspace