Creating a Partition more than 2 TB CENTOS 7 / Red Hat Enterprise Linux 7
Partitioning a 7.3 TB disk on CentOS 7 can be done using the parted command or the older fdisk command. Here, I'll show you how to use parted to partition the disk. Make sure you're comfortable with these steps because partitioning can result in data loss if not done correctly.
Note: Before proceeding, make sure you have a backup of your data because the partitioning process can result in data loss.
1. Open a terminal on your CentOS 7 system.
2. Identify the 7.3 TB disk device. You can use the lsblk or fdisk -l command to list the available disks. Let's assume the disk is /dev/sdX, where 'X' is the letter representing your disk (e.g., /dev/sdb).
3. Run the parted command to start partitioning:
sudo parted /dev/sdX
4. Within parted, you can create partitions as needed. For example, to create a single partition using the entire disk space, you can use the following commands:
To create a GPT partition table (recommended for large disks):
mklabel gpt
To create a primary partition that uses all available space:
mkpart primary ext4 1MiB 100%
Replace ext4 with your desired file system type (e.g., xfs, ext4, etc.).
5. Exit parted:
quit
6. Format the partition (assuming it's an ext4 file system):
sudo mkfs.ext4 /dev/sdX1
7. Create a mount point for your new partition:
sudo mkdir /mnt/mydata
8. Mount the partition:
sudo mount /dev/sdX1 /mnt/mydata
9. Add an entry to /etc/fstab to mount the partition at boot:
Open /etc/fstab in a text editor:
sudo nano /etc/fstab
Add the following line at the end of the file:
/dev/sdX1 /mnt/mydata ext4 defaults 0 0
Save and exit the text editor.
10. Mount the partition:
sudo mount -a
Now, your 7 TB disk should be partitioned and mounted on your CentOS 7 system. Make sure to adapt the partition size, file system type, and mount point to your specific requirements.