CentOS6.5 large storage space with more than 16 TB mounted
Recently, a large-capacity storage machine was configured for database data backup.
--------------------------------------
Type: 2U type storage server
Central processor: 2 Intel G6950 2.8G/dual-core/L3 3 M/32NM;
System memory: 96 GB DDR3 ECC 800/1066/1333 MHz, supporting 3-channel communication mode, providing 6 DIMM
System hard drive: 300 gb ssd (RAID 1 does not support hot swapping );
Storage hard drive: 16*2000G enterprise SATAII 7200 RPM, 3.5 "hard drive; supports a maximum of 16 3.5 inch hard drive hot swapping installation bits; disk array: Adaptec 16 channel Array Control Module (WZ51645 ), 512 M Cache, supporting RAID 0, 1, 1E, 5, 5EE, 6, 10, 50, 60, JBOD .;
Network: Two 10/100/M Adaptive Ethernet cards;
Power Supply: 760 W 2 + 1 server redundant power supply;
The 8 3 T storage disks of the centos 6.5 system are installed with RAID 5 (that is, RAID 5 + 1). the effective capacity of the system is about 22 TB.
--------------------------------------
Prepare to start partitioning and formatting large-capacity Storage
Since MBR partitions support a maximum capacity of only 2 TB, gpt partitions are required if the maximum capacity is 2 TB.
First, use the parted command to convert the hard disk to a gpt partition.
----------------------
If you do not have the parted command, you can use the yum-y installparted command to install it.
[Root @ ~] $ Parted/dev/sdb
GNU parted2.1
Using/dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(Parted)
Convert from MBR to GPT Disk
--------------------------------------
(Parted) mklabel gpt
Warning: The existing disk label on/dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
(Parted)
Set the type and size of the partition you want to create (based on the actual situation) 0,-1 indicates the start and end capacity, the difference is the partition capacity, the Unit is M mkpart primary 0-1, indicating dividing all capacity
--------------------------------------
(Parted) mkpart primary 0-1
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(Parted)
(Parted)
(Parted) p
Model: Adaptec RAID 6 (scsi)
Disk/dev/sdb: 28.0 TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 28.0 TB 28.0 TB primary
(Parted) quit
Information: You may need to update/etc/fstab.
After partitioning is complete, start formatting the hard disk and mount it.
Centos6 supports ext4 by default. Use the ext4 file system.
----------------------------------------
[Root @ ~] $ Mkfs. ext4/dev/sdb1
Mke2fs 1.41.12 (17-May-2010)
Mkfs. ext4: Size of device/dev/sdb1 too big to be expressed in 32 bits
Using a blocksize of 4096.
Follow the error message to change the blocksize to 4096.
After reading the relevant information, it seems that ext4 does not yet support single partition space of more than 16 TB.
If you don't need to worry about it, you can simply switch to xfs.
Start xfs Installation
-----------------------------
[Root @ ~] $ Yum install kmod-xfs xfsprogs
[Root @ ~] $ Modprobe xfs // load the xfs File System Module
[Root @ ~] $ Lsmod | grep xfs // check whether the xfs module is loaded
Format and mount with xfs
-----------------------------
[Root @ ~] $ Mkfs. xfs/dev/sdb1
Mount/dev/sdb1/data/
Add to fstab to enable automatic mounting
--------------------------------------
[Root @ ~] $ Vi/etc/fstab // open fstab
UUID = c3749d2d-08b5-45a3-9aa4-312b6161d471/data xfs defaults 1 2 // Add mount information specify File System xfs (uuid obtained by blkid/dev/sdb1 command)
--------------------------------------
This is a success!
[Root @ ~] $ Df-lTh
Filesystem Type Size Used Avail Use % Mounted on
/Dev/sdb2 ext4 30G 5.2G 23G 19%/
Tmpfs 1.8G 0 1.8G 0%/dev/shm
/Dev/sdb1 ext4 124 M 31 M 88 M 26%/boot
/Dev/sda1 xfs 26 T 33 M 26 T 1%/data