Re: Copy data from a failed LVM drive

2009-03-22 Thread M. Lewis


Stefan Monnier wrote:

I had a drive failure (SMART errors) on a drive with LVM. I've replaced the
drive, but now need to copy the data from the old drive. How can I do this?
Vgscan only shows the VG of the 'current' drive.

Are both drives connected?  If so, have you created different VGs on
each drive?

Yes, both drives are connected and have different VGs.


Hmm... so they have different VGs but `vgscan' only shows one of
the two?
That's odd.  How are the drives connected?  What does pvscan -vvv say?

FWIW, here's how I'd ideally do the replacement:
1 - plug in the new drive.  Let's say it appears as /dev/sdb
2 - partition it with `fdisk' so I have 1 large partition /dev/sdb1.
3 - pvcreate /dev/sdb1
4 - vgextend VG /dev/sdb1 (where VG is your old volume group name)
5 - pvmove /dev/sda1 (where /dev/sda1 is the physical volume on the old drive)
6 - vgreduce VG /dev/sda1
7 - pvremove /dev/sda1
8 - remove old drive


Stefan


This worked perfectly Stefan. Thank you very much. This made it so easy.

Mike

--

 Congratulations!  You are the one-millionth user to log into our system.
  23:05:01 up  4:24,  2 users,  load average: 0.15, 0.12, 0.04

 Linux Registered User #241685  http://counter.li.org


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Copy data from a failed LVM drive

2009-03-21 Thread M. Lewis


I had a drive failure (SMART errors) on a drive with LVM. I've replaced 
the drive, but now need to copy the data from the old drive. How can I 
do this? Vgscan only shows the VG of the 'current' drive.


Thanks,
Mike

--

 A bad random number generator:  1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1
  15:40:01 up 19:05,  2 users,  load average: 0.12, 0.17, 0.17

 Linux Registered User #241685  http://counter.li.org


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Re: Copy data from a failed LVM drive

2009-03-21 Thread Stefan Monnier
 I had a drive failure (SMART errors) on a drive with LVM. I've replaced the
 drive, but now need to copy the data from the old drive. How can I do this?
 Vgscan only shows the VG of the 'current' drive.

Are both drives connected?  If so, have you created different VGs on
each drive?


Stefan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Copy data from a failed LVM drive

2009-03-21 Thread M. Lewis


Stefan Monnier wrote:

I had a drive failure (SMART errors) on a drive with LVM. I've replaced the
drive, but now need to copy the data from the old drive. How can I do this?
Vgscan only shows the VG of the 'current' drive.


Are both drives connected?  If so, have you created different VGs on
each drive?


Stefan


Yes, both drives are connected and have different VGs.

--

 To iterate is human; to recurse, divine.
  16:30:01 up 19:55,  2 users,  load average: 0.38, 0.27, 0.22

 Linux Registered User #241685  http://counter.li.org


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Re: Copy data from a failed LVM drive

2009-03-21 Thread Stefan Monnier
 I had a drive failure (SMART errors) on a drive with LVM. I've replaced the
 drive, but now need to copy the data from the old drive. How can I do this?
 Vgscan only shows the VG of the 'current' drive.
 Are both drives connected?  If so, have you created different VGs on
 each drive?
 Yes, both drives are connected and have different VGs.

Hmm... so they have different VGs but `vgscan' only shows one of
the two?
That's odd.  How are the drives connected?  What does pvscan -vvv say?

FWIW, here's how I'd ideally do the replacement:
1 - plug in the new drive.  Let's say it appears as /dev/sdb
2 - partition it with `fdisk' so I have 1 large partition /dev/sdb1.
3 - pvcreate /dev/sdb1
4 - vgextend VG /dev/sdb1 (where VG is your old volume group name)
5 - pvmove /dev/sda1 (where /dev/sda1 is the physical volume on the old drive)
6 - vgreduce VG /dev/sda1
7 - pvremove /dev/sda1
8 - remove old drive


Stefan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org