Removing LVM Volume Group that doesn't exist anymore

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Removing LVM Volume Group that doesn't exist anymore
# 1  
Old 11-28-2012
Removing LVM Volume Group that doesn't exist anymore

Our SAN administrator decided to unpresent then destroy LUN's we were actively using as a volume group (all PV's in said volume group). Now every time I do a pvscan or whatever it complains about I/O errors trying to access those PV's. How do I get it to forget the VG existed completely? vgreduce --removemissing says the VG doesn't exist (presumably since it couldn't activate any LV's) I can't create another VG of that name because it says it does exist.
# 2  
Old 11-29-2012
Have you tried deactivating the LVs and VGs which were on the affected PVs?
Code:
lvchange -an vg_name/lv_name
vgchange -an vg_name

After that, you have to use lvremove and vgremove to remove the corresponding LVs and VGs before you can re-use the same name for your new VGs/LVs.
# 3  
Old 11-29-2012
No-go:

Code:
[root@dfletcher ~]# lvs
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811791360: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811848704: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 4096: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428395520: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428452864: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 4096: Input/output error
  LV               VG          Attr   LSize    Origin Snap%  Move Log Copy%  Convert
  lv_domino8_base  vg2_domino8 -wi-ao  780.96G
  lv_domino8_daos  vg2_domino8 -wi-ao  315.00G
  lv_domino8_tlogs vg2_domino8 -wi-ao   65.00G
  lv_dom14_base    vg_domino14 -wi-ao 1023.00G
  lv_dom14_daos    vg_domino14 -wi-ao  562.41G
  lv_dom14_tlogs   vg_domino14 -wi-ao  135.55G
[root@dfletcher ~]# lvchange -an /dev/vg_domino8/lv_domino8_base
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811791360: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811848704: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 4096: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428395520: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428452864: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 4096: Input/output error
  Volume group "vg_domino8" not found
  Skipping volume group vg_domino8
[root@dfletcher ~]# lvs
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811791360: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 142811848704: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_tlogs: read failed after 0 of 4096 at 4096: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428395520: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 530428452864: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 0: Input/output error
  /dev/vg_domino8/lv_domino8_base: read failed after 0 of 4096 at 4096: Input/output error
  LV               VG          Attr   LSize    Origin Snap%  Move Log Copy%  Convert
  lv_domino8_base  vg2_domino8 -wi-ao  780.96G
  lv_domino8_daos  vg2_domino8 -wi-ao  315.00G
  lv_domino8_tlogs vg2_domino8 -wi-ao   65.00G
  lv_dom14_base    vg_domino14 -wi-ao 1023.00G
  lv_dom14_daos    vg_domino14 -wi-ao  562.41G
  lv_dom14_tlogs   vg_domino14 -wi-ao  135.55G

# 4  
Old 11-30-2012
Run the command under strace:

Code:
strace -f -o /some/strace/output/file lvs

Then go through the output file and see where it's finding the config data for those volumes and groups.

If that file is a text-based config file, make a copy so you have a backup just in case, and remove the "disappeared" groups and volumes from the original.
# 5  
Old 12-03-2012
LVM metadeta is text-based but it doesn't exist in a file anywhere. They're physically stored in the "LVM Head" of each physical volume in the VG. Since there are no PV's anymore I'm guessing the kernel keeps a record of that in memory somewhere.
# 6  
Old 12-03-2012
I understand /dev/vg_domino8/lv_domino8_base is still appearing. If so, try to figure out which dm device it corresponds to (from /dev/mapper) directory. Then, you may take a look at /sys/block/dm-x (x is the corresponding number for the dm device in question) directory and see if there's any way to "turn off" it. I could not find any such thing though.

Have you rebooted the server? I would have done a reboot in this scenario.
This User Gave Thanks to admin_xor For This Post:
# 7  
Old 12-03-2012
Unfortunately, we can't reboot this server since it's actively serving end users and that would require a change request. But your post did give me an idea that did work: I deleted /dev/vg_domino8 and /dev/mapper/vg_domino* then ran the pvscan/lvs again and did not receive any errors this time around.

Thanks for putting me on the right track.
This User Gave Thanks to thmnetwork For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Trouble removing Physical Disk from Volume Group

I want to remove hdisk1 from volume group diskpool_4 and migrate PV from hdisk1 to hdisk2 , but facing problems, so what is the quickest way to migratepv and remove hdisk1 -- # lspv | grep diskpool_4 hdisk1 00c7780e2e21ec86 diskpool_4 active hdisk2 ... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

3. Homework & Coursework Questions

Group Doesn't Exist

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I'm able to create a group but when I'm trying to delete the group it keeps stating Group Doesn't Exist. I know... (2 Replies)
Discussion started by: GoBoyGo
2 Replies

4. Filesystems, Disks and Memory

Expanding a volume group with system-config-lvm

Good morning, I'm working in a lab that generates a good amount of data and we've just about filled our 9.1TB RAID. The system is a Dell PowerEdge 2950 running Scientific Linux 5.4 with a PERC H800 and a Dell PowerVault MD1200. The MD1200 has 12 bays, 6 of which were filled with 2TB drives... (1 Reply)
Discussion started by: mmulqu
1 Replies

5. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

6. UNIX for Dummies Questions & Answers

Removing a user that doesnt exist from a group

Hi there, normally if I want to remove a user tht I have added to a specific group, i would do the following this is what my group2 looks like # grep group2 /etc/group group2:x:7777:user2,user1,user4 user1 has been defined in a few groups # id -nG user1 group1 group2 group3 So... (3 Replies)
Discussion started by: rethink
3 Replies

7. UNIX for Dummies Questions & Answers

connection doesn't work anymore

Hello, first of all, I want to make myself clear about my language. I'm brazilian, so I ask you all to understand if i commit any mistake with the grammar. Here is the problem. Some days ago I needed to use a "sh" command in the Terminal (I use a Mac OSX 10.5.6) followed by a file... (0 Replies)
Discussion started by: anubisbr
0 Replies

8. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies

9. AIX

Having problems with removing a volume group..

Dear all, I would be very grateful if you could help me with removing the volume group.. The case is that, I was trying to create a volume group with 4 disk eligible, but the system has hang .. Maybe because the disks that I was trying to include into the new volume group were of too large size... (5 Replies)
Discussion started by: dilshik
5 Replies

10. UNIX for Dummies Questions & Answers

What hapens if a group member doesn't exist?

As part of a NIS implementation, (I think) I want to create a group (in /etc/group) that has users that do not exist on the target machine. What effect will this have? Will it cause any problems? Thanks, Gary Cooper (1 Reply)
Discussion started by: Gary Cooper
1 Replies
Login or Register to Ask a Question