LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-02-2007, 02:24 AM   #1
shellarchive
Member
 
Registered: Jan 2007
Posts: 50

Rep: Reputation: 15
how to reduce or logical volume of ext3 filesystem in rhel3es


how to reduce or logical volume of ext3 filesystem in rhel3es

do we have to resize it before using lvreduce -L500 /dev/vgo/lv1.

how to use resize2fs command.
and how to know block size.


lvm howto describe the procedure as

umount /dev/vgo/lv1
resize2fs /dev/vg0/lv1 524288
mount /dev/vg0/lv1 /mnt/new

if yes then how to know the block size 524288.

please help.
 
Old 07-02-2007, 05:48 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Don’t know how well this lvm2 advice will work in lvm1, but ...


Say you want to reduce a logical volume from 10GB to 7.5GB and you are fairly sure that you have enough space to do it. Starting with an unmounted logical volume, you could:

Code:
# e2fsck -f dev/vg0/lv1

# resize2fs dev/vg0/lv1 7500M

# lvresize -L7.5G dev/vg0/lv1

# resize2fs dev/vg0/lv1
Once the filesystem size has been reduced followed by reducing the logical volume size, you then grow the filesystem to the full available space.

The use of rounded MB instead of GB in resize2fs is an easy way to give yourself a 2% buffer zone (i.e., the interim filesystem will be slightly smaller than the target logical volume size), remembering that 7.5GB would be 7680MB.
 
Old 07-02-2007, 05:57 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Forgot to mention...

It’s always a good idea to do a backup before resizing a logical volume, or before doing any filesystem manipulation.
 
Old 07-02-2007, 11:36 PM   #4
shellarchive
Member
 
Registered: Jan 2007
Posts: 50

Original Poster
Rep: Reputation: 15
thanx it worked.
And sorry it was LVM2 on Rhel4 AS.

Quote:
Originally Posted by WhatsHisName
Forgot to mention...

It’s always a good idea to do a backup before resizing a logical volume, or before doing any filesystem manipulation.
 
  


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
Confusing USB Filesystem Problem (Can't Wipe Ext3 Filesystem) dkaplowitz Linux - Hardware 3 04-14-2007 06:30 PM
how to reduce logical volume LinuxLover Linux - Enterprise 2 10-29-2005 08:26 AM
Can create logical volume after ext3 partition setup finished? lewkh Linux - Newbie 0 11-17-2004 01:00 AM
[Slackware 10] Cannot reduce sound volume. asklepios Slackware 5 10-10-2004 01:39 PM
extend a logical voule with ext3 filesystem jhnsegers Red Hat 0 10-04-2004 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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