Nigel Allen wrote:
Hi All
I'm trying to assist a client who is running out of space.
They have an HP DL360G4 with 2 x 160GB Maxtor SATA drives. they want
us to replace them with 2 x 1TB Seagate drives. They are currently
running everything (apart from /boot) from the root partition and are
sitting on around 97% full.
The problem is their current disk set up.
First disk looks like this:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 19216 154248097+ fd Linux raid
autodetect
While the second looks like this:
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 254 2040223+ 82 Linux swap
/dev/sdb2 255 19457 154248097+ fd Linux raid
autodetect
As you can guess, /boot is on /dev/sda1 and root is on the linux raid
partition (RAID 1). The RAID looks like this:
mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.01
Creation Time : Fri Nov 11 11:37:46 2005
Raid Level : raid1
Array Size : 154248000 (147.10 GiB 157.95 GB)
Device Size : 154248000 (147.10 GiB 157.95 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Tue Nov 3 16:40:57 2009
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 034603b7:67d1a2c7:35610b04:82f5961d
Events : 0.2957028
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
What is the best way to replace these and allow for expansion later?
Given that I'll end up with 2 x 1TB and 2 x 160GB drives, it would
have been fantastic to use them all with boot, swap and root mirrored
at device level but the bloody stupid DL360 only has space for 2 x
sata drives in total, internally. Added complication is that it is a
fairly mission critical system so whatever we do we have to do it soon
and have it back up the next morning.
What sayest the collective consciousness of the SLUG?
With Thanks and Regards
Nigel.
nothing nice will come of raid on 2 disks with regards expansion ;->
you need raid 5 to expand the raid array "natively" (ie add more disks
for larger sizes)
otherwise you could do something with LVM but I'm not a fan.
For my clients I set them up with /boot and / as raid 1, you can boot
grub off raid 1 without a problem. then you have identical images on
both drives.
you can then online expand the array (if you swap to larger disks).
there is a tutorial somewhere but basically (from memory) fail disk b,
pull it from the system
put new 1Tb disk in, partition it for arrays, (with the full size) add
them to the running array, let it sync (remember that last step,its
really important ;->)
fail disk A, and repeat
then expand the file system to fill the available space in the raid
partition.
I have successfully done it once or twice with non hot swap drives,
total downtime was about 20 minutes whilst I swapped drives, all the
sizing and syncing was done on-line.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html