LinHES Forums
http://forum.linhes.org/

LVM messup now can't connect to the backend.
http://forum.linhes.org/viewtopic.php?f=6&t=15557
Page 1 of 1

Author:  tophee [ Fri Jun 08, 2007 10:19 am ]
Post subject:  LVM messup now can't connect to the backend.

Hi,
I've just tried to upgrade my mythbox with a larger SATA drive and lvm. I attempted to follow the LVM how-to from the wiki and messed up.

After backing up my current config, I ran fsdick to create an additional partition. It didn't recognise my new harddrive, so instead (and rather foolishly I can see now) I ran create_lvm.sh /dev/hda3 /dev/sdb1 expecting this to sort it out.

It didn't and a little later after a reboot I realised I could no longer connect to the backend.

Ah-ha, I thought, I know I've a good back up. I'll autoupgrade and that will sort everything out. Unfortunately not.

Although I've a good backup somewhere I can't upgrade to it.

I got some messages about not being able to start apache2, which I think I've solved by editing /etc/fstab to remove the lines dev/vg/myth /myth/auto defaults,auto 0 2
Still can't bring up the backend.
I've taken some ideas from here: http://mysettopbox.tv/phpBB2/viewtopic.php?t=15478&highlight=lvm
but to no avail.
Help please. Really, help...

Author:  slowtolearn [ Fri Jun 08, 2007 10:34 am ]
Post subject:  Re: LVM messup now can't connect to the backend.

tophee wrote:
Hi,
I've just tried to upgrade my mythbox with a larger SATA drive and lvm. I attempted to follow the LVM how-to from the wiki and messed up.

After backing up my current config, I ran fsdick to create an additional partition. It didn't recognise my new harddrive, so instead (and rather foolishly I can see now) I ran create_lvm.sh /dev/hda3 /dev/sdb1 expecting this to sort it out.

...
I've taken some ideas from here: http://mysettopbox.tv/phpBB2/viewtopic.php?t=15478&highlight=lvm
Such as?

Need much more information:
    What is getting mounted?
    What happens if you try to mount the LV manually (do you still have an LV configured)?
    What do you see in /var/log/mythtv/mythbackend.log?
    Is there a filesystem defined on /dev/sdb1?

Author:  tophee [ Fri Jun 08, 2007 11:27 am ]
Post subject: 

I don't think anything is getting mounted.
I've not a LVM working, so I decided to go on a different tack.
The most telling line in the /var/log/mythtv/mythbackend.log is No settings found for this machine's BackendserverIP
I don't think there is a /dev/sbd1
And from that thread I took:
update-rc.d -f lvm remove

Author:  slowtolearn [ Fri Jun 08, 2007 11:57 am ]
Post subject: 

You need to provide much more specific information:

tophee wrote:
I don't think anything is getting mounted.
Use mount and post the output.

slowtolearn wrote:
What happens if you try to mount the LV manually

tophee wrote:
The most telling line in the /var/log/mythtv/mythbackend.log is No settings found for this machine's BackendserverIP
I don't think there is a /dev/sbd1
Use cfdisk /dev/sdb and post the output.

tophee wrote:
And from that thread I took:
update-rc.d -f lvm remove
That's it? That will remove the LVM startup scripts, that's all.

Are you trying to setup an LV or revert back? Do you still have the /dev/hda3 line in /etc/fstab? And what, if anything, is still on /dev/hda3 (probably mounted into /myth, so do an ls -la /myth)

Author:  tophee [ Fri Jun 08, 2007 12:13 pm ]
Post subject: 

Sorry for the spartan replies.
I am trying to revert back to the earlier state.Have been trying to get this to work while appeasing the other half who wanted feeding and to watch some of her shows... (Appologies dear...)
Anyhow, mount brings back:

    root@mythtv:/home/mythtv# mount
    /dev/hda1 on / type ext3 (rw,errors=remount-ro)
    usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
    tmpfs on /dev/shm type tmpfs (rw)

cfdisk /dev/sdb produces a fatal error and cfdisk exits.

And ls -la /myth produces
      root@mythtv:/home/mythtv# ls -la /myth
      total 80
      dr-xr-xr-x 20 root root 4096 Jun 8 16:39 .
      drwxr-xr-x 24 root root 4096 Jun 8 16:38 ..
      drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 archive
      drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 backup
      drwxr-xr-x 2 mythtv mythtv 4096 Jun 8 16:38 democracy
      drwxr-xr-x 3 mythtv mythtv 4096 Jun 8 19:12 folding@home
      drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 gallery
      drwxrwxr-x 6 root root 4096 Jun 8 16:38 games
      drwxrwxrwx 2 www-data www-data 4096 Jun 8 16:38 image_cache
      drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 ipodfeed
      drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 motion
    drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 music
    drwxrwxr-x 4 mythtv mythtv 4096 Jun 8 17:02 phone
    drwxr-xr-x 2 mythtv mythtv 4096 Jun 8 16:39 pretty
    drwxr-xr-x 4 root root 4096 Jun 8 16:39 rrd
    drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 stream
    drwxrwxrwx 2 mythtv mythtv 4096 Jun 8 16:39 streamtv
    drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 tmp
    drwxrwxr-x 2 mythtv mythtv 4096 Jun 8 16:38 tv
    drwxrwxr-x 4 mythtv mythtv 4096 Jun 8 16:39 video

