I am using RHEL 5.1 with custom kernel.
I have a LV I am trying to remove and its keep complaining its open. I have unmounted the filesystem, lsof shows nothing, fuser shows nothing. I am certain a reboot will fix it, but I don't know why this occurs. Can anyone shed some light on this?
Are there some other LVM hacks I can use for this?
TIA
Mag Gam wrote:
I am using RHEL 5.1 with custom kernel.
I have a LV I am trying to remove and its keep complaining its open. I have unmounted the filesystem, lsof shows nothing, fuser shows nothing. I am certain a reboot will fix it, but I don't know why this occurs. Can anyone shed some light on this?
Are there some other LVM hacks I can use for this?
Not really a hack but you need to deactivate it:
lvchange -a n <logical volume>
Verify that it's deactivated with the lvdisplay command
nate
nate wrote:
Mag Gam wrote:
I am using RHEL 5.1 with custom kernel.
Might be something about your custom kernel that affects lvm operations. It could be you have a version mis-match in lvm components in your system.
I have a LV I am trying to remove and its keep complaining its open. I have unmounted the filesystem, lsof shows nothing, fuser shows nothing. I am certain a reboot will fix it, but I don't know why this occurs. Can anyone shed some light on this?
Are there some other LVM hacks I can use for this?
No snapshots still present for that lv?
Not really a hack but you need to deactivate it:
lvchange -a n <logical volume>
Verify that it's deactivated with the lvdisplay command
Current versions of lvm/lvremove will do that automatically.
I can't even deactivate it.
On Fri, Aug 22, 2008 at 10:33 AM, Toby Bluhm tkb@midwestinstruments.com wrote:
Toby Bluhm wrote:
nate wrote:
. . .
Verify that it's deactivated with the lvdisplay command
Current versions of lvm/lvremove will do that automatically.
. . . but verifying is still a good idea.
-- Toby Bluhm Alltech Medical Systems America, Inc.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
There are too many mount points. Close to 120. I am fairly certain this volume is not mouted. I did a grep -i lvname /proc/mounts
Here is the LV info.
--- Logical volume --- LV Name /dev/deptd1_dat_vg01/dat004 VG Name deptd1_dat_vg01 LV UUID mkoqK3-ew7c-KwFm-3JcN-17dQ-aHJg-dUDQfH LV Write Access read/write LV Status available # open 1 LV Size 515.00 GB Current LE 131840 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:7
PLus there are no snapshots for this volume. TIA
On 8/22/08, nate centos@linuxpowered.net wrote:
Mag Gam wrote:
I can't even deactivate it.
Can you post output of
lvdisplay -v <path to LV> vgdisplay -v mount
Not sure what to suggest at this point I've never had lvremove not work for me, though my lvms have always been setup in a real basic configuration.
nate
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, 2008-08-23 at 06:46 -0700, Mag Gam wrote:
There are too many mount points. Close to 120. I am fairly certain this volume is not mouted. I did a grep -i lvname /proc/mounts
May be your problem?
$ cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / ext3 rw,data=ordered 0 0 /dev /dev tmpfs rw 0 0 /proc /proc proc rw 0 0 /sys /sys sysfs rw 0 0 none /selinux selinuxfs rw 0 0 /proc/bus/usb /proc/bus/usb usbfs rw 0 0 devpts /dev/pts devpts rw 0 0 /dev/sdb1 /boot ext3 rw,data=ordered 0 0 tmpfs /dev/shm tmpfs rw 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0 sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0 /etc/auto.misc /misc autofs rw,fd=6 # snipped the rest rw,fd=12,pgrp=2632,timeout=300,minproto=5,maxproto=5,indirect 0 0
But look at this.
$ mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sdb1 on /boot type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
Note that the root file system is not mounted by the kernel using the LVM name, but rootfs. But mount shows (it uses /etc/mtab) the LVM name.
Maybe using the mount command, or a grep on etc/mtab, will show that the volume is mounted somewhere.
Another possibility is to use lsof (see the man page, maybe the +D parameter will be useful) or maybe fuser (see the man page again). Keep in mind that the volume maybe be accessed with names other than VolG*.
E.g.
# find /dev -exec ls -dl {} ;|grep 253 brw------- 1 root root 253, 0 Aug 23 07:28 /dev/root brw-rw---- 1 root disk 253, 1 Aug 23 07:28 /dev/mapper/VolGroup00-LogVol01 brw-rw---- 1 root disk 253, 0 Aug 23 07:28 /dev/mapper/VolGroup00-LogVol00
$ ls -l /dev/mapper/ total 0 crw------- 1 root root 10, 63 Aug 23 07:28 control brw-rw---- 1 root disk 253, 0 Aug 23 07:28 VolGroup00-LogVol00 brw-rw---- 1 root disk 253, 1 Aug 23 07:28 VolGroup00-LogVol01
$ ls -ld /dev/Vol* drwx------ 2 root root 80 Aug 23 07:28 /dev/VolGroup00
<snip>
HTH
Mag Gam wrote:
There are too many mount points. Close to 120. I am fairly certain this volume is not mouted. I did a grep -i lvname /proc/mounts
Maybe a daemon is still holding your lv device open? Somewhere, maybe this list, I remember a similar discussion where the culprit was a backup agent holding /dev/xxxx open. The solution was to kill the daemon.
Its impossible trying to find that deamon. lsof or fuser are no use :-( I just rebooted and was able to remove the LV without any problems.
On Mon, Aug 25, 2008 at 8:40 AM, Toby Bluhm tkb@midwestinstruments.com wrote:
Mag Gam wrote:
There are too many mount points. Close to 120. I am fairly certain this volume is not mouted. I did a grep -i lvname /proc/mounts
Maybe a daemon is still holding your lv device open? Somewhere, maybe this list, I remember a similar discussion where the culprit was a backup agent holding /dev/xxxx open. The solution was to kill the daemon.
-- Toby Bluhm Alltech Medical Systems America, Inc.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos