133k views
3 votes
You have a Linux system that has a 1000GB SSD, which has a 90GB partition containing an ext4 filesystem mounted to the / directory and a 4GB swap partition. Currently, this Linux system is only used by a few users for storing small files; however, the department manager wants to upgrade this system and use it to run a database application that will be used by 100 users. The database application and the associated data will take up over 200GB of hard disk space. In addition, these 100 users will store their personal files on the hard disk of the system. Each user must have a maximum of 5GB of storage space. The department manager has made it very clear that this system must not exhibit any downtime as a result of hard disk errors. How much hard disk space will you require, and what partitions would you need to ensure that the system will perform as needed? Where would these partitions be mounted? What quotas would you implement? What commands would you need to run and what entries to /etc/fstab would you need to create? Justify your answers.

User Dstibbe
by
7.4k points

1 Answer

5 votes

Step-by-step explanation:

To address the requirements for the upgraded Linux system, you will need a minimum of at least 200GB + 100 users * 5GB = 800GB of hard disk space. This will ensure that the database application and associated data, as well as the personal files of the 100 users, can be stored on the system.

In terms of partitions, you will need to create a new partition for the database application and data. This partition should be at least 200GB and should be mounted to a directory such as /data. You will also need to create a partition for the personal files of the users. This partition should be at least 100 users * 5GB = 500GB and should be mounted to a directory such as /home.

Quotas should be implemented on the /home partition to ensure that each user only has a maximum of 5GB of storage space. You can use the quotactl system call or the quota utilities (quotaon, edquota, repquota, etc.) to implement quotas.

To ensure that the system does not exhibit downtime as a result of hard disk errors, you may consider using a redundant array of inexpensive disks (RAID) to provide data protection. A RAID 1 or RAID 10 configuration can be used to mirror the data, so that if one disk fails, the data is still available on another disk.

To implement the new partitions and quotas, the following commands could be used:

To create the new partitions:

fdisk /dev/sda (or other device name)

n (create new partition)

p (primary partition)

1 (partition number)

[Enter] (default first cylinder)

+200G (size of partition for database application and data)

n (create new partition)

p (primary partition)

2 (partition number)

[Enter] (default first cylinder)

+500G (size of partition for user personal files)

w (write changes and exit)

To format the new partitions:

mkfs.ext4 /dev/sda1 (for the database application and data partition)

mkfs.ext4 /dev/sda2 (for the user personal files partition)

To mount the new partitions:

mkdir /data

mount /dev/sda1 /data

mkdir /home

mount /dev/sda2 /home

To implement quotas:

quotacheck -avugm (to check the file system for quotas)

edquota -u [username] (to edit the quota for a specific user)

quotaon /home (to enable quotas on the /home partition)

To add the new partitions to /etc/fstab:

Add the following lines to the file:

/dev/sda1 /data ext4 defaults 0 0

/dev/sda2 /home ext4 defaults,usrquota 0 0

In conclusion, to ensure that the system will perform as needed, you will require at least 800GB of hard disk space, and create two partitions for the database application and data, and user personal files, with quotas implemented on the user personal files partition. The new partitions should be mounted to /data and /home, and entries should be added to the /etc/fstab file to ensure that they are automatically mounted during system boot.

User Michael Lenzen
by
8.1k points