Re: How do I install a 3TB HDD with 4K sectors in ubuntu server?
So where exactly did you got stuck?
In that tutorial parted is not touching the sector size at all. And ignore the comments, some of them are very wrong.
Most of the 4k disks have a physical sector size of 4096 bytes so that 3TB can fit on the plates, but they still have 512B logical sector size for compatibility with OSs that expect one sector to be 512B. That's why when you use the print command in parted to print the details, is says sector size logical/physical 512B/4096B. That's normal.
This "conversion" is done by the intelligence on the disk itself, and it's normal. It's how it should work.
If you can't see the whole 3TB first check in BIOS that it's not limiting the disk size. Maybe you need bios update to support the disk.
Also in that tutorial the guy used parted to create partition starting from 0 which is a mistake. These days you need to start the first parttion on sector 2048 which is equivalent to 1MiB so that the partitions on the disk are aligned for optimal performance.
So, rather than what that guy did in parted, change the unit to MiB, print the disk details which will also print the disk size in MiB, and create the partition (if you only want single partition) starting from 1MiB and ending at the last MiB (or one before the last).
For example, a 3TB disk should have in reality something like 2,861,022 MiB. So creating a single partition spanning the whole disk on a disk device called /dev/sdX would be like (replace the X with the correct letter):
Code:
sudo parted /dev/sdX
unit MiB
mklabel gpt
print (to see the total size in MiB)
mkpart primary 1 2861022
quit
If the disk size is few MiB more or less than 2861022 adjust the ending location.
That's it. After that create the filesystem you want on the partition.
Darko.
-----------------------------------------------------------------------
Ubuntu 18.04 LTS 64bit
Bookmarks