Author |
Message |
rkshack
|
Posted: Fri Apr 18, 2008 10:34 pm |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
Everything was working well with my system. Last night my system froze. I rebooted today and I got a message to run fsck. I ran it. I rebooted the computer again and I can not access my lvm that I had set up. I had /dev/vg/myth mounted to myth. Nothing is there currently. I have looked in lvm with lvdisplay etc and the computer sees the logical volume. Help I am not sure where to go next.
Rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
tjc
|
Posted: Fri Apr 18, 2008 10:38 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Have you tried the recreate_lvm.sh script? It's nondestructive and should do everything needed if the VGs are just not being recognized.
Also see the disaster recovery pages on the wiki for more things to try.
|
|
Top |
|
 |
rkshack
|
Posted: Fri Apr 18, 2008 11:15 pm |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
This is what I got with the command:
Reading all physical volumes. This may take a while...
Found volume group "vg" using metadata type lvm2
Unmounting drives
Fixing up /etc/fstab
Restoring /dev/vg/myth
1 logical volume(s) in volume group "vg" now active
Shutting down LVM Volume Groups...
0 logical volume(s) in volume group "vg" now active
Setting up LVM Volume Groups...
Reading all physical volumes. This may take a while...
Found volume group "vg" using metadata type lvm2
1 logical volume(s) in volume group "vg" now active
mount: you must specify the filesystem type
Setting LVM to start on boot.
System startup links for /etc/init.d/lvm already exist.
How do I specify the filesystem type?
rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
cliffsjunk
|
Posted: Sat Apr 19, 2008 2:45 am |
|
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
|
When mount says that you must specify a file system type it usually
means that the automatic fs type detection is failing and that usually
means that the file system is badly broken.
I would run fsck on it before mounting it by shutting down with
a reboot and a forced fsck at startup thus: Code: shutdown -rF now You can tell mount to mount an ext3 fs with the -t parameter thus: Code: mount -t ext3 /dev/mapper/vg /myth
Cliff
_________________ R5F27 using R5F1 Nvidia drivers
HD-5500 analog from NTSC Sat Rx, with OTA DVB too
GeForce MX-440 SVideo tvout to a TV
Older dual core 3.4ghz Intel CPU
Asus P5PE-VM Motherboard
2 GB RAM
1 TB LVM2
VirtualBox
Samba
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 7:58 am |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
When I type in:
mount -t ext3 /dev/mapper/vg /myth
I get:
mount: special device /dev/mapper/vg does not exist
I entered
mount -t ext3 /dev/vg/myth /myth
and I get:
mount: wrong fs type, bad option, bad superblock on /dev/vg/myth,
missing codepage or other error
What am I doing wrong?
rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 9:11 am |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
I changed auto to ext3 in fstab. Now I get the below error in fsck log:
fsck 1.40-WIP (14-Nov-2006)
fsck.ext3: Bad magic number in super-block while trying to open /dev/vg/myth
/dev/vg/myth:
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 an alternate superblock:
e2fsck -b 8193 <device>
fsck died with exit status 8
I have not tried e2fsck yet.
rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 19, 2008 10:02 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Well unless you formatted it as xfs or jfs then that is the best hope.
BTW - If you created the FS with large file options (sparse super blocks and such) you may need to do a little math to locate the backup super blocks, mostly just multiplying by the appropriate power of 2.
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 10:11 am |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
I used
e2fsck /dev/sda -nf
and got:
e2fsck: Device or resource busy while trying to open /dev/sda
Filesystem mounted or opened exclusively by another program?
I do not have sda mounted. I went ahead and tried to umount it anyway and nothing happened. How do I stop whats accessing it.
Rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 19, 2008 10:18 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Eeek! DON'T DO THAT! /dev/sda is the whole raw disk!
You want to run it on the partition or in this case LVM volume which contains the file system ( /dev/mapper/vg-myth).
How did you format the LVM when you created it? If you used 4k blocksize try:
Code: e2fschk -b 32768 /dev/mapper/vg-myth
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 11:20 am |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
tjc wrote: Eeek! DON'T DO THAT! /dev/sda is the whole raw disk! You want to run it on the partition or in this case LVM volume which contains the file system ( /dev/mapper/vg-myth). How did you format the LVM when you created it? If you used 4k blocksize try: Code: e2fschk -b 32768 /dev/mapper/vg-myth
I used the -n so I don't think I would cause a problem. What determines -b number to use? How do I know if I used the 4k blocksize?
rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
RacerX
|
Posted: Sat Apr 19, 2008 11:25 am |
|
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 19, 2008 12:26 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
rkshack wrote: I used the -n so I don't think I would cause a problem. It shouldn't, and it's not what I was talking about. The bad device name was what inspired the "yikes!" reaction. rkshack wrote: What determines -b number to use? How do I know if I used the 4k blocksize?
Look at your installation notes? Revisit the directions you followed? If all else fails you can probably just hunt for it trying the various recommended offsets. The magic number checking should minimize the chances of finding a bogus one that way, but it's worth doing the research first.
OBTW - If you haven't looked at the e2fsck manual pages yet it's highly recommended: " man e2fsck" or search for an on-line version with Google. There's lots of good information out there if you look.
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 12:42 pm |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
e2fsck worked. Thank you for all the help. Sorry for the ignorance.
rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 19, 2008 1:02 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Excellent! This might be worth adding to the disaster recovery pages on the wiki. Start with a description of the symptoms, then the diagnostic and recovery steps. (recreating the LVM and running e2fsck with the -b option?)
Thanks!
|
|
Top |
|
 |
rkshack
|
Posted: Sat Apr 19, 2008 4:30 pm |
|
Joined: Sat Oct 29, 2005 6:57 am
Posts: 176
|
I spoke too soon. My computer now starts up fine and I can access /myth without difficulty. My problem now is that recordings are all missing. They are still in /myth/tv. Pretty directory is empty and when I open recorded shows from within mythtv it says there are no recordings.
Rkshack
_________________ 5.5
6150k8ma-8ekrs
Athlon64 3200+
1gb ram
250gb hda
750gb sda
nvidia 6200
central time
|
|
Top |
|
 |