xgrr.de – the whole not the half

things, thoughts and stuff out of life, daily business and computer science


Linux: Re-Read Partition Tables

You know how it is. Just created a new partition but it is not directly regocnized by the system without a reboot. And rebooting means downtime, going to the data center thus inconvenience. There are a few tricks you can try before having to move your body physicly:

partprobe

Check if the new partition was recognize using dmesg. If that didn’t help try the following:

hdparm -z /dev/sdX

Where /dev/sdX is the device on which you created the new partition.

Recovering lost (Linux) Partitions

During my struggles with the partition table of my RAID, I accidentily deleted partitions on the wrong disk. Very stupid as one of the partitions was part of a LVM Volume Group storing my original data. I tried several tools to recover my partitions.

parted, gpart and rescuept all were not able to get the right partition table back. Then I read something about testdisk. Testdisk was not only able to recover my primary ext3 and swap partition but also recognized the LVM2 partition. And the most usefull feature of testdisk is a progress indicator which is missed painfully with the other tools.

Partitions > 2TB with Linux

It took me a while to figure out how to get my new RAID featuring 5x 1TB WD10EADS working as one unified ext4. The problem lies in the partition table. After trying and testing (for which I have absolutely no time as I’m currently writing on my thesis) I found a good reference how to solve this problem.

The standard partition label (or partition table type) “msdos” does not support more than 2TB partitions. The solution is to use the EFI GPT partition table. With Debian the support for this partition needs to be enabled in the Kernel specificly otherwise (which just happend to me after copying ~ 800GB) the partition is not readable or of limited size after reboot.

If you struggle with large disk and partitions check out this straight forward howto on creating the right partition labels and activating support for them in the Kernel.