Trouble in LVM land

Merv Curley mervc-MwcKTmeKVNQ at public.gmane.org
Fri Feb 9 20:04:08 UTC 2007


On Wednesday 07 February 2007 20:12, John Van Ostrand wrote:

Hopefully this won't be too confusing, deleting all my original comments. I do 
want to thank you for all the time you took typing all those suggestions and 
Tim's and your additional corrections and hints.

I have put another drive in the box and installed mythtv backend on it.  This 
problem  drive is now hdb and perhaps I can recover the movies that are in 
the /videolv01volume.  Maybe I can continue to run your troubleshooting 
techniques,  I'll try.  

 At any rate, don't spend any more time on this, unless you have spare time 
and think it might give us more insights. I have included some comments re 
your suggestions.

>
> At the Ctrl-D prompt you should be typing the root user's password and
> pressing enter. This will log you into a shell where you will be able to
> type commands.
>
Well normally in the past I haven't tried to fix the problem since booting 
usually continues when I exit the shell, however not this time,  so thanks 
for the reminder to get back to basics.

> While in this shell you should be able to run commands like:
>
> vgscan

vgscan /dev/hda   Locking type 1 initialization failed

> vgdisplay

vgdisplay /dev/hda  gave the same error [?] message
>
> >From the error you mention, "No such device or file", indicates that
>
> device file is not there. This could be because the volume group is not
> active or it was misspelled.
>
> Here are the steps that you need to do and before you do them MAKE SURE
> YOU KNOW WHICH DEVICES ARE USED FOR FILE SYSTEMS AND WHICH ARE IN VOLUME
> GROUPS. These commands may delete data from your disks if you use them
> incorrectly.
>
> 1. Make sure that the physical devices are visible. Use 'sfdisk -l' to
> list disks and partitions. If that's not there try 'fdisk -l'. If you
> can see the disks then that's your problem. Check disk connections,
> controllers, etc and replace the disk if needed.
>

fdisk -l  /dev/hda     lists the contents the same as I showed in my initial 
message, roughly

hda1       150 MB    ext3     /boot
hda2             7 GB    LVM      rootvg
                                rootlv01   /
                                rootlv02    swap
hda3        236 GB     LVM     videovg
                                 videolv01    /video 

However

fdisk -l /dev/hdb          /dev/hdb doesn't contain a valid partition table

Since hdb1 is just an extension of videolv01, this may be normal.  When I did 
the extension, the size of videolv01 changed from 230 GB's to 500+ GB's. I 
assumed that I had done it correctly. I am positive that fdisk created hda1, 
since Tim warned me of this partitioning error. However with no hda1, maybe?


> 2. Ensure that each device is properly setup as an LVM physical volume
> (PV). Use 'pvdisplay /dev/hda1', 'pvdisplay /dev/hda2', etc to make sure
> each disk looks good.  If pvdisplay gives an error it's possible that a)
> a file system was created directly on the partition (like a /boot
> partition) or the physical volume was created on the whole disk device
> (e.g. hdb instead of hdb1.) NOTE: You almost certanly didn't create a PV
> on /dev/hda.
>
I printed your page and made notes as I tried your suggestions,  nothing 
written here, so I guess I had no results for pvdisplay or pvscan.   

> 3. Make sure that the volume groups are active. Run 'vgdisplay videovg'.
> You should see interesting output. If you don't then the volume group is
> not active. If steps 1 and 2 work then this step should work. If you
> can't see the VG then try to activate it 'vgchange -a y videovg'.
> Alternatively, maybe it was misspelled. Try 'vgdisplay' and see if it is
> displayed.
>
Vgdisplay only gives the results I mentioned at the top.

> 4. The file system may simply need to be checked. I'm going to assume
> you are using an ext3 file system. IF YOU AREN'T then don't use this
> command. Run 'e2fsck /dev/videovg/videolv01' answer 'y' to all
> questions. If you are willing to abandon this file system and re-create.
> You could also choose to recreate the LV or even the VG.
>
e2fsck /dev/rootvg/rootlv01  clean ........
doesn't apply to      /rootlv02   swap  
e2fsck  /dev/hda1  clean .........  [ /boot ]
e2fsck  /dev/hda3      effectively  -doesn't exist-


> 5. Finally try to mount the file system. It may be that /etc/fstab has
> the wrong file system type listed and refuses to mount it. Run
> "mount /dev/videovg/videolv01 /mnt". The command should run without
> error and your file system should be mounted on /mnt. Run 'ls /mnt' to
> see if you can see your files. Then run 'umount /mnt' to unmount it.
>
Can't mount something that doesn't exist, right?

One thing I didn't mention was,  the booting messages that flow by have a 
line;  
fstab has an error on line 18.

From the shell 'less' only displays the 8 lines that are there.
From the shell 'nano' loads the 8 lines and I don't see anything further down 
but I can't write the file since it is 'read only'.  Perhaps this is a part 
of the problem.

I will be interested in seeing if,  now that the old partition hda3 which is 
now hdb3 gives the same results, ie none.  This might not be surprising now 
that part of  /dev/videovg/videolv01 has been amputated with the removal of 
it's erstwhile companion,  hdb[1].

Again thanks,  have a good weekend.

 
-- 
Merv Curley
Toronto, Ont. Can

SuSE 10.2 Linux    
Desktop  KDE 3.5.5    KMail 1.9.5



--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list