Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM disaster - help!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
stdPikachu
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 254
Location: UK

PostPosted: Sun Feb 10, 2008 12:44 pm    Post subject: LVM disaster - help! Reply with quote

So I tried adding a new hard drive to my LVM with the intention of moving the data onto the newer disc (sde) and putting the older disc (sdc) in a different computer, and I appear to have ended up with no data at all.
Original LVM was a JFS partition. Following the instructions here http://www.tldp.org/HOWTO/LVM-HOWTO/removeadisk.html I did the following:
pvcreate /dev/sde
vgextend lvmstor /dev/sde
pvmove /dev/sdc /dev/sde
vgreduce dev /dev/sdc
I then popped out sdc in the hope that the system woud pick up the changes.

Now there's no data at all available in /dev/mapper/lvmstor-storage, nor can I mount it:
Code:
prospero ~ # mount /dev/mapper/lvmstor-storage /mnt/temp/
mount: /dev/mapper/lvmstor-storage: can't read superblock

And a fsck doesn't seem to help either:
Code:
prospero ~ # fsck.jfs /dev/mapper/lvmstor-storage
fsck.jfs version 1.1.8, 03-May-2005
processing started: 2/10/2008 12.40.34
Using default parameter: -p
The current device is:  /dev/mapper/lvmstor-storage
ujfs_rw_diskblocks: Input/output error
ujfs_rw_diskblocks: Input/output error
Superblock is corrupt and cannot be repaired
since both primary and secondary copies are corrupt.

 CANNOT CONTINUE.

Can anyone point out where I went wrong? And does anyone know if it's fixable? I still have both of the old discs available but can't get either of them to mount on their own either.
Code:
prospero ~ # vgscan
  Reading all physical volumes.  This may take a while...
  /dev/dm-0: read failed after 0 of 4096 at 1000198832128: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  Found volume group "lvmstor" using metadata type lvm2
prospero ~ # pvscan
  /dev/dm-0: read failed after 0 of 4096 at 1000198832128: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  PV /dev/sdf1   VG lvmstor   lvm2 [931.51 GB / 0    free]
  PV /dev/sdc1                lvm2 [931.51 GB]
  Total: 2 [1.82 TB] / in use: 1 [931.51 GB] / in no VG: 1 [931.51 GB]
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Feb 10, 2008 1:24 pm    Post subject: Reply with quote

http://www.tldp.org/HOWTO/LVM-HOWTO/removeadisk.html wrote:
Backup Your System


You should always backup your system before attempting a pvmove operation.


Did you follow that step too?

Also, why did you vgreduce dev /dev/sdc, shouldn't it be lvmstor in your case?

How was the old LVM volume and its partitions created? Did you change the size of anything later on? If not, then the data on the disks may not be fragmented, allowing easy data recovery, since pvmove does not actually delete anything from the old disk. It only forgets that it was ever there, so if you search the disc for your partition header you may actually still find it more or less intact. Of course if you did a live move while the partition was mounted, it may be corrupt if data was written on the disk in the meantime.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum