Skip to contentSkip to conversation

LVM and mounting

linux-lvm Kenny Gorman 2 participants 3 messages Nov 19, 2002 – Nov 20, 2002

lore
Share & tools
lore
#0 lore raw

I am having a problem where when I boot up the machine, the machine says I need to fsck one of my logical volumes. This volume I just added a new filesystem to, but it hung on mount, so I rebooted. Then I tried to
lvremove the volume, and it says it successfully removed it, then I am
running vgchange -a n <grp> and vgremove <grp>. But it says I can't remove the group.. because it belongs to a volume.

I think my lvmtab or someting is all messed up because the some messages seem to indicate that the volume is there, and some say it's not. lvdisplay says it does not exist.

I would just like to remove the entire volume and group and start over so I can get my machine to boot. Is there some option to just 'ignore' or 'force' destroy the volume? If I fdisk the disk will I still get this error?

Any help would be great!!

thx
-kg

#1 lore raw

Just to add to this (I am not sure if this hit the list anyways, I just subscribed).

I am running SuSE 2.4.16-64GB, and lvm 1.0.<something, can't get on the box to verify@this point...>

-kg

Quoted 13 lines · Kenny Gorman

I am having a problem where when I boot up the machine, the machine says I need to fsck one of my logical volumes. This volume I just added a new filesystem to, but it hung on mount, so I rebooted. Then I tried to
lvremove the volume, and it says it successfully removed it, then I am
running vgchange -a n <grp> and vgremove <grp>. But it says I can't remove the group.. because it belongs to a volume.

I think my lvmtab or someting is all messed up because the some messages seem to indicate that the volume is there, and some say it's not. lvdisplay says it does not exist.

I would just like to remove the entire volume and group and start over so I can get my machine to boot. Is there some option to just 'ignore' or 'force' destroy the volume? If I fdisk the disk will I still get this error?

Any help would be great!!

thx
-kg

#2 lore raw
In reply to Kenny Gorman
Quoted 1 line · Kenny Gorman

I would just like to remove the entire volume and group and start over

You'll need to wipe the LVM label at the start of each PV.

LVM2 has a tool which will do this for you called pvremove:
e.g. if the PV to wipe is /dev/sdb4: pvremove -ff /dev/sdb4 (works for both old and new metadata formats)

Or you can just use "dd" - example for the old (LVM1) metadata format:
dd if=/dev/zero of=/dev/sdb4 count=1

Alasdair

Signature · 1 line
[email protected]