Cannot recreate LVM volume group after crash
(Last modified: 27Aug2005)
This document (10098710) is provided subject to the disclaimer at the end of this document.
fact
SUSE Linux Enterprise Server 9
LVM
symptom
Cannot recreate LVM volume group after crash
YaST ERROR: "LVM error: File descriptor 5 left open"
YaST ERROR: "LVM error: vgcreate -M2 -s 4096k lvmgroup /dev/sda1"
vgcreate lvmgroup /dev/sda1 /dev/sdb1 /dev/sdc1' returns ERROR: "/dev/lvmgroup: already exists in filesystem"
cause
The volume group and the /dev/lvmgroup symlink were not cleaned up properly
fix
Remove all references to invalid logical volumes, volume groups, physical volumes and /dev symlinks.
In the following example, there is an invalid volume, volume group and symlinks. vgscan pvscan lvremove /dev/badgroup/badvol vgremove badgroup pvscan pvremove /dev/sdc1 pvremove /dev/sdd1 pvremove /dev/sde1 NOTE: In this case three new LUNs were created and partitioned with type 0x8e (Linux LVM). pvcreate /dev/sda1 pvcreate /dev/sdb1 pvcreate /dev/sdc1 vgcreate lvmgroup /dev/sda1 /dev/sdb1 /dev/sdc1 ls -l /dev/lvmgroup rm -rf /dev/lvmgroup NOTE: At this point, YaST and the commandline tools can successfully create any volume group and logical volumes needed.
ACTIVE '/dev/badgroup/badvol' [66.40 GB] inherit
ACTIVE '/dev/oraclevolgroup/oraclelogvol' [4.50 GB] inherit
Reading all physical volumes. This may take a while...
Found volume group "badgroup" using metadata type lvm2
Found volume group "oraclevolgroup" using metadata type lvm2
PV /dev/sdd1 VG badgroup lvm2 [33.20 GB / 0 free]
PV /dev/sde1 VG badgroup lvm2 [33.20 GB / 0 free]
PV /dev/dasdi1 VG oraclevolgroup lvm2 [2.29 GB / 0 free]
PV /dev/dasdj1 VG oraclevolgroup lvm2 [2.29 GB / 80.00 MB free]
PV /dev/sdc1 lvm2 [33.20 GB]
--snip--
Do you really want to remove active logical volume "badvol"? [y/n]: y
Logical volume "badvol" successfully removed
Volume group "badgroup" successfully removed
PV /dev/sdd1 lvm2 [33.20 GB]
PV /dev/sde1 lvm2 [33.20 GB]
PV /dev/dasdi1 VG oraclevolgroup lvm2 [2.29 GB / 0 free]
PV /dev/dasdj1 VG oraclevolgroup lvm2 [2.29 GB / 80.00 MB free]
PV /dev/sdc1 lvm2 [33.20 GB]
--snip--
Labels on physical volume "/dev/sdc1" successfully wiped
Labels on physical volume "/dev/sdd1" successfully wiped
Labels on physical volume "/dev/sde1" successfully wiped
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdc1" successfully created
/dev/lvmgroup: already exists in filesystem
lrwxrwxrwx 1 root root 33 Aug 23 18:49 lvmvol -> /dev/mapper/lvmgroup-lvmvol
document
Document Title: | Cannot recreate LVM volume group after crash |
Document ID: | 10098710 |
Solution ID: | NOVL103205 |
Creation Date: | 25Aug2005 |
Modified Date: | 27Aug2005 |
Novell Product Class: | Linux |
disclaimer
The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.