RHCSA Rapid Track
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/newspaceon serverX.[root@serverX ~]#mkdir /mnt/newspaceMount the file system by UUID on the
/mnt/newspacedirectory of the serverX machine.[root@serverX ~]#mount UUID="7c5e3fbb-34eb-4431-a4a5-9b887c1b6866" /mnt/newspace
Change to the
/mnt/newspacedirectory and create a new directory,/mnt/newspace/newdir, with an empty file,/mnt/newspace/newdir/newfile, on serverX.Change to the
/mnt/newspacedirectory on serverX.[root@serverX ~]#cd /mnt/newspaceCreate a new directory,
/mnt/newspace/newdir, on serverX.[root@serverX newspace]#mkdir newdirCreate a new empty file,
/mnt/newspace/newdir/newfile, on serverX.[root@serverX newspace]#touch newdir/newfile
Unmount the file system mounted on the
/mnt/newspacedirectory on serverX.Try to unmount
/mnt/newspacewhile the current directory on the shell is still/mnt/newspaceon serverX.[root@serverX newspace]#umount /mnt/newspaceChange the current directory on the shell to
/root.[root@serverX newspace]#cd[root@serverX ~]#Successfully unmount
/mnt/newspaceon serverX.[root@serverX ~]#umount /mnt/newspace