root restore onto a logical volume
Heinz:
I've posted to various newsgroups, combed through FAQ's, and can't find an answer to my problem.
I have my root "/" on a logical volume /dev/Volume00/RootVol, which is in turn mounted on a software RAID-5 volume, /dev/md1. I wanted to test my crash recovery, i.e. see if my backups were working. So rather than test it on my working system, I decided to create a new logical volume, /dev/Volume00/TestRoot. I did the following:
1. Boot from cd to shell
2. Manually start my raid volumes via raidstart
3. Manually activate my logical volumes via pvscan, vgscan, lvscan,
lvchange.
4. Create a new logical volume, /dev/Volume00/TempRoot.
5. Mount /dev/Volume00/TempRoot
6. Restore from tape to TempRoot
7. Change /tmp/TempRoot/etc/fstab to reflect new root location
"/dev/Volume00/TempRoot" instead of /dev/Volume00/RootVol
8. Create a test entry in /tmp/TempRoot/etc/lilo.conf with the new
root location "/dev/Volume00/TempRoot" and run lilo.
9. Reboot
When my kernel gets to the point where it need to access "/" I get an error, "cannot mount /dev/Volume00/TempRoot, bad superblock, try e2fsck -b 8193, etc. etc. etc.". When it dumps me to a shell and I run "vgscan" I get "no volumes found" yet, when I run "pvscan" it lists one volume found "Volume00" on /dev/md1.
Did I miss something in my restore? Do I need to restore a configuration of some sort? I have read through the manpages on vgcfgbackup and vgcfgrestore and believe that these write out configurations to the physical volumes. As I can boot my old root (or boot from cd) and both see and mount /dev/Volume00/TempVol I'm sure there's nothing wrong with my volume group configuration on the disks.
Sorry to ask such a question, but as I said I've looked and looked and looked for answers elsewhere to no avail.
Any answer greatly appreciated.
Thanks
Dave
Quoted 4 lines · David Spear <dspear <at> telus.net> writes:
Did I miss something in my restore? Do I need to restore a configuration of some sort? I have read through the manpages on vgcfgbackup and vgcfgrestore
and believe that these write out
Quoted 5 lines
configurations to the physical volumes.
As I can boot my old root (or boot from cd)
and both see and mount/dev/Volume00/TempVolI’m sure there’s nothing wrong with my volume group configuration on the disks…
Okay, solved my own problem. My backup of root "/" that I restored onto the new logical volume /dev/Volume00/TempVol was lacking the block device to access TempVol. A simple:
# mknod /dev/Volume00/TempVol b 58 4
was all I needed and up she came. I have a vague recollection that one of the manpages for an lvm utility mentioned something about backup/restore of special files but I can't remember which one...