I recently deployed a storage device with 6 TB of storage space and was ready to partition and format 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.
----------------------
[Root @ ~] # Parted/dev/sdb
GNU parted1.8
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 5 (scsi)
Disk/dev/sdb: 6 TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB, 28.0 TB, 6 TB, primary
(Parted) quit
Information: You may need to update/etc/fstab.
After partitioning, format and mount the hard disk.
----------------------------------------
[Root @ ~] # Mkfs. ext3/dev/sdb1
[Root @ ~] # Mount/dev/sdb1/data
This is a success!
[Root @ ~] $ Df-lTh
Filesystem Type Size Used Avail Use % Mounted on
/Dev/sdb1 ext3 6 T 173 M 6 T 1%/data