Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Due to clvmd stalling the kernel (http://serverfault.com/questions/226466/lvm-running-vgscan-causes-clvmd-to-block) I decided to hard reboot the host because the soft reboot stalled. But when it booted up it fails to run e2fsck on one of the logical volumes and then fails to boot. The following error message I maually entered because I can't copy and paste this since from the serial console.

Checking filessytems
/dev/mapper/vg_gothamdb1-lv_root: clean, 59708/5120000 files, 712853/20480000 blocks
/dev/sda1: clean, 39/128016 files, 51688/512000 blocks
fsck.ext4: No such files or directory while trying to open /dev/mapper/vg_gothamdb1-lv_home
/dev/mapper/vg_gothamdb1-lvhome:
The superblock could not be read or does not describe a correct ext2 filesystem. if the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with and alternate superblock:

Note that I have 2 volume groups in this setup. One of them is part of the cluster. The other contains logical volumes for home, root and swap. In other words the layout looks like this:

vg1:
  lv_root
  lv_home
  lv_swap
vg2 (part of a cluster): 
  lv_stuff

The weird thing is that lv_home stuffed up even though it's not in the volume groups thats in the cluster.

How can I fix this? lv_home should exist as a logical volume. I just want to recover lv_home.

share|improve this question

1 Answer 1

I don't dare answer this because it sounds like it is clvm specific and I don't know clvm. But I wouldn't assume that something that works with the clvm layer, even with a single node, works the same without. (edit: I see this vg is outside the cluster)

Now for some nonspecific advice: keep everything readonly (naturally), and if you recently made any change to the volumes, you'll find a backup of previous layouts in /etc/lvm/{backup,archive}. Those are applied with vgcfgrestore --file /path/to/backup vg. One is your current configuration, and the rest are only useful if the lvm metadata was lost, erased, or got out of sync. Before trying to roll back check if the dates make sense, and diff with your current configuration (do a vgcfgbackup to some external location).

share|improve this answer
    
Thanks. I had a look in /etc/lvm/backup and it has information about what lv_home is. Can I use this somehow to recover that logical volume? –  sashang Jan 28 '11 at 0:57
    
I added more info. You probably need to understand what went wrong before trying to repair; this may thrash your data. –  Tobu Jan 28 '11 at 18:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.