LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-25-2013, 08:44 PM   #1
hilou
Member
 
Registered: May 2013
Posts: 72

Rep: Reputation: Disabled
Cannot deactivate lv.


Hi All,

I have a lv used as nfs share and now I want to stop and remove it. But I cannot deactivate it anyway.

# lvchange -an /dev/mapper/vgdd-temp_nfs
LV vgdd/temp_nfs in use: not deactivating
# fuser -mv /dev/mapper/vgdd-temp_nfs

all pv is created on multipath device.

Please help.

Thanks in advance.

Last edited by hilou; 11-25-2013 at 08:46 PM.
 
Old 11-25-2013, 09:48 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,411
Blog Entries: 6

Rep: Reputation: Disabled
Hi: hilou

I'm assuming you mean logical volume for the "lv" or do you mean low voltage?

nfs can mean need for speed so if you don't mean that do clairify- kindly-
And "pv" can mean present value or physical volume:-

What type of physical volume (partions? storage?) on your multi path device do you have?

When you create a volume group it is, by default, activated. This means that the logical volumes in that group are accessible and subject to change.
Code:
 To deactivate or activate a volume group, use the -a (--available) argument of the vgchange command.
https://www.centos.org/docs/5/html/C..._activate.html

https://help.ubuntu.com/12.10/server...h-devices.html
http://sourceware.org/lvm2/wiki/MultipathUsageGuide

HTH
 
Old 11-25-2013, 10:16 PM   #3
hilou
Member
 
Registered: May 2013
Posts: 72

Original Poster
Rep: Reputation: Disabled
Hi,

How come that a question presented in LinuxQuestions.org with the nfs meaning of need for speed?
nfs: network file system
lv: logical volume.
pv: physical volume.

As I said in my questions, all pv crated on multipath device, no partitions.

Thanks for your swift reacting.
 
Old 11-25-2013, 10:29 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
Quote:
all pv crated on multipath device, no partitions.
no partitions
so blank drives

or is is partitioned( as in striped) in a raid set up

and as to "NFS" with "share" next to it.I read that as a network file share with MS windows ( rather common)

Please try to avoid using abr. . ( abbreviations ) They can be confusing

Also we have No idea what operating system this is
it might be using systemV or systemD
it might be manauly set up like Arch is

the network share is controlled ? how ?
int script or udev or deamon
 
Old 11-25-2013, 11:41 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,411
Blog Entries: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by hilou View Post
Hi,

How come that a question presented in LinuxQuestions.org with the nfs meaning of need for speed?
nfs: network file system
lv: logical volume.
pv: physical volume.

As I said in my questions, all pv crated on multipath device, no partitions.

Thanks for your swift reacting.
Your Welcome-

Answer our Guru's questions when you can; please-
 
Old 11-26-2013, 12:34 AM   #6
hilou
Member
 
Registered: May 2013
Posts: 72

Original Poster
Rep: Reputation: Disabled
Hi,

system: rhel 5.8
kernel: 2.6.18-308.1.1.el5

the network share is controlled ? how ?

NFS is stoped.

Storage details: Fc-san, we just use lun from filer. create pv directly from multipath device(ie: mpath0), no partitions on mutipath device.

I do find there is something open on that device:
# dmsetup info -c /dev/mapper/vgdd-temp_nfs
Name Maj Min Stat Open Targ Event UUID
vgdd-temp_nfs 253 36 L--w 1 1 0 LVM-a8Dc82xMEE2FLFFbWaJO6ulT6hHz3..................

But fuser and lsof see nothing on the LV.
 
Old 11-26-2013, 10:17 AM   #7
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Did you unmounted local mount of your LV
 
Old 11-26-2013, 01:53 PM   #8
ixion22600
LQ Newbie
 
Registered: Nov 2013
Posts: 23

Rep: Reputation: Disabled
Common .. this guy configured multipath devices and nfs services, and using lvm layer and you guys are asking him if he unmounted the filesystem or why is he using "abbreviations" for lvm pv lv vg .. it's normal to use those "abbreviations" because they are built in also in lvm commands, like pvcreate, lvcreate, vgcreate, lvs, vgs ... )
 
Old 11-26-2013, 10:47 PM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,411
Blog Entries: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by hilou View Post
Hi,

system: rhel 5.8
kernel: 2.6.18-308.1.1.el5

the network share is controlled ? how ?

NFS is stoped.

