LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2003, 10:25 PM   #1
wlfdgcrkz
Member
 
Registered: Apr 2003
Location: North Hollywood Ca
Distribution: RedHat FreeBSD
Posts: 130

Rep: Reputation: 15
resizing a mounted partition


Im new to lvm
I have increased the size of of a lv but I cant resize the ext3 fs because its mounted (I know... DUH!) Must i reboot into single user mode to do this?

[root@linux root]# umount /dev/Volume00/LogVol02
[root@linux root]# e2fsadm -L-5 /dev/Volume00/LogVol02
e2fsadm -- rounding size up to physical extent boundary
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/Volume00/LogVol02: 6799/1589248 files (2.0% non-contiguous), 110153/3175424 blocks
resize2fs 1.32 (09-Nov-2002)
The filesystem on /dev/Volume00/LogVol02 is now 3173376 blocks long.
[root@linux root]# umount /dev/Volume00/LogVol00
umount: /: device is busy
[root@linux root]# resize2fs /dev/Volume00/LogVol00
resize2fs 1.32 (09-Nov-2002)
/dev/Volume00/LogVol00 is mounted; can't resize a mounted filesystem!

[root@linux root]# e2fsadm -L+2G /dev/Volume00/LogVol00
e2fsadm -- Sorry: 'ext2online' not found in any of /sbin /usr/sbin /usr/local/sb
in /bin /usr/bin
e2fsadm -- ERROR: can't online resize

e2fsadm -- ERROR: /proc/mounts says /dev/Volume00/LogVol00 is mounted on /.
Please unmount it to resize.

[root@linux root]# umount /
umount: /: device is busy

Also with this situation in mind perhaps another fs format type that supports resizing while mounted would be good? If so do any of these fs's support preservation of data (safely) while chaniginf fs type? Thanx
 
Old 05-10-2003, 10:31 PM   #2
chem1
Member
 
Registered: Jun 2002
Location: White House, Washignton DC
Distribution: Red Hat 9
Posts: 270

Rep: Reputation: 30
Have you tried using parted. What does it say when you try to resize? Give us the output.

Hope that helps...
 
Old 05-10-2003, 10:44 PM   #3
wlfdgcrkz
Member
 
Registered: Apr 2003
Location: North Hollywood Ca
Distribution: RedHat FreeBSD
Posts: 130

Original Poster
Rep: Reputation: 15
Disk geometry for /dev/hda: 0.000-57241.898 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 1529.626 primary ext3 boot
2 1529.657 19045.810 primary ntfs
3 19045.811 31455.395 primary lvm
4 31455.396 57239.406 extended lba
5 31455.426 43864.980 logical lvm
6 43865.011 56274.565 logical lvm
7 56274.596 57035.456 logical linux-swap
8 57035.487 57137.431 logical lvm
9 57137.462 57239.406 logical lvm
(parted)
 
Old 05-10-2003, 10:50 PM   #4
wlfdgcrkz
Member
 
Registered: Apr 2003
Location: North Hollywood Ca
Distribution: RedHat FreeBSD
Posts: 130

Original Poster
Rep: Reputation: 15
I cant see how you can link parted's minor number with any particular volume. df does not show minors only volumes and volume groups.
 
Old 05-11-2003, 09:48 AM   #5
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
you need to change into single user mode

"telinit 1" for "telinit s"
 
Old 05-11-2003, 03:19 PM   #6
wlfdgcrkz
Member
 
Registered: Apr 2003
Location: North Hollywood Ca
Distribution: RedHat FreeBSD
Posts: 130

Original Poster
Rep: Reputation: 15
okay cool. I have tried some third party ext2online program to changes fs size while mounted but it appered it did not support ext3 fs. Before I boot to single user does native e2fsadm -L and resize2fs work on ext3?
lastly what if i fail to properly allocate the space i freed up from another lv. is there a command option that will attempt to resize a fs with all available unallocated space (taken from another lv?
thanks very much for your posts. The lv how to fails to discuss ext3 and mounted fs. It would be nice to use a single command which serves to both change the size of an lv and have this reflect the fs size.
 
Old 05-11-2003, 04:32 PM   #7
wlfdgcrkz
Member
 
Registered: Apr 2003
Location: North Hollywood Ca
Distribution: RedHat FreeBSD
Posts: 130

Original Poster
Rep: Reputation: 15
I booted to single user, unmounted / whith both the -l and the -f options . resize2fs told me it couldnot resize a mounted partition. umount told me it was not mounted! df showed the volume though so i guess umount failed. perhaps i shoud boot to single user after a clean system shutdown. Would this help??
 
Old 09-20-2003, 02:39 AM   #8
Mergatroid
LQ Newbie
 
Registered: Aug 2003
Location: Lakeside, CA
Distribution: RedHat 9
Posts: 7

Rep: Reputation: 0
You and I are screwed, both! It's a pain to get into rescue mode and once you do, you can't run resize2fs because it is IMPOSSIBLE TO UNMOUNT the damn root disk! After running chroot, umount stops complaining, but then resize2fs insists that the device is still mounted! I'm going to give up and fill the space with another mount point. ARGH!
 
  


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
Resizing a *mounted* partition JLTB Linux - Hardware 11 11-29-2005 07:46 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
need help resizing an ext3 partition with an underlying partition... spiroth10 Linux - Software 1 07-30-2004 01:21 PM
Partition resizing campo Linux - General 1 05-27-2003 10:28 AM
resizing partition help nuttyvishal4u Linux - Newbie 2 03-13-2003 06:11 AM


All times are GMT -5. The time now is 08:22 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