Author:  tophee [ Fri Jun 08, 2007 12:17 pm ]
Post subject: 

Actually, I've just checked the contents of myth/tv an its empty, as is the contents of /myth/restore. Looks like game over?

Author:  slowtolearn [ Fri Jun 08, 2007 1:00 pm ]
Post subject: 

tophee wrote:
Sorry for the spartan replies.
I am trying to revert back to the earlier state.Have been trying to get this to work while appeasing the other half who wanted feeding and to watch some of her shows... (Appologies dear...)
Anyhow, mount brings back:

    root@mythtv:/home/mythtv# mount
    /dev/hda1 on / type ext3 (rw,errors=remount-ro)
    usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
    tmpfs on /dev/shm type tmpfs (rw)
Assuming what you have already tried hasn't whacked the original /dev/hda3 partition, try re-adding the /dev/hda3 line to your /etc/fstab. Should look something like
Code:
/dev/hda3  /myth  ext3  defaults,auto  0  2

Then reboot. This should restore your original /myth stuff. If it doesn't, try mount /dev/hda3 /myth and post whatever that spits out...

Author:  tophee [ Fri Jun 08, 2007 1:35 pm ]
Post subject: 

Hi slowtolearn,
Thanks for the advice so far....
Adding this
Code:
/dev/hda3  /myth  ext3  defaults,auto  0  2
to fstab didn't allow the backend to connect..

While mount
Code:
/dev/hda3 /myth
produced this:
    root@mythtv:/home/mythtv# mount /dev/hda3 /myth
    mount: /dev/hda3 already mounted or /myth busy
    mount: according to mtab, /dev/hda3 is already mounted on /myth


I'm still not connecting to the back end, could this stil be the problem?

Author:  slowtolearn [ Fri Jun 08, 2007 1:53 pm ]
Post subject: 

tophee wrote:
Hi slowtolearn,
Thanks for the advice so far....
Adding this
Code:
/dev/hda3  /myth  ext3  defaults,auto  0  2
to fstab didn't allow the backend to connect..

While mount
Code:
/dev/hda3 /myth
produced this:
    root@mythtv:/home/mythtv# mount /dev/hda3 /myth
    mount: /dev/hda3 already mounted or /myth busy
    mount: according to mtab, /dev/hda3 is already mounted on /myth

I'm still not connecting to the back end, could this stil be the problem?
Was this after the reboot, with /dev/hda3 in your fstab? If so, then the mount worked as expected. Unfortunately, I suspect that if you check your /myth/tv, /myth/restore directories you will find them empty (?). If so,
tophee wrote:
Looks like game over?
Looks like it, I'm afraid.

Author:  tophee [ Fri Jun 08, 2007 2:45 pm ]
Post subject: 

BUM.

Thanks anyway.

If it's any constellation I've learnt something... mostly if it ain't broke don't mess with it. More, about where things are.
Still, I'll reinstall on my 500g sata drive and play with that... change the file system, add several other hdds before I start recording etc. (and she says get it'll be easier... whatever....)

Really though, thanks for the help. If you're ever over this way, pm me and I'll buy you a pint.

Author:  tjc [ Fri Jun 08, 2007 5:42 pm ]
Post subject:  Re: LVM messup now can't connect to the backend.

tophee wrote:
It didn't recognise my new harddrive, so instead (and rather foolishly I can see now) I ran create_lvm.sh /dev/hda3 /dev/sdb1 expecting this to sort it out.

This was where my stomach hit bottom. :shock: :|

You're most likely hosed. You basically replaced the exisiting volume information with the volume information appropriate for an LVM drive. The partition types, possibly superblocks, ... This is a destructive operation, which is why it's generally recommended as part of a fresh install. There may still be intact data there, but I'm not sure how feasable recovery is.

Author:  tophee [ Sat Jun 09, 2007 3:36 am ]
Post subject: 

tjc - Thanks for the explanation. I Will have a fresh build shortly. Well, on the plus side a clean install will get rid of any residue from previous installs that were causing some slightly irregular behaviour.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/