View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Jun 29, 2009 8:20 pm 
Offline
Joined: Tue Jan 24, 2006 1:29 am
Posts: 157
Location: Brisbane, Australia
Until about a month ago I had a very nice R5F27 install running.

It booted to an IDE disk that also held my /myth partition.

I also had an LVM setup with 2 SATA disks that stored all my music and movies.

The boot hard disk failed.. leaving me with all my files on the LVM intact but no way to recover them.

Is there any way to recover these files? I have a new hard disk for the box (replaced under warranty) and I am looking to install the latest R6 on it. Once R6 is up and running can I add the existing LVM disks?

Thanks


Last edited by soundoff on Sat Jul 04, 2009 6:39 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 30, 2009 5:49 am 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
I assume the LVM is on two separate disks from the boot disk (ie. you have 3 disks) so yes you should be fine. The configuration and volume labels should be on the disks though you may have to update fstab and possibly lvm admin etc. to identify how you want it mounted. Since you have an lvm, you should know what to do here.

Personally, I would rebuild an R5F27 and ensure the LVM is fine before going to R6. While I see no obvious reason for an issue moving it to R6, if something goes wrong it is one more thing to wonder about. Building an R5F27 is usually 20mins so worth the step.

Further, once you boot it in R5F27, you should consider making a backup of the contents before performing the upgrade to R6.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 30, 2009 7:01 pm 
Offline
Joined: Tue Jan 24, 2006 1:29 am
Posts: 157
Location: Brisbane, Australia
yes 3 disks in total.

I wouldnt say i know LVM well.. this is the only LVM i have set up and it was ages ago ;) I don't remember anything about setting it up but it was probably all from the wiki.

Thanks for the advice. I will give it a go


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 30, 2009 7:43 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Yes. Very possible. Did the LVM volume reside entirely on the two SATA drives? Do you have a current backup on the LVM volume?

If yes to both, just follow the upgrade instructions in the R5.5 Hints. Including the bits about rediscovering a SATA volume, covered under Phase 2a, step 1.

If yes to only the first question, Do an install to just the new root disk, then use the recreate_lvm.sh script to get the volume back, then follow the disaster recovery instructions on the wiki to get it to recognize your recordings.

If no to both, then you're probably boned. One of the big problems with LVM is that it doesn't recover incomplete volumes, at least it didn't the last time I checked.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 30, 2009 8:49 pm 
Offline
Joined: Tue Jan 24, 2006 1:29 am
Posts: 157
Location: Brisbane, Australia
OK

I dont care about my old recordings / database / setup. i can deal with starting from scratch. Its a backend only system so its not that hard to get up and running.

I dont have a backup on the LVM. Pretty stupid not to I know...

the LVM did reside entirely on 2 seperate SATA disks. sounds like the recreate_lvm.sh script is exactly what i need.

The recordings are not on the LVM. They were on the primary disk that died. They are gone forever ;)

Thanks TJC


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 04, 2009 8:48 am 
Offline
Joined: Tue Jan 24, 2006 1:29 am
Posts: 157
Location: Brisbane, Australia
I am now running R6.00.08. I am trying to recover my LVM disks.

The good news: Looks like the data is still there.
The bad news: I can't figure out how to get the vg to automatically mount after a reboot.

I have added the following to /etc/fstab

Code:
#LVM volume group
/dev/vg/storage /storage auto defaults,auto 0 2


After a reboot i tried:

Code:
cd /storage
ls


But the directory is empty.

If I then run the following commands i can see my data.

Code:
[root@mythtv storage]# modprobe dm-mod
[root@mythtv storage]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg" using metadata type lvm2
[root@mythtv storage]# vgchange -ay vg
  1 logical volume(s) in volume group "vg" now active
[root@mythtv storage]# mount /dev/vg/storage /storage
[root@mythtv storage]# cd /storage/
[root@mythtv storage]# ls
chronix-metal.m3u  lost+found  mp3 albums  musicvids  videos
chronix.m3u        movies      mp3 other   slideshow  wazee.m3u


Can anyone please explain to me how I can automate this on bootup? I was largely following this wiki page: http://www.knoppmythwiki.org/index.php? ... adeWithLVM

But I cant run these commands as they dont work under arch linux:

update-rc.d lvm start 26 S . stop 82 1 . (Configures LVM to start on boot. Note that there are two periods there to type.)
Then start LVM /etc/init.d/lvm restart

any help appreciated. Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 04, 2009 10:10 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
R6 uses a different init system called "runit". You need to have an lvm script in the /etc/sv directory and a symlink in /var/service to make it an active one. This is done with the add_service.sh script. If you search for "runit" and "add_service.sh" you should find more details.

For example these threads have a fair amount of information:
http://knoppmyth.net/phpBB2/viewtopic.php?t=19573
http://knoppmyth.net/phpBB2/viewtopic.php?t=19621
http://knoppmyth.net/phpBB2/viewtopic.php?t=19736


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 04, 2009 6:51 pm 
Offline
Joined: Tue Jan 24, 2006 1:29 am
Posts: 157
Location: Brisbane, Australia
TJC - thanks very much for your help. Looks like we were off track a little though.

I found the answer here under the heading "Important"
http://wiki.archlinux.org/index.php/LVM

# Make sure you change USELVM="no" to USELVM="yes" in /etc/rc.conf
# Make sure that lvm2 is in the HOOKS section of /etc/mkinitcpio.conf just before the filesystems so that your kernel will find LVM volumes at boot time.

I can now see the files on my LVM after a reboot. Sweet!

To summarise for future reference:

To recover an LVM created in R5F27, into R6.00.08

as root

1. add this line to /etc/fstab
Code:
/dev/vg/storage /storage auto defaults,auto 0 2

2. modprobe dm-mod
3. vgscan
4. vgchange -ay vg
5. mount /dev/vg/storage /storage

Then to make this all happen automatically at bootup:

6. change USELVM="no" to USELVM="yes" in /etc/rc.conf
7. add lvm2 to the HOOKS section of /etc/mkinitcpio.conf just before the filesystems

As all of my limited linux experience has been in debian, I have struggled a bit with the arch linux learning curve. It does seem to be a very nice system though once you get the hang of it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 04, 2009 7:26 pm 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
I think you only need steps 2-5 if you want to use the LVM right away otherwise steps 1,6,7 should be all you need.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 05, 2009 8:13 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
And you should only need step 7 if you need the LVM to boot. For example if you were booting off an LVM volume. The mkinitcpio utility is a replacement for the mkinitramfs and used to create a bundle of modules, firmware, etc. needed to get the kernel up and running before you have a real FS available, and that isn't the case for LVM here.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu