Nigel Allen wrote:
Hi All
Apologies for the repost - I asked this a while ago but there is now
an additional wrinkle^H^H^H^H^H^H^Hopportunity.
I have to do a hard-drive shuffle in the coming weeks.
The machine is a HP DL145 G3 which only has interfaces for 2 x hdd's.
The current disks are 2 x 80GB set up as /boot on /dev/sda1 and (sda2
plus sdb1) are pooled together to make up /dev/VolGroup00/LogVol00.
They are running at 97% full.
I'm about to replace the 2 x 80GB drives with 2 x 1TB drives which
should keep the customer going for a while.
Given that I can't attach all 4 hdds to the system at the same time,
I have plugged in a WD USB drive (1.5TB) so that we have a transfer
mechanism (as well as a second backup online in addition to the tape
backup).
I would like to have the 2 new disks in a RAID-1 array to give them a
little redundancy.
What is the easiest way to get from where I am (2 x 80GB as /boot and
a log vol) to where I want to be (a pair of mirrored drives).
My first thought was simpy to backup everything to the USB connected
drive, rip out the 2 x 80GB and replace them with the 2 x 1TB drives.
Set up the disks as a RAID 1 array. Do a partial install of the OS and
then simply copy everything back where it was.
I'm sure there is a better way than this sledgehammer approach,
probably involving LVM but given my unfamiliarity with LVM I thought I
should ask first.
TIA
Nigel.
Personally I'd create a degraded raid 1 array, DD the whole system onto
it then expand it to fill the space.
Assuming the mdadm on the machine is modern it should pick everything up
and go from there with no changes to the host OS.
There might be some fenangling to tell mdadm its ok to run the array in
a new machine or something like that.
2 reasons for starting with the degraded array,
1, your mainly limited by the USB transfer rate so your only going
to hit 25mbytes /sec max rather than the ~80+ you should be seeing.
2, the USB bandwidth is probably going to be shared on the 2 ports
on the back of the machine, so if you try and run the full array its
going to take twice as long.
Your looking at around 2-3 hours to do the transfer this way (the
degraded array).
Your other option is to setup the raid array in another machine, as a
full array. (that's going to take HOURS btw, it has to synch the 2
disks, copying all the 0's over ;->)
Then once the array is healthy power down the other machine, stick
the disks into the temp machine and DD away, should take around 30
minutes. While your in the other machine you can expand the volumes and
file systems as well if that needs to be done offline, otherwise power
up on the new drives and expand them online.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html