CS469/569 Assignment #8 - 10 points More system administration tasks to be performed on your virtual machines. (The ones you login to from effie via ssh cs469@u## where ## are the last two digits of your cs469 account name.) After you have completed the following handin your 'h8' directory with your machines completed /etc/fstab file, the output of the 'fdisk -l' command (as partitions.txt) minus the entries for the ram drives and your arc.sh script. 1) Time to add some file-systems to your virtual machines. I have added four additional "sata" drives, each 4GB in size as devices /dev/sd[b-e] to your virtual machines. Use these drives to perform the following tasks. (7pts) +============================================================================+ | Under no circumstances should you do anything whatsoever to your /dev/sda* | | drive. Wiping out your system partition shall be a deduction of 3 points. | +============================================================================+ Tasks to be performed: A) (2pts) Using fdisk and/or parted, partition the virtual drives: i) On the sdb device: partition the drive with a GPT disk-label into 4 separate 1GB partitions. Consider using parted to do this. ii) Partition the sdc, sdd and sde drives with a DOS (for this fdisk will do) partition type and make two 2GB partitions on each device, both with the: "Linux raid auto detect" (fd) partition type. B) (2pts) Using mke2fs or mkfs.* format the partitions on /dev/sdb: i) Format the first partition as a ext2 file-system. ii) Format the second partition as a ext3 file-system. iii) Format the third partition as a ext4 file-system. iv) Format the fourth partition as a xfs file-system. C) (1pt) Use the mdadm command to create: i) A RAID 0 virtual device (/dev/md0) using the first partition on each of sdc, sdd and sde. ii) A RAID 5 virtual device (/dev/md1) using the second partition on each of sdc, sdd and sde. Note*: troubleshooting, if you are not able to create the md devices, check /proc/mdstat, which is a text file that lists md devices. If you have something listed there that is not right, use the mdadm command to remove it and try again. D) (1pt) Format the RAID virtual drives (/dev/md*). Make them both ext4. You can use mke2fs again. E) (1pt) Edit the system fstab file and make the above newly created partitions permanently mounted at the following mount points: - Mount the ext2 partition on sdb at /net - Mount the ext3 partition on sdb at /net/log - Mount the ext4 partition on sdb at /net/ftp - Mount the xfs partition on sdb at /net/tmp - Mount the RAID 5 file-system at /net/web - Mount the RAID 0 file-system at /bkup Use the mount command to mount each of these. Note that the directory must exist before mount will succeed. For example, mkdir /net/log mount /net/log You should only need to do this once. If you reboot your system, these should be mounted automatically from your /etc/fstab file. 2a) (2pts) Create a script called 'arc.sh' (in /usr/local/bin/) that creates a "tar" archive file of your /etc directory that is compressed using 'xz' compression that includes the date in the file name of the archive (etc_YYYY-MM-DD.tar). The script should store the archive in the directory '/var/archive' (creating the directory it if it doesn't exist) and keep only the last 10 such archives. 2b) (1pt) Create a cron entry (for root) that runs the arc.sh script nightly at 2am. ===================================== Notes on grading... The following are commands that I will run to check your work... 1, A.i) parted /dev/sdb print # should show four partitions, each about the same size around 1GB 1, A.ii) parted /dev/sdc print parted /dev/sdd print parted /dev/sde print # should show two partitions about the same size around 2GB that are raid fdisk -l /dev/sdc fdisk -l /dev/sdd fdisk -l /dev/sde # should show two partitions about the same size around 2GB that are linux raid autodetect 1, B) parted /dev/sdb print # should show drives that are ext2, ext3, ext4, xfs 1, C and D) parted /dev/md0 print # should show ext4, around 6GB parted /dev/md1 print # should show ext4, around 4GB mdadm -Q --detail /dev/md0 # should show raid0, /dev/sdc1, /dev/sdd1, /dev/sde1 mdadm -Q --detail /dev/md1 # should show raid5, /dev/sdc2, /dev/sdd2, /dev/sde2 1, E) You should have an entry in /etc/fstab for each of the items listed in the problem. You should also see them listed in a printout from df -h 2a) I will run your arc.sh script to make sure it works properly, and will check the code as well. I will also run tar --list -f etc*.tar | less tar --list -f etc*.tar | wc # for Jeff gives 2278 2b) If your cron entry is working, then we will see the backup files in your /var/archive/ with a time of 2am each day.