Large Drives, Partitions and Ubuntu

Posted by bb on Tuesday 11th of September 2007 at 12:36 pm;.
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.


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...


Comments

13 Responses to “Large Drives, Partitions and Ubuntu”

  1. rhican on September 11th, 2007 2:03 pm

    This is where it shows that ubuntu isn’t really that fit to run on a server.

    searching, and if non existent, filing a bug at bugs.ubuntu.org is must.

    gentoo has em all 🙂 1.7.1-r1 1.8.6 ~1.8.7 ~1.8.8

    As you can see even gentoo thinks the 1.8.7 and .8 are still “unstable” and 1.8.6 has only been marked stable for 20 days or so..

    Well they probably figured that choosing a stable version was a safer bet at the time.

    There is a good chance that there is a repository with that version of parted. But if there isn’t nothing is stopping you from making one.

    That’s basically how opensource works. Somebody does the work and we all enjoy it. You can’t expect that the ubuntu devs jump through hoops if there is one bug somewhere hit by someone…

    like this guy who hated it there wasn’t an smplayer package
    http://wesley.debianbox.be/packages/

    But perhaps the parted package should be updated in gutsy. But unless you tell them through the bugtrack…

    Ubuntu is conservative qua versions, and it will not backport everything, unless there are good reasons. Which means more stability … but if you really want some feature you might need to go that extra yard.

    And hell compiling a package isn’t that hard either 😛 I recompile all the software on my computer when there is a GCC upgrade.

    In conclusion: great job, you fixed it!

  2. bb on September 11th, 2007 3:01 pm

    rhican,

    I am more than happy to help in creating a repository – I just need someone to help me do that. It’s not quite the Windows environment I’m used to where I could host parted.exe and libparted.dll in a zip 😀

    I think the bug is already reported here so they should be aware. Besides, it is a major problem IMHO for anyone wanting to use > 2Tb.

    And as for “And hell compiling a package isn’t that hard either” … well for some it is, and I’m one of that subset 🙂 With time I hope I get better – for your sake as much as mine else you will tire rapidly of my ‘simple’ questions!

    In conclusion : Couldn’t of done it without your help so thanks again.

  3. Phas on September 12th, 2007 11:23 am

    bb,

    May we know why did you decide to run Ubuntu in your server? Apart from having a name that starts with “Ub” like your UberSever I think nothing would make Ubuntu come to mind if I start thinking of a Linux server, but as you know I’m not exactly a Linux expert.

    😕

  4. bb on September 12th, 2007 12:29 pm

    Phas,

    I knew ab-so-lute-ly less than nothing a couple of weeks ago about Linux. Ubuntu is a friendly-ish distro for a n00b.

    There was no point in me going for a heavy, high end distro – I could never administer it and I probably could have never even got it installed. I’m sure I could have got better performance with a different distro and significantly inferior hardware.

    As I learn more I may find the shortcomings of Ubuntu. In the future I may change. For now, however, I’ll stick with it and hope it manages the basic requirements I have of it. In a few years when and if I exceed Ubuntu’s ability, I’ll have the experience to move to a better distro – hopefully I can move to a distro that will give me more performance. Thus over the life of the server I can maintain a (relative) standard of performance as my skillset increases without the expense of hardware upgrades.

    That and Merlijn is very handy with Ubuntu and he’s helping me install it 😀

  5. Merlijn on September 12th, 2007 12:36 pm

    *coughs*

    WHO is handy? You’re not talking about the guy who did:

    >>apt-get remove nscd

    eeeey cannot login anymore?

    Naaah, you can’t possibly be talking about that guy 😛

  6. RoundSparrow on April 20th, 2008 9:00 pm

    On latest Ubuntu 8.04 release candidate make gives me:

    C99 inline functions not supported. I had to use “make CFLAGS=-fgnu89-inline”. I also had to copy the “libparted-1.8.so.8” file to /lib/ manually.

  7. William on May 18th, 2008 3:33 am

    Thank you, thank you, thank you. I was having the “same” problem, but the latest parted worked. Also thanks to Round Sparrow as that manual lib copy was also needed before parted worked!

    Will

  8. mvanbaak on May 29th, 2008 2:06 pm

    @RoundSparrow:
    I had the same issues but they can easily be fixed.

    Just compile parted with: make CFLAGS=-fgnu89-inline CXXFLAGS=-fgnu89-inline

    After you ran: make install
    You have to run: ldconf
    That will pickup the libs in /usr/local/lib (where the libparted-* is installed)
    That did the job for me.

    Now if only mkfs.ext3 /dev/sda1 would finish …

  9. salst3r on June 11th, 2008 5:14 am

    Woah! Thank you so much for documenting your finding about this parted bug when resizing large partitions. I have Ubuntu 8.04 server installed and the parted version was still at 1.7.x.

    My issue was slightly different, but still your instructions helped! I have Adaptec 3805 RAID controller with 4 1TB drives. I added one more drive and ran into the wall when resizing partitions. There were kernel warning about GPT table being incorrect. The newer parted 1.8.8 fixed this issue.

    Once again, many thanks for documenting this!

  10. salst3r on June 11th, 2008 5:18 am

    As a side note, perhaps you could ammend your instructions for running “ldconfig” after “make install” command.

    This way you don’t need to do a manual copy of newer parted libraries into the main /lib folder. If you are running Ubuntu, make sure your /etc/ld.so.conf.d/libc.conf contains /usr/local/lib folder. After doing “make intall” and before running /usr/local/sbin/parted, issue “ldconfig” command. That should refresh and reconfigure the ld runtime to locate newly installed parted libraries in /usr/local/bin.. and off you go!

  11. Marcus Herou on November 17th, 2009 7:45 pm

    Hi. First of all great article.

    Second 1.7.1 is still shipped in Hardy (even the bugfixed ones), noting that you wrote this article in sep 2007… Guess it never got any attention in the bugtrack ? Karmic Koala have 1.8.8.1.159-1e0e

    Do you have any clue if it is possible to apply a newer parted to a system without losing data ?

    We have three machines which suddenly “dies” every 3-6 months and upon reboot, just a black page with a blinking cursor (same screen as when it dies)… Seems that somehow it loses track of where the bootable partition is.

    Reinstalling the machines solves it since it seems that the underlying partitions are OK and thus can be mounted afterwards. fsck, e2fsck and “browsing” the partitions through a LiveCD as well indicates that everything really is OK except that it cannot be booted.

    It is setting up all the apps, cronjobs, repair half written files etc that takes time (up to a week on this machine) and causes issues with our clients…

    Any hints would mean a lot to us since frankly I hate going to the server facility every three months knowing that I will lose a week of better things to do.

    Is it related to: http://ubuntuforums.org/showthread.php?t=716793&page=2

  12. Marcus Herou on November 17th, 2009 7:48 pm

    Oh and bytw. It would be nice if you could create a readme of all the above findings like

    wget…
    unzip…
    make CFLAGS…
    ldconfig

    Get what I mean ?

    Cheers

    //Marcus Herou

  13. Heather Pfeiffer on June 3rd, 2010 5:04 am

    I am trying to use a multi-disk device with parted 1.8.8, but it has an unrecognized disk label and when I try to do a mklabel gpt it reports all sorts of errors. Is there another application I should use to tell Ubuntu that device /dev/sdb is a multi-disk device? Thanks for any help.

Leave a Reply