I have a 3TB HDD that I want to run Ubuntu 14.10 server as a file server. How can I format the drive so it will work?
-
2For a server is recommended to install 14.04 LTS, it has 5 years of support vs 14.10 that only has 6 months. – 0x2b3bfa0 Mar 15 '15 at 17:18
2 Answers
If you install Ubuntu in EFI/UEFI mode, it will use GPT by default. It will probably also use GPT when you install to an over-2TiB disk, although I've recently discovered some cases when it won't do that. (This was when using MAAS to do a fast-path install in BIOS/CSM/legacy mode, though, which is relatively exotic.)
If you want to be 100% sure of what you're getting, create your partitions ahead of time. If you use gdisk, you'll be pretty much guaranteed of getting GPT, unless you jump through gdisk's hoops to translate to MBR. If you use GParted or parted, be sure to create a partition table of type GPT.
If you boot in BIOS mode, I recommend you create a BIOS Boot Partition and a separate Linux /boot partition early on the disk (under the 2TiB mark; but as the first two partitions is likely to be simplest). The reason is that there's a bug that prevents some systems from booting when critical boot files are above the 2TiB mark. This seems to be primarily a BIOS bug, but the workaround is to be sure that the BIOS isn't asked to access anything beyond 2^32 sectors itself, which can be done by putting /boot and the BIOS Boot Partition below that point. Note that this is a BIOS bug; it doesn't affect any EFI when booted in EFI mode, AFAIK.
- 43,599
- 7
- 62
- 102
- find out some information about your new disk.
type:
lsblk
note down the /dev/sdXX
- now creating a GPT and new partition.
type:
fdisk /dev/sdXX
replace /dev/sdXX with your disk. example: /dev/sdc
type the following:
d
enter
w
enter
this makes sure you deleted any existing partitions... but if its a new HDD then there probably werent any. it then writes the changes. you can press (p) to print any partions that might be there. if you see some listed then just delete them.
press UP a few a couple times and you should see your fdisk command or just retype it.
now that your back in fdisk type:
g
enter
w
enter
same as above retype your fdisk command to get back in or press up a couple times to find the command.
now that your back in fdisk type:
m
this will give you list of other things to do. the (n) command creates a new partition. by default it will be set to "linux". you can change this by using the (t) command after the partition is created.
after you (w)rite your changes to save them then you probably want to format the disk. depending on what you want the command will change. it will be something like this though..
mkfs.ext4 /dev/sdxx
mkfs.ntfs /dev/sdxx
where "sdxx" is going to be the partition not the entire disk. so it will be something like sdc1, sdc2, sdc6, etc.
- 136
- 10