On Wed, Mar 31, 2010 at 02:18:39PM +1100, Nigel Allen wrote:
> 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.

Only 160 gigs, hmmm.

> 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.

Grub2 is good for that (1.97+whatever).

> 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.

You can use pvmove to move the physical extents on LogVol00 from one
physical drive to another, but (1) it takes a long time and (2) you
have no redundancy while you are doing it. I've done it and sometimes
it's the best option.

Also USB connected drives are not as reliable as IDE/SATA - I have
found the interface can somehow overload and the device becomes unusable
until unplugged/replugged. So I would never use pvmove to move an active
filesystem from a directly connected disk to a USB-connected disk.

In your situation I would:

  - copy the filesystems to USB
  - format+RAID1 the two new drives how you like it on another computer
  - copy the filesystem from USB to the new drives on another computer
  - swap new drives for old
  - make the new drives boot on the target computer

This setup makes sure you always have a working system to fall back
to (the original drives) or a backup (USB 1.5T).

Also if you can't get both new drives onto another computer at one time,
you can format one drive and create a RAID1 array with a missing device;
copy your data onto one disk, and when you put both drives into the target
machine you hot-add the 2nd disk to the array and it will sync up all
your data automatically.

Finally for about $35 you can buy USB adapters for SATA + IDE so you can
plug one of your new drives into the target computer and bypass the 1.5T
backup drive.

Nick.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to