Large Drives, Partitions and Ubuntu

Filed Under News, Rants

How to partition drives >2Tb and how to have more than 4 partitions on a large drive array.

We struggled with this for a very long time. I had to collate information from many different sources and I thought it might be nice to collect it all here in one tidy little post that may save someone else the trouble of pulling their hair out and suffering replies in help forums like ‘Not exactly a beginner’s question is it?‘. How the hell should I know? I’m a beginner you cunswup!

Firstly you will need to change the disklabel to gpt. I used parted for this but I must stress at this point – DO NOT USE PARTED 1.7.1. This is the version that was shipped with my 7.04 install and to the best of my knowledge is still the one included with 7.1. IT IS BROKEN. Nice of them to update it in the install package since 1.7.1 was released in May 2006.

I installed parted version 1.8.8 – available here. And this is how I did it ….

I have 10 x 500Gb SATA drives configured under and Adaptec 31605 card to run as a single large 4Tb drive (1Tb lost for redundancy). I wanted to split up the drive into 6 partitions. Using parted 1.7.1 would allow me to do this, but as soon as I rebooted, the extra partitions (sdx5 sdx6 etc) were lost. They would not even appear in /dev/sd??.

All commands are executed in the context of root@uberserver:~#, you may need to sudo some commands if you are not root.

apt-get remove libparted parted
apt-get install uuid-dev libncurses5 libreadline-dev build-essential
wget http://ftp.gnu.org/gnu/parted/parted-1.8.8.tar.gz
tar zxvf parted-1.8.8.tar.gz
cd parted-1.8.8
./configure
make

*************************************
I got an error at this point on my system

/usr/bin/ld: /usr/lib/../lib64/libuuid.a(uuidgen.o): relocation R_X86_64_32 against `a local symbol’ cannot be used when making a shared object; recompile with -fPIC

so I had to use make CFLAGS=-fPIC CXXFLAGS=-fPIC
*************************************
make install

And that was that 😀 From the command line I typed parted and this greeted me :

root@uberserver:~# parted
GNU Parted 1.8.8
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted)

From the parted command line I set the disklabel to gpt which resulted in this error (due to having previously tried this with 1.7.1)

Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted — possibly by a program that doesn’t understand GPT
partition tables. Or perhaps you deleted the GPT table, and are now using an
msdos partition table. Is this a GPT partition table?
Yes/No?

I replied yes and removed all my existing partitions. From there I mkparted the new partitions and rebooted. And what do you know … they were there when I rebooted!

I would like to thank publicly philipMac for his post here which I followed mostly to get this working. I would also like to thank rhican for his help troubleshooting the compiler error. Also Xa0z for his patience whilst I constantly wiped out his hard work by generally buggering around with partitions!

I would also suggest that since 1.7.1 is broken, that perhaps it’s not such a good idea to continue to ship it with default installs – or at least allow a working one to be apt-get’d if possible. Maybe the developers could put something on their site even? Until users don’t have to jump through hoops to obtain fixes for simple problems, I fear it will retard the acceptance of Ubuntu into the mainstream.

And speaking of ‘tards, a little fuck you to the cunswup I mentioned earlier. I explained my lack of experience and I had no idea if it was a beginner’s question or not. The very least you could have done, instead of just shitting in the thread and running away leaving your oh-so-witty turd behind, would have been to reply to the response I left -Was I in the wrong place and if so how do I get this fixed.

Behaviour like yours does not endear a community to someone who is frustratedly hunting for what should be a simple solution. I really hope next time you have a problem someone does the same to you. And by God I hope it’s me! Fuck you very much you idiot.