Migrating disk
I had in LJ the final story of the failed disk, so, having woken up in the mood of bloggin', it saves me a precious time :-). Lots of console output and boring stuff, you know, but here it goes:
The failing setup were two discs I synced manually from time to time, their partition table:
Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003b1cf
Device Boot Start End Blocks Id System
/dev/sda1 * 1 122 979933+ 83 Linux
/dev/sda2 123 365 1951897+ 82 Linux swap / Solaris
/dev/sda3 366 1581 9767520 83 Linux
/dev/sda4 1582 24321 182659050 5 Extended
/dev/sda5 1582 2189 4883728+ 83 Linux
/dev/sda6 2190 2554 2931831 83 Linux
/dev/sda7 2555 2676 979933+ 83 Linux
/dev/sda8 2677 24321 173863431 83 Linux
And mount points:
/dev/sda1 918322 445462 423864 52% /
/dev/sda3 9614148 5303228 3822544 59% /usr
/dev/sda5 4806904 3629392 933328 80% /var
/dev/sda6 2885780 1107812 1748652 39% /opt
/dev/sda7 918322 8256 861070 1% /tmp
/dev/sda8 171134396 135680768 35453628 80% /home
This setup, appart of the manual sync, had some issues to be addressed:
- Because of packaging activities /var was always nearly full, so it had to be increased
- Because of doubling the memory some months ago, there was less swap than current RAM size (2G), also something to fix
The hardware choice wasn't very difficult, as I tend to like Seagate, so balancing price, capacity and availability decided for a couple of
ST3500418AS. These are SATA-II, while my motherboard is SATA-I only but aren't they supposed to be backwards compatible? Well, they are, but you have to setup a jumper to lower interface speed, otherwise the disc isn't even recognized by the motherboard.
Buying the discs had some more difficulties. First tried
Alternate, but this time they pretend me to pay the
SGAE[es] tax for media (which is around 12 euros
per disc), despite I clearly explained these were system discs to be mounted in RAID (and the tax is supposed only to apply non-system drives). Phoned them even, but no way, so I finally rejected the discs and went
Optize, which doesn't seem to have the supposedly legal problem Alternate has with declaring system discs. They were served on time and for less than 90 euros, so bravo for them
:).
After having the bare metal, initially these options for migration were considered:
- Buy a 2.5 disc, copy current data (a 250 Gb disc is enough), install the new system, copy back
- Buy a hard disc enclosure for the remaining good disc, install the new system, use the enclosure to copy data back
- Install new system in one disc (sda), copy data from current disc (sdb), replace old disc with second and setup RAID on a running system
But in the end I got it with a fourth option based on this later one: install a new system with all the RAID setup, disconnect second drive (like if the array had failed), reconnect and copy contents of old drive to new system, restore second RAID drive and add it again to the array, so it gets synced again. Nothing to buy and more fun to see how fast the MD rebuilds the array.
So finally this is the new partition table:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a9eb5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 134 1076323+ fd Linux raid autodetect
/dev/sda2 135 620 3903795 82 Linux swap / Solaris
/dev/sda3 621 2322 13671315 fd Linux raid autodetect
/dev/sda4 2323 60801 469732567+ 5 Extended
/dev/sda5 2323 3416 8787523+ fd Linux raid autodetect
/dev/sda6 3417 3538 979933+ fd Linux raid autodetect
/dev/sda7 3539 12170 69336508+ fd Linux raid autodetect
/dev/sda8 12171 60801 390628476 fd Linux raid autodetect
And mount points:
/dev/md0 1059264 263360 742096 27% /
/dev/md1 13456532 1703152 11069820 14% /usr
/dev/md2 8649480 1365644 6844464 17% /var
/dev/md3 964408 17632 897784 2% /tmp
/dev/md4 68248448 184216 68064232 1% /opt
/dev/md5 384497716 132355408 252142308 35% /home
BTW, after all I did buy the SATA enclosure for the remaining disc, so I have another 200Gb for pr0n
;-).
Syndicated 2009-10-29 06:24:51 from Ricardo Mones