Storage details: Fc-san, we just use lun from filer. create pv directly from multipath device(ie: mpath0), no partitions on mutipath device.

I do find there is something open on that device:
# dmsetup info -c /dev/mapper/vgdd-temp_nfs
Name Maj Min Stat Open Targ Event UUID
vgdd-temp_nfs 253 36 L--w 1 1 0 LVM-a8Dc82xMEE2FLFFbWaJO6ulT6hHz3..................

But fuser and lsof see nothing on the LV.
My only GUESS is a process called postmaster used by sfmdb. But I can find nothing on it. (not sure if that's what is going on)
Try running lsof and fuser on the mountpoint, not the LV's device file.
http://h30499.www3.hp.com/t5/System-...9#.UpQKe0OYPuQ

Aside from that our Guru John VV is much more experienced with Red Hat and other RH based distributions. I would follow his cousel on this.

If I find anything worthy at the Red Hat website I will post it for you; hilou
 
Old 11-26-2013, 10:57 PM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,411
Blog Entries: 6

Rep: Reputation: Disabled
The second link is the Logical Volume Manager Administration Guide-
HTH--

https://access.redhat.com/site/docum..._activate.html

https://www.redhat.com/rhecm/rest-rh...h:resourceFile

Last edited by Ztcoracat; 11-26-2013 at 10:58 PM. Reason: Typo
 
Old 11-27-2013, 12:46 AM   #11
hilou
Member
 
Registered: May 2013
Posts: 72

Original Poster
Rep: Reputation: Disabled
Hi All,

Thanks very much for all your efforts. I have searched a lot on google and tried all the possible means to resolve this, but unfortunately all failed. I personally very eager to resolve this and find what the hell is the problem.

Currently I have already tried:
- kill udevd daemon;
- dmsetup remove maps of the LV which failed with the same error: disk busy.
- remount it and run fuser and lsof on it, but find nothing.
- stop nfs on both server and client.
- stop autofs.
- try to find postmaster, but of course that we don't even have postgresql installed.

By the way, can I restart multipathd since I fear the data loss?

# dmsetup info -c /dev/mapper/vgdd-temp_nfs
Name Maj Min Stat Open Targ Event UUID
vgdd-temp_nfs 253 36 L--w 1 1 0 LVM-a8Dc82xMEE2FLFFbWaJO6ulT6hHz3..................

Just to find out what is open the device.

Best Regards.

Last edited by hilou; 11-27-2013 at 12:51 AM.
 
Old 11-27-2013, 01:08 AM   #12
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
if the lsof is returning nothing then clearly process is not the reason to get busy. Last thing coming in my mind in LVM lock. Can you please if there is any lock

lvchange -aen -vvvv /dev/mapper/vgdd-temp_nfs

Thanks
 
Old 11-27-2013, 02:16 AM   #13
hilou
Member
 
Registered: May 2013
Posts: 72

Original Poster
Rep: Reputation: Disabled
all lock find in the output:
Setting global/locking_dir to /var/lock/lvm
Locking /var/lock/lvm/V_vgdd RB
_do_flock /var/lock/lvm/V_vgdd:aux WB
_undo_flock /var/lock/lvm/V_vgdd:aux
_do_flock /var/lock/lvm/V_vgdd RB
Unlocking /var/lock/lvm/V_vgdd
_undo_flock /var/lock/lvm/V_vgdd


Please note that the dmsetup out said open count is 1, not 0.

Last edited by hilou; 11-27-2013 at 02:35 AM.
 
Old 12-06-2013, 02:51 AM   #14
hilou
Member
 
Registered: May 2013
Posts: 72

Original Poster
Rep: Reputation: Disabled
Hi All,

Anyone any new ideas?

Br
 
Old 12-06-2013, 05:12 AM   #15
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,411
Blog Entries: 6

Rep: Reputation: Disabled
Try giving Red Hat a call and see what they could suggest.
 
  


Reply

Tags
lvm2, multipath


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I deactivate a video card? briandc Linux - Hardware 5 11-07-2011 06:44 AM
Postfix - Deactivate for one domain Swanny Linux - Software 6 11-27-2007 07:29 AM
activate and deactivate munna_dude Linux - Software 2 02-22-2007 11:01 PM
Deactivate Screensaver Donald1000 Linux - General 8 02-27-2003 04:48 AM
deactivate the kpanel Strauss Linux - Software 1 02-13-2001 10:02 PM


All times are GMT -5. The time now is 10:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration