Disk Management

Author: Neil Jianzhang Ni

Date: 21-May-2024

The system disk is 2 2TB SSD drive with RAID 1 setting.

The data disk is 5 20 TB HDD drives with RAID 5 setting.

(base) [root@DREAM /]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 72.8T  0 disk
└─sda1   8:1    0 72.8T  0 part /data
sdb      8:16   0  1.7T  0 disk
├─sdb1   8:17   0  600M  0 part /boot/efi
├─sdb2   8:18   0    1G  0 part /boot
└─sdb3   8:19   0  1.7T  0 part
├─rl_dream-root 253:0    0  300G  0 lvm  /
├─rl_dream-swap 253:1    0    4G  0 lvm  [SWAP]
└─rl_dream-home 253:2    0    1T  0 lvm  /home

System Disk Management

  1. There is limited space on the system disk, so admins should encourage the users to store all large data on the data disk.
  2. Total usable space on the system disk is 1.7 TB, and only 1.3 TB is used. Since the system disk uses xfs file system, I left some space for expansion, either for the root or home partition.
  3. Home folder quota should be set to each user to make sure every user has a fair share of the space.

Data Disk Management

  1. Data Disk mounted at /data. and have several subfolders.
  • project folder is for the project data
  • user folder is for personal usage.
  1. Data Disk will have no quota limit at the moment.

Example Commands

Shrinking a mount point

XFS can't shrink directly,you need to remove the old partition. For example, I want to shrink the /home folder.

# **Backup the /home Data first**

# remove the old lvm
sudo umount /home # Unmount the /home Filesystem
sudo lvremove /dev/rl_dream/home  # Remove the Logical Volume
sudo lvcreate -L 1T -n home rl_dream # Recreate the Logical Volume with 1T Size
# WARNING: xfs signature detected on /dev/rl_dream/home at offset 0. Wipe it? [y/n]: y

# Create a New XFS Filesystem

sudo mkfs.xfs /dev/rl_dream/home
sudo mount /dev/rl_dream/home /home Mount the New /home Filesystem

# Restore the Saved Data

Expanding a mount point

For example I want to expand the root partition. Note: This will need unused space on the disk. If not you need to shrink other partitions to get the space.

sudo lvextend -L +700G /dev/rl_dream/root
sudo xfs_growfs /