
Recently I got a new hard drive (3TB) for my Linux box at work. I didn’t realize that it is problematic / nightmare to do such a simple work.
First, if you try to use fdisk to add the drive, it won’t work. Or I should say… it works, but it only give you a 2TB usable space. This is a limitation of fdisk, because it can handle up to 2^32 -1 sectors (or 2TB). That’s why fdisk is not a solution here.
It seems that the only solution is using parted.
sudo parted /dev/sdd
It will return something like this:
GNU Parted 2.3 Using /dev/sdd Welcome to GNU Parted! Type 'help' to view a list of commands. (parted)
First, we want to create a label:
(parted) mklabel gpt Warning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? Yes
Then, we want to specify the unit:
(parted) unit TB
And tell parted to use all available space:
(parted) mkpart primary 0 -0
Next, we need to review the summary:
(parted) print Model: ATA WDC WD30EZRX-00M (scsi) Disk /dev/sdd: 3.00TB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 0.00TB 3.00TB 3.00TB ext2 primary
As you can see, the size is 3TB. Don’t worry about the file system for now (ext2). If it looks good to you, now we need to leave parted.
(parted) quit Information: You may need to update /etc/fstab.
Next, we need to format the partition:
sudo mkfs.ext4 /dev/sdd1
After few seconds, it will give you some more information about your drive:
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=1 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Now you can use your drive, such as mounting or putting it into /etc/fstab
sudo mount /dev/sdd1 /mnt/ df /dev/sdd1 2.8T 42G 2.6T 2% /mnt
That’s it! Enjoy your new disk.
–Derrick
If you found this solution useful, would you like to visit the following sponsors?

5 Responses to “How to Install a 2.5TB, 3TB drives on Linux”
Trackbacks/Pingbacks
- Seagate 3TB USB hard drive does not plug and play in Linux Mint 12 - [...] http://icesquare.com/wordpress/how-t...rive-on-linux/ [...]

Are you sure this is alright?
Look: “Sector size (logical/physical): 512B/4096B”
For full performance you should align logical/physical sectors both to 4K (4096 bytes), otherwise performance will be severely impacted.
Thanks very much for this. I just installed 2, 3TB drives and was having some difficulties getting them to work. I basically did a cut/paste of this page, and everything worked straight away.
Thanks again!
Did that to a WD live 3tb USB3 HDD, no problems except… Dolphin shows a 6% usage (2.7TB partition, 2.5TB free) while df shows 1% usage… Any ideas? I just got the drive so the whole 2TB limit is a new subject to me…
36628313 blocks (5.00%) reserved for the super user
answered my own question just by reading the log… sound a bit much for a storage drive, but tune2fs can fix that…
I think that’s normal. First of all, 3TB in Western Digital means 2.7 TB in Linux (because they have different definition on TB). By default, Linux reserves some space for its own purpose (e.g., the lost+found directory etc). If you really want to maximize the usable space, go with a different Unix like FreeBSD with ZFS. That will give you more usable space.
–Derrick