LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-12-2016, 12:23 PM   #1
urello
LQ Newbie
 
Registered: Jul 2014
Posts: 13

Rep: Reputation: Disabled
Cannot shrink logical volume (device busy)


Code:
[root@lab7-mongo-7 /]# lvdisplay /dev/vg_lab7mongo7/lv_home
--- Logical volume ---
LV Name                /dev/vg_lab7mongo7/lv_home
VG Name                vg_lab7mongo7
LV UUID                s4Cwkh-w7MX-uHRF-sA3f-T96e-AzZ3-8t8WtJ
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                783.61 GiB
Current LE             200603
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:2

[root@lab7-mongo-7 /]# df -hP /home
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_lab7mongo7-lv_home  772G  571M  732G   1% /home

[root@lab7-mongo-7 /]# umount -l /home
[root@lab7-mongo-7 /]# df -hP /home
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_lab7mongo7-lv_root   50G  2.4G   45G   6% /

[root@lab7-mongo-7 /]# resize2fs /dev/vg_lab7mongo7/lv_home 80G
resize2fs 1.41.12 (17-May-2010)
resize2fs: Device or resource busy while trying to open /dev/vg_lab7mongo7/lv_home
Couldn't find valid filesystem superblock.

[root@lab7-mongo-7 /]# e2fsck -ff /dev/vg_lab7mongo7/lv_home
e2fsck 1.41.12 (17-May-2010)
e2fsck: Device or resource busy while trying to open /dev/vg_lab7mongo7/lv_home
Filesystem mounted or opened exclusively by another program?

[root@lab7-mongo-7 /]# lsof |grep home
[root@lab7-mongo-7 /]#
Why i cannot shrink? What is holding the device?
 
Old 07-12-2016, 01:01 PM   #2
pwalden
Member
 
Registered: Jun 2003
Location: Washington
Distribution: Raspbian, Ubuntu, Chrome/Crouton
Posts: 374

Rep: Reputation: 50
Do you have NFS or Samba services running with this volume in their configuration?

I know NFS will cause this problem. I have to stop the NFS services before I can un-mount and fsck a volume.
 
  


Reply



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
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
how to shrink Volume Group and get some space to create new volume Farah_s Linux - Newbie 1 03-14-2012 07:34 AM
How do you shrink a logical volume pse? PeggySue Fedora - Installation 3 12-16-2009 04:08 AM
Extending logical volume LogVol01 Insufficient allocatable logical exte swap space umeshsharma Linux - Newbie 4 06-22-2009 12:26 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:21 PM.

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
Open Source Consulting | Domain Registration