Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 4: Making the File System accessible and roboust (3 marks) The next step is

ID: 3742262 • Letter: P

Question

Part 4: Making the File System accessible and roboust (3 marks) The next step is to create another virtual machine (running the same Linux distribution). Your job is to: 1. Mount a NFS exported volume from the server outlined in Part three, on this newly created server. 2. Backup all the data on the ZFS volumes on the server in part three to this new instance. You can either use ZFS or another tool/ technique to do this. Document the steps taken. Part 5: File System Management with Scripts (3 marks) Now that you have a plan for the storage there are a few housekeeping matters to take care of because users tend to be somewhat liberal with their storage. Write a script to make sure that user home directories are owned and only accessible by the owner. The script can assume home directories are descendants of /users. Finally, write a script which takes as an argument the filesystem name e.g. /home and looks for objects which do not belong i.e. end with the extension a. mp3 b. aac c. mp4 d. mov e. avi f. vid When these files are found a summary should be produced including where they are and the size. The script should also remove the files.

Explanation / Answer

NFS mounting on a client Server

# ping <IP of the Server>

# showmount –e <Server_name>

Create a directory where you want to mount the files:

# mkdir /mount

Now edit the /etc/fstab file to permanently mount in your local server:

# vi /etc/fstab

Go to the last line and edit

<Server_name>:/Shared_directory       /mount      nfs      defaults    0    0

Now run the command to finish the step:

# mount -a

You will able to view the shared directory in your /mount directory of the newly created server.

Backing up a ZFS volume:

ZFS actually helps the administrator to perform inexpensive snapshots of already present mounted file system. A photo of the ZFS files system at a given point.

# pfexec zfs snapshot <zpool_name>/<filesystem_name>@snapshot_name

# zfs list –t snapshot

Here we are dumping the snapshot using a single command:

# pfexec zfs send <zpool_name>/ <filesystem_name>@snapshot_name > backup_file

This file has entire ZFS mounted volumes along with the files and metadata.

# zfs send <zpool_name>/<filesystem_name>@snapshot_name | ssh remote_host zfs receive <zpool_name1>/<filesystem_name>