LinHES Forums http://forum.linhes.org/ |
|
LVM Recovery after HDD Failure and Rebuild myth directory http://forum.linhes.org/viewtopic.php?f=2&t=13376 |
Page 1 of 1 |
Author: | jessebs [ Mon Jan 08, 2007 1:35 pm ] |
Post subject: | LVM Recovery after HDD Failure and Rebuild myth directory |
One of my LVM drives died and is in the process of being replaced. Is there any way to recover data from the other drive or do I just need to format both of them and forget about it? Also, If I end up reformatting, is there any way to automatically rebuild the /myth file structure? |
Author: | thornsoft [ Mon Jan 08, 2007 1:44 pm ] |
Post subject: | |
There isn't an easy way. It happened to me, and I started over. ![]() |
Author: | jessebs [ Mon Jan 08, 2007 4:08 pm ] |
Post subject: | |
I got my drive, so I formatted both, and ran Code: create_lvm.sh /dev/sda1 /dev/sdb1 which gave: Code: Creating /dev/vg/myth
Physical volume "/dev/sda1" successfully created Physical volume "/dev/sdb1" successfully created /dev/vg: already exists in filesystem Volume group "vg" doesn't exist Invalid argument vg Error during parsing of command line. Setting LVM to start on boot. System startup links for /etc/init.d/lvm already exist. What can I do about the errors? |
Author: | jessebs [ Mon Jan 08, 2007 4:15 pm ] |
Post subject: | |
Easy fix Code: rm -rf /dev/vg
and then ran create_lvm.sh |
Author: | jessebs [ Fri Jan 12, 2007 3:40 pm ] |
Post subject: | |
These are the steps I took after one of my LVM drives failed and I got a replacement. Note that I have it setup so that /myth spans the LVM drives, everything else is on a seperate disk. There arent many steps here, but it took me a long time to figure some of this out, so I though I would make it easy on others. I DID lose all my data on /myth, and I set up LVM using the create_lvm.sh script This assumes that lvm spanned /dev/sda1 and dev/sda2. Change these values to meet your needs. as root: 1. unmount the /myth directory Code: umount /myth 2. Run this command to remove the volume group created before. Code: rm -rf /dev/vg 3. Execute the steps in the LVM wiki - the mount command might not work http://knoppmythwiki.org/index.php?page=LvmHowTo 3. Restore the /myth directory structure -- nice script I wrote - i saved it as rebuild_myth.sh in the /usr/local/sbin/ directory Code: #!/bin/bash # Rebuild the /myth directory # Jesse Bowes # Created Jan 12, 2007 # Command to run on directories CMD="mkdir -p" # Reconstruct /myth directory structure $CMD /myth/backup $CMD /myth/gallery $CMD /myth/game/nes $CMD /myth/game/nes/roms $CMD /myth/game/nes/screens $CMD /myth/game/pc $CMD /myth/game/pc/screens $CMD /myth/game/snes $CMD /myth/game/snes/roms $CMD /myth/game/snes/screens $CMD /myth/game/xmame $CMD /myth/game/xmame/cabs $CMD /myth/game/xmame/flyers $CMD /myth/game/xmame/hiscores $CMD /myth/game/xmame/history $CMD /myth/game/xmame/roms $CMD /myth/game/xmame/screens $CMD /myth/music $CMD /myth/tv $CMD /myth/video/motion $CMD /myth/video/.covers $CMD /myth/tmp #Give ownership to the mythtv user chown -R mythtv /myth 4. Restore your data to /myth if you have it backed up somewhere. 5. Refill database Code: mythfilldatabase 6. Delete any previous recordings that were lost (they are still listed in the database) I hope this helps. Edit: This will be modified shortly as several hidden directories are missing |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |