How to Partition a 40TB RAID5 Disk on CentOS 6.7 and Create a 36TB Archive Partition
This guide walks through inspecting a large RAID5 disk on CentOS 6.7, using Parted to create a new /archive partition, configuring ext4 features, compiling e2fsprogs, formatting the partition, mounting it, and verifying disk usage and filesystem details.
1. View Partitions with fdisk
[root@localhost sysadmin]# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 40000.0 GB, 39999997214720 bytes
...
/dev/sda1 1 267350 2147483647+ ee GPTNote: The filesystem exceeds 16 TB, so the OS automatically converted it to GPT, making fdisk unable to show accurate partition info.
2. Use Parted to View Partition Information
[root@localhost sysadmin]# parted
GNU Parted 2.1
Using /dev/sda
...
Model: LSI AOC-USAS2LP-H8iR (scsi)
Disk /dev/sda: 40.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 525MB 524MB ext4
2 525MB 263GB 262GB ext4
3 263GB 284GB 21.0GB ext4
4 284GB 288GB 4295MB linux-swap(v1)3. Create /archive Partition for Archiving
(parted) mkpart /archive 288G -1
(parted) p
Model: LSI AOC-USAS2LP-H8iR (scsi)
Disk /dev/sda: 40.0TB
...
5 288GB 40.0TB 39.7TB /archive
(parted)q4. Verify New Partition
[root@localhost ~]# fdisk /dev/sda
sda sda1 sda2 sda3 sda4 sda5
[root@localhost ~]#Now the new partition sda5 is visible.
5. Modify /etc/mke2fs.conf
# vim /etc/mke2fs.conf
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
auto_64-bit_support = 1 # add this line
inode_size = 256
}6. Download and Build e2fsprogs
[root@localhost ~]# wget -c http://jaist.dl.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.8/e2fsprogs-1.42.13.tar.gz
[root@localhost e2fsprogs-1.42.13]# cd build/
[root@localhost build]# ../configure
...
[root@localhost build]# make && make install7. Format the Partition
[root@localhost ~]# mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 2048 /dev/sda5
[root@localhost build]# blkid
/dev/sda1: UUID="..." TYPE="ext4"
/dev/sda3: UUID="..." TYPE="ext4"
/dev/sda2: UUID="..." TYPE="ext4"
/dev/sda4: TYPE="swap" UUID="..."
/dev/sda5: UUID="..." TYPE="ext4"mke2fs options explained:
-b : set block size in bytes
-c: check for bad blocks
-f : set fragment size
-F: force execution
-i : set inode ratio
-N: specify number of inodes
-l : read bad block info from file
-L : set filesystem label
-m : reserve percentage for admin (default 5%)
-M: record last mounted directory
-q: quiet mode
-r: set ext2 version
-R= : set RAID parameters
-S: write only superblock and group descriptors
-v: verbose output
-V: show version
8. Mount the New Partition
[root@localhost build]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 20G 2.4G 16G 14% /
...
/dev/sda5 36T 20K 34T 1% /archive
[root@localhost build]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda5 4293781536 11 4293781525 1% /archive9. Inspect Filesystem Details with tune2fs
[root@localhost build]# tune2fs -l /dev/sda5
Filesystem volume name: <none>
Filesystem UUID: 3b5789ee-94c2-4296-bd99-5669200d826a
Filesystem features: has_journal ext_attr dir_index filetype needs_recovery extent 64bit flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
... (additional tune2fs output omitted for brevity)Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
