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 07-10-2014, 12:55 PM   #1
rokyo
Member
 
Registered: Oct 2012
Posts: 81

Rep: Reputation: Disabled
"Device is busy" message when trying to resize filesystem on encrypted LVM


Hi there,

I tried to extend my /home-partition on my CentOS 7.0.1406 installation today, following this guide: http://www.thomas-krenn.com/de/wiki/...C3%B6%C3%9Fern (which is in German)

Everything went perfectly until the step where I resize the underlying filesystem (which is ext4) with the command:
Code:
 resize2fs -p /dev/dm-1
(which is what "df -h" showed me as the mount point for my /home-partition).

The error I get is:
Code:
"Invalid magic number in the superblock when trying to open /dev/dm-1. Cannot find a valid filesystem superblock."
(the message is in German, but this is what it translates to...)

When I check my logical volumes with "lvdisplay", it displays:

Code:
lvdisplay
  --- Logical volume ---
  LV Path                /dev/cl/00
  LV Name                00
  VG Name                cl
  LV UUID                pTp5dI-u3LX-wxdF-CUIl-rAsO-m18u-LHuLva
  LV Write Access        read/write
  LV Creation host, time localhost, 2014-07-09 18:14:35 +0200
  LV Status              available
  # open                 1
  LV Size                200,00 GiB
  Current LE             51200
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0
so, I tried:

Code:
resize2fs -p /dev/cl/00
also, which produced a slightly different error:

Code:
"Device or resource is busy when trying to open /dev/cl/00. Cannot find a valid filesystem superblock."

The system is CentOS 7.0.1406, freshly installed, with the following partition layout (two HDDs -> 500GB on /dev/sda and 20GB SSD on /dev/sdb):

/dev/sda1 -> Windows boot partition
/dev/sda2 -> Windows partition
/dev/sda3 -> Linux SWAP partition
/dev/sda4 -> extended partition containing:
/dev/sda5 -> ext4 partition for CentOS 6.5 (my old system, still running in triple boot here)
/dev/sda6 -> the first partition I added to the LVM
/dev/sda7 -> the second partition I added to the LVM
/dev/sda8 -> ext4 encrypted LVM volume containing the /home-partition of CentOS 7

/dev/sdb1 -> CentOS 7's root-partition (not part of the LVM, not encrypted)


Why do I get the errors? Because my /home is mounted when I try resizing? But I thought ext4 can do online resize? Or is it because it's encrypted?

Thanks in advance!

rokyo
 
Old 07-11-2014, 02:35 AM   #2
rokyo
Member
 
Registered: Oct 2012
Posts: 81

Original Poster
Rep: Reputation: Disabled
I also tried booting into CentOS (but not logging into the Gnome session), then switching to a new shell by hitting "ctrl-alt-f2", logging in as root, unmounting the /dev/dm-1 partition with
Code:
umount /dev/dm-1
(which shows no error messages) and then trying to resize again with
Code:
resize2fs -p /dev/dm-1
, but that doesn't work, either. Same error message... even though the partition is (supposedly) unmounted now.
 
  


Reply


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
Unable to resize the filesystem ? Device or resource busy ? smilemukul Linux - Newbie 4 05-16-2014 09:10 AM
Encrypted LVM process loops "already mapped or mounted", Mint 16 Cinnamon x64 RickDeckard Linux Mint 1 01-22-2014 07:30 AM
FC multipath says "device busy " when connecting again. SLES 11 - netapp - emulex permalac Linux - Server 1 01-13-2012 04:45 PM
The "init_module: Device or resource busy" message in the 2.4.26 kernel. tommyclee Linux - Kernel 3 12-30-2008 07:09 PM
how do I resize the root "/" filesystem under LVM keratos Red Hat 5 04-21-2008 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration