solutions
Remount the / file system read/write - ANSWER mount -o remount, rw /
On serverb switch to a multiuser target. Set the dault target to multi-user - ANSWER sudo
systemctl isolate multi-user.target
sudo systemctl set-default multi-user.target
Schedule a recurring job as a student user that executes the /home/student/backup-home.sh
script on an hourly basis between 7pm and 9pm on all days except Saturday and Sunday -
ANSWER crontab -e
0 19-21 * * Mon-Fri /home/student/backup-home.sh
Create a 2GiB partition on /dev/vdb - ANSWER 1. parted /dev/vdb mklabel msdos
2. parted /dev/vdb mkpart primary 1GiB 3GiB
3. parted /dev/vdb set 1 lvm on
Create a logical volume called vol_home using 2GiB partition you created on /dev/vdb. Name
the group extra_storage - ANSWER 1. pvc create /dev/vdb1
2. vgcreate extra-storage /dev/vdb1
3. lvcreate -L 1GiB -n vol_home extra_storage
Format vol_home with the XFS file-system type, and mount it on /home-directories - ANSWER
1. mkdir /home-directories
2. mkfs -t -xfs /dev/extra_storage/vol_home
3. lsblk -o UUID /dev/extra_storage/vol_home
, 4. echo "UUID=988C... /home-directories xfs defaults 0 0" >> /etc/fstab
5. mount -a
Ensure that the network file system called /share is persistently mounted on /local-share across
reboot. The NFS server.lab.example.com exports the /share nfs. The NFS export path is
servera.lab.example.com:/share - ANSWER 1. mkdir /local-share
2. echo "servera.lab.example.com:/share /local-share nfs rw,sync 0 0" /etc/fstab
3. mount /local-share
Create a new MiB partition on the /dev/vdc disk to be used as swap space. The swap space
must be automatically activated at boot time - ANSWER 1. parted /dev/vdc mklabel msdos
2. parted /dev/vdc mkpart primary linux-swap 1MiB 513MiB
3. mkswap /dev/vdc1
4. lsblk -o UUID /dev/vdc1
5. echo "UUID=cc18... swap defaults 0 0" >> etc/fstab
6. swapon -a
Create the production1, production2, production3, and production4 users. Ensure they use the
new group called production as their supplementary group - ANSWER 1. groupadd production
2. for i in l 1 2 3 4; do useradd -G production production$i; done
Configure your system so that it uses a new directory called /run/volatile to store temporary
files. Files in this directory should use time based cleanup if they are not accessed for more than
30 seconds. The octal permissions for the directory must be 0700. Make sure you use the
/etc/tmpfiles.d/volatile.conf file to configure the time based cleanup for the files in /run/volatile
- ANSWER 1. vim /etc/tmpfiles.d/volatile.conf
2. insert d /run/volatile 0700 root root 30s
3. systems-tmpfiles --create /etc/tmpfiles.d/volatile.conf