Linux & Storage Assignment: Distro, Docker, ZFS, Bash

Linux & Storage Assignment: Distro, Docker, ZFS, Bash

Question 1 (20 Marks)

Part (A)

Select a Linux operating system (OS) distribution and write the following:

  • Explain the core functions (NOT features).
  • Describe the pros and cons.
  • Describe your experiences of using it, together with 3 or 4 screenshots.

Appropriate citations must be provided. The length of the write-up needs to be 350 to 450 words, excluding citations.

Note: You are NOT allowed to choose Debian/Ubuntu/Android, and NO marks will be awarded if you choose Debian/Ubuntu/Android. In addition, use your own words and not to copy word for word from the citations provided.

(15 marks)

Part (B)

Select a docker image and write on the unique features of this docker image. Appropriate screenshots need to be given.

(5 marks)

Question 2 (10 Marks)

File management is one of the core functions of an Operating System (OS), and file allocation methods are part of file management.

Demonstrate index allocation methods by sketching a diagram that includes the following: File Allocation Table and the actual location of the files in the index blocks for three files. The three files are:

  • “Suss1.txt” index block is at block 10, file length is 6, and it has two start blocks
  • “Suss2.txt” index block is at block 23, file length is 3, and it has two start blocks
  • “Suss3.txt” index block is at block 0, file length is 2, and it has one start block

Currently blocks 11 to 21 are occupied by other files.

(10 marks)

Question 3 (30 Marks)

Demonstrate the creation and usage of virtual machine using Ubuntu OS.

SmallAnimals Pte Ltd, a chain of pet stores, bought a server with 10 hard drives, each of which can hold 6 TB of data. The server is pre-installed with Ubuntu OS 25.04, and it has an operational life of 3 years.

The requirements for the storage space are stated as follow:

  • A storage capacity of 11 TB is required to maintain vital operational records. Redundancy is essential to ensure that in the event of one hard drive failures, no data is lost.
  • The marketing department requires 3 TB of storage to accommodate various marketing materials, including promotional videos and stories of pets for the chain. To prevent data loss, implementing redundancy is essential.
  • A storage area for staff to share non-critical content. It is projected that this space will require 9.9 TB in the first year, and that amount will increase by 10% (from first year) in the second year and 20% (from second year) in the third year. There is no requirement on redundancy although performance is important.
  • Each of the 5 stores requires 1.5 TB of storage to maintain materials related to pets and store-specific customer transactions. To safeguard data integrity, redundancy is necessary.

Note that, aside from the Ubuntu OS which is pre-installed on two hard drives (/dev/sda and /dev/sdb) in a mirrored configuration, you must use ZFS to configure the remaining eight hard drives. You are NOT allowed to purchase additional hard drives or utilize the OS drives.

Part (A)

Illustrate and justify what RAID system(s) to use for the above scenario.

Calculate (with working) and describe how you will organize and use the 8 hard drives. Explain and sketch a diagram with the appropriate labelling, such as the name(s) of the pool, the file system(s), and the hard drive(s) used (/dev/sdc, /dev/sdd, etc.).

Note that besides the diagram which is an image, your calculation and explanation must be in editable text so that the Turnitin plagiarism checker can be effective. Marks will be deducted if you do not follow this instruction.

(15 marks)

Part (B)

Install additional hard drives in your Ubuntu virtual machine and simulate the scenario using ZFS with relevant pools and reservations. You must use ZFS and NOT other tools such as LVM, parted, etc.

Demonstrate and show the whole process with clear explanations and necessary screenshots.

Note that you can create a scale down storage size for each hard drive such as 6 GB instead of 6 TB if your hypervisor does not allow you to create 6 TB hard drive. You can use Ubuntu Desktop instead of Ubuntu Server for this task.

(15 marks)

Question 4 (40 Marks)

In this task, you need to implement system security and access control in Linux operating system.

Using Ubuntu OS, write and implement ONE (1) bash shell script (submit only one script for whole Question 4). The script needs to execute on a file that have the same format as /etc/passwd file, and NOT on the original /etc/passwd file. That means some commands cannot be used in your script, such as id, getent, pwck, useradd, etc. Marks will be severely deducted if your script uses any commands that work on the original /etc/passwd file. The script must be executed with no arguments, and it can be executed in any folder. However, you can assume that your script will not be executed in the /etc folder.

Refer to the following link for the correct format of the file https://linuxize.com/post/etc-passwd-file/

(assume that besides the GECOS field, all the other fields are mandatory)

Warning: Do NOT execute your script in the /etc folder as it may corrupt the /etc/passwd file. You can create a checkpoint (snapshot) if you are worried about corrupting Ubuntu OS.

Part (A)

  1. The script will prompt a user to enter a filename of a file in the current folder (the file format is the same as /etc/passwd file).
  2. It will prompt the user to enter the filename again if the file does not exist in the current folder. This will continue until the user enter a filename of a file that exist in the current folder.
  3. If the file exists in the current folder, it will proceed to check the content of the file and display ONLY the following information on the screen:
    • username of the user accounts (assume that the user account is having a shell of /bin/bash or /bin/sh)
    • number of user accounts
    • the largest user id (UID) among all the user accounts
  4. The script will then display the following information according to whether the group others can read the file.
    • If the group others cannot read the file, change the permission of the file to owner can read, write and execute, group can read and write, and others can only read.
    • If the group others can read the file, change the owner and group of the file to userSUSS (assume that userSUSS is an existing user and group in Ubuntu).

(Note: do NOT create user userSUSS and group userSUSS in your script.)

(15 marks)

Part (B)

Format of the file needs to be validated. If the format is not correct, an error message will prompt, and the script will terminate.

Note that you ONLY check the format of the file that the user enters in part (a), and not the actual /etc/passwd file. Thus, do NOT check whether the GID is in the /etc/group file, etc.

NO marks will be awarded if you do NOT follow the above instruction.

(10 marks)

Part (C)

A documentation (with appropriate screenshots and explanations) must be produced on the execution of the bash shell script with different conditions to thoroughly test the script including but not limited to file does not exist in the current folder, group others cannot read the file, wrong formats of file. Necessary checking must be performed to show the outcomes are correct, including but not limited to checking that the permissions of the file has changed.

Appropriate comments must be added in the script to make it easier to understand.

(15 marks)

Want Help Structuring Your Answers!!

Native Singaporean Experts

All Subjects Covered

Professional Guidance

Get Operating Systems Assignment Help

Operating Systems Answers: Expert Answers on Above Questions on Operating Systems

Linux distribution: The Linux distribution that is selected is Fedora Linux. An analysis of the code functions of Fedora Linux indicates that it includes process management, memory management, file system management, device management and security and user management as its core functions. It has advantages and disadvantages, and the advantages include up to date software and kernel versions, and it is highly excellent for developers. However the negative aspects include frequent updates leading to compatibility issues and it is less stable for production.
The use of Fedora Linux leads to a positive experience in the sense that it offers a smooth GNOME interface, very fast with booting and good software management. It offers high stability during multitasking which is another core benefit of Fedora Linux.
Docker Image: The doctor image selected for analysis is nginx:latest. The important features offered include lightweight web server, fast deployment, easy to scale and ideal for hosting static websites. 

Want a Full Worked Out Answer with References?

Submit Your Request Here

Adrian Lee
www.assignmenthelpsingapore.sg

The post Linux & Storage Assignment: Distro, Docker, ZFS, Bash appeared first on Assignment Help Singapore.