LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-15-2009, 08:11 AM   #1
araczek
LQ Newbie
 
Registered: Oct 2002
Location: NJ
Distribution: Mandrake
Posts: 12

Rep: Reputation: 0
Unhappy Shrink volume in Red Hat EL WS 4


Hello!

Okay, I am a Windows admin. That being said I want to shrink a Linux volume and I am having trouble. I really don't know my way around Linux. I found a procedure for LVM and it is not working out. I booted said Linux to rescue disk, did these commands:
>vgscan
>vgchange - a y VolGroup00
>vgmknodes
#e2fsck -f /dev/mapper/VolGroup00-LogVol00
#resize2fs /dev/mapper/VolGroup00-LogVol00 39GB
resize2fs 1.35 (28-Feb-2004)
resize2fs: bad filesystem size - 39GB

Does not matter what size I use (45, 50, 60 70) always same error.
What is wrong. I read somewhere maybe a newer version of resize2fs
would work? I don't know much about installing sw in Linux. Also this is a pretty much fresh out of box install except for different video drivers.
 
Old 04-15-2009, 08:40 AM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
can you try dropping the 'B' in GB ?
just give 39G
 
Old 04-15-2009, 08:43 AM   #3
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
and i guess you must be aware of what you are doing.
If you shrink the lv size, it will not appear as free space in the disk and you cannot create another partition
unless you are planning to shrink the PV itself - that is a very scary one to do!
 
Old 04-15-2009, 09:21 AM   #4
araczek
LQ Newbie
 
Registered: Oct 2002
Location: NJ
Distribution: Mandrake
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bhaslinux View Post
and i guess you must be aware of what you are doing.
If you shrink the lv size, it will not appear as free space in the disk and you cannot create another partition
unless you are planning to shrink the PV itself - that is a very scary one to do!

Okay, I am NOT aware of what I am doing! I had an idea maybe there was something else to do. Will pvresize work? I dug up a procedure but it says it's a tricky thing to do. See link:

http://fedorasolved.org/Members/zcat...-new-partition

Will this do? If there is a better way please detail what I need to do. Again, not a Linux guy.

...AR
 
Old 04-15-2009, 09:37 AM   #5
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
ok
for instances like this i always create multiple partitions and create PVS in those and merge them in a VG
if that was what done, we can just pvmove one of the PVs out and then create another patition
but that is not the case here i guess.

pvresize works ! but as i told already ... it is scary !
the link you had referred to is perfect link for this task.
But backup the data (atleast the important files) before doing anything to the PV.

More importantly

1. Just write down the partition cylinder starts and ends from the fdisk
2. Backup and keep the /etc/lvm/backup/VolGroup00 directory in a safe place and
easily accessible in case you need to restore the data

the good thing about LVM is you can easly restore the VGs and LVs from the VolGroup00 directory.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How Red Hat Linux can help you boost performance and shrink IT costs LXer Syndicated Linux News 0 11-22-2007 03:51 PM
LXer: Red Hat Asia Pacific News Volume 15 LXer Syndicated Linux News 0 06-06-2007 12:46 PM
LXer: Red Hat Summit 2007, Day 2: Red Hat Exchange and interesting presentations LXer Syndicated Linux News 0 05-11-2007 07:32 PM
LXer: Red Hat to launch Red Hat Enterprise Linux 5 before March LXer Syndicated Linux News 0 12-30-2006 08:03 AM
Red Hat does not plan to release another product in the red hat linux line... Whitehat General 5 11-03-2003 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:14 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
Open Source Consulting | Domain Registration