Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] How to increase/decrease space
@ 2004-12-15 18:11 AdabalaP
  2004-12-15 18:15 ` Jason Martin
  0 siblings, 1 reply; 12+ messages in thread
From: AdabalaP @ 2004-12-15 18:11 UTC (permalink / raw)
  To: linux-lvm


Hello all,
I am running FC3, with LVM2 installed. I have the following partition
table:

hda1        /boot             100 meg     10% used

LVM:

hda2        VolGrp00          4.6 gb

/           VolGrp00/LogVol00 450 meg     35% used
/usr        VolGrp00/LogVol04 1.9 gb            92% used
/usr/local  VolGrp00/LogVol05 128 meg     25% used
/home       VolGrp00/LogVol03 128 meg     60% used
/opt        VolGrp00/LogVol02 128 meg     35% used
/var        VolGrp00/LogVol07 450 meg     30 % used
swap        VolGrp00/LogVol01 64 meg


(1) Added more space (350 meg) to /usr using the command "lvresize -L+350".
When i display the volume group using "lvdisplay" it shows 2.3 gb, But when
i use "df -m" it is still at 1.9 gb and 92% used state.

(2) Initially i had swap space to be 385 meg, i reduced the volume group to
64 meg using the same command, Now i don't even see my swap space by using
"free" command.

How do get my desired results ? I also want to reduce the "/" volume by
50%, How do i do it ?

Thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [linux-lvm] How to increase/decrease space
  2004-12-15 18:11 AdabalaP
@ 2004-12-15 18:15 ` Jason Martin
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Martin @ 2004-12-15 18:15 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

On Wed, Dec 15, 2004 at 12:11:30PM -0600, AdabalaP@schneider.com wrote:
> (1) Added more space (350 meg) to /usr using the command "lvresize -L+350".
> When i display the volume group using "lvdisplay" it shows 2.3 gb, But when
> i use "df -m" it is still at 1.9 gb and 92% used state.
You've resized the volume but not the filesystem sitting on top
of it. Some filesystems can be resized online while others must
be unmounted. Some may not be resizable at all.

See http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html.

-Jason Martin
-- 
This message is PGP/MIME signed.

[-- Attachment #2: Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [linux-lvm] How to increase/decrease space
@ 2004-12-15 19:45 AdabalaP
  2004-12-15 20:20 ` Jason Martin
  0 siblings, 1 reply; 12+ messages in thread
From: AdabalaP @ 2004-12-15 19:45 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 3209 bytes --]


Thanks Jason, I shall try "lvextend", But what about resizing (decreasing)
"/" file system.



                                                                                                                                       
                      Jason Martin                                                                                                     
                      <jhmartin@toger.u        To:       linux-lvm@redhat.com                                                          
                      s>                       cc:                                                                                     
                      Sent by:                 Subject:  Re: [linux-lvm] How to increase/decrease space                                
                      linux-lvm-bounces                                                                                                
                      @redhat.com                                                                                                      
                                                                                                                                       
                                                                                                                                       
                      12/15/2004 12:15                                                                                                 
                      PM                                                                                                               
                      Please respond to                                                                                                
                      LVM general                                                                                                      
                      discussion and                                                                                                   
                      development                                                                                                      
                                                                                                                                       
                                                                                                                                       




On Wed, Dec 15, 2004 at 12:11:30PM -0600, AdabalaP@schneider.com wrote:
> (1) Added more space (350 meg) to /usr using the command "lvresize
-L+350".
> When i display the volume group using "lvdisplay" it shows 2.3 gb, But
when
> i use "df -m" it is still at 1.9 gb and 92% used state.
You've resized the volume but not the filesystem sitting on top
of it. Some filesystems can be resized online while others must
be unmounted. Some may not be resizable at all.

See http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html.

-Jason Martin
--
This message is PGP/MIME signed.
(See attached file: attvajez.dat)
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[-- Attachment #2: attvajez.dat --]
[-- Type: application/octet-stream, Size: 219 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: --no-verbose

iD8DBQFBwH9Sl2ODWuqVSBMRAofiAJwLCz2f18sasdFPedX9MD41dOL3HQCffLD/
rOLUBYRFUwc+CJl/Wqt5njk=
=68hI
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [linux-lvm] How to increase/decrease space
  2004-12-15 19:45 AdabalaP
@ 2004-12-15 20:20 ` Jason Martin
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Martin @ 2004-12-15 20:20 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

On Wed, Dec 15, 2004 at 01:45:26PM -0600, AdabalaP@schneider.com wrote:
> Thanks Jason, I shall try "lvextend", But what about resizing (decreasing)
> "/" file system.
You'd probably have to reboot onto a rescue disk and approach it
that way.

-Jason Martin
-- 
... "I'll be Bach." - Johann Sebastian Schwarzenegger
This message is PGP/MIME signed.

[-- Attachment #2: Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [linux-lvm] How to increase/decrease space
@ 2004-12-16  2:15 AdabalaP
  0 siblings, 0 replies; 12+ messages in thread
From: AdabalaP @ 2004-12-16  2:15 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/html, Size: 2763 bytes --]

[-- Attachment #2: C.DTF --]
[-- Type: application/octet-stream, Size: 221 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: --no-verbose

iD8DBQFBwH9Sl2ODWuqVSBMRAofiAJwLCz2f18sasdFPedX9MD41dOL3HQCffLD/
rOLUBYRFUwc+CJl/Wqt5njk=
=68hI
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-16  3:01 Gonyou, Austin
  0 siblings, 0 replies; 12+ messages in thread
From: Gonyou, Austin @ 2004-12-16  3:01 UTC (permalink / raw)
  To: 'AdabalaP@schneider.com ',
	'LVM general discussion and development '

[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]

That only increases the device size, you also need to extend the partition
onto that larger device. e2fsadm will do it or you can fdisk it to the
larger size. (mind you this involves deleting and recreating the partition
in-memory not on disk, unless you make a mistake and do d 1 w, instead of d
1, then n p 1 <return><return><return>)

Anyhow, you really should look into extending the partition/LV itself now,
depending if you partitioned or not, or used an invalid extent specification

Austin
 

-----Original Message-----
From: AdabalaP@schneider.com
To: LVM general discussion and development
Sent: 12/15/2004 8:15 PM
Subject: Re: [linux-lvm] How to increase/decrease space


"lvextend"  did not help. 

 

My file system type is "ext3".

 

Here is output:

#df -m

...

/dev/mapper/VolGroup00-LogVol04    1985   1728   156    92%   /usr

...

 

#lvdisplay   VolGroup00/LogVol04

...

LV Size    2.45 GB

...

 

 

I did the following on /opt file system for testing, the results were
the same the filesystem did not get increased.

 

#umount /opt

#lvresize  -L +64 VolGroup00/LogVol07

#lvextend -L +64 VolGroup00/LogVol07

 

Any suggessions.

 

 

 

 
Jason Martin <jhmartin@toger.us>
Sent by: linux-lvm-bounces@redhat.com
12/15/2004 10:15 AM PST
Please respond to LVM general discussion and development

To: linux-lvm@redhat.com
cc: 
bcc: 
Subject: Re: [linux-lvm] How to increase/decrease space
 



On Wed, Dec 15, 2004 at 12:11:30PM -0600, AdabalaP@schneider.com wrote:
> (1) Added more space (350 meg) to /usr using the command "lvresize
-L+350".
> When i display the volume group using "lvdisplay" it shows 2.3 gb, But
when
> i use "df -m" it is still at 1.9 gb and 92% used state.
You've resized the volume but not the filesystem sitting on top
of it. Some filesystems can be resized online while others must
be unmounted. Some may not be resizable at all.

See http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html
<http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html> .

-Jason Martin
--
This message is PGP/MIME signed.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
<https://www.redhat.com/mailman/listinfo/linux-lvm> 
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
<http://tldp.org/HOWTO/LVM-HOWTO/> 

 <<C.DTF>>  <<ATT190653.txt>> 

[-- Attachment #2: Type: text/html, Size: 5328 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-16 15:52 AdabalaP
  2004-12-16 16:22 ` Klaus Strebel
  0 siblings, 1 reply; 12+ messages in thread
From: AdabalaP @ 2004-12-16 15:52 UTC (permalink / raw)
  To: LVM general discussion and development

Austine,

I have a hard disk of 4.8GB which i partitioned it into 2 parts (hda1 = 100
meg, hda2 = 4.7gb). The whole disk is of ext3 file system type.The hda2 is
managed by using lvm2. Following is the partition sizes of the hda2 disk;

hda2        VolGrp00          4.6 gb

/           VolGrp00/LogVol00 450 meg     35% used
/usr        VolGrp00/LogVol04 1.9 gb      92% used
/usr/local  VolGrp00/LogVol05 128 meg     25% used
/home       VolGrp00/LogVol03 128 meg     60% used
/opt        VolGrp00/LogVol02 128 meg     35% used
/var        VolGrp00/LogVol07 450 meg     30 % used
swap        VolGrp00/LogVol01 342 meg

Here is sequence of steps that i have performed to inc/dec the partition
sizes;

tried to increase /usr size by 400 meg.

      #lvresize -L +450 VolGrp00/LogVol04

      when i display using the "lvdisplay VolGrp00/LogVOl04" i see 2.4 gig
allocated to this partition, but when i   see it through "df -m /usr" it
hasn't changed.

      So, As per Jason's email i have done the below;

      #lvextend -L2.4G VolGrp00/LogVol04

      But again this hasn't changed my "df -m /usr" output.

I thought using LVM commands one should be able to take care of the inc/dec
of partitions sizes under a given VG. Why should i be using "fdisk" and
"e2fsadm" ?

If i have missed or done any thing wrong while resizing the partitions can
please provide me an example so that i could try it.

Thanks.



                                                                                                                                       
                      "Gonyou, Austin"                                                                                                 
                      <austin@coremetri        To:       "'AdabalaP@schneider.com '" <AdabalaP@schneider.com>, "'LVM general           
                      cs.com>                   discussion and development '" <linux-lvm@redhat.com>                                   
                      Sent by:                 cc:                                                                                     
                      linux-lvm-bounces        Subject:  RE: [linux-lvm] How to increase/decrease space                                
                      @redhat.com                                                                                                      
                                                                                                                                       
                                                                                                                                       
                      12/15/2004 09:01                                                                                                 
                      PM                                                                                                               
                      Please respond to                                                                                                
                      LVM general                                                                                                      
                      discussion and                                                                                                   
                      development                                                                                                      
                                                                                                                                       
                                                                                                                                       




That only increases the device size, you also need to extend the partition
onto that larger device. e2fsadm will do it or you can fdisk it to the
larger size. (mind you this involves deleting and recreating the partition
in-memory not on disk, unless you make a mistake and do d 1 w, instead of d
1, then n p 1 <return><return><return>)


Anyhow, you really should look into extending the partition/LV itself now,
depending if you partitioned or not, or used an invalid extent
specification


Austin



-----Original Message-----
From: AdabalaP@schneider.com
To: LVM general discussion and development
Sent: 12/15/2004 8:15 PM
Subject: Re: [linux-lvm] How to increase/decrease space





"lvextend"  did not help.





My file system type is "ext3".





Here is output:


#df -m


...


/dev/mapper/VolGroup00-LogVol04    1985   1728   156    92%   /usr


...





#lvdisplay   VolGroup00/LogVol04


...


LV Size    2.45 GB


...








I did the following on /opt file system for testing, the results were
the same the filesystem did not get increased.





#umount /opt


#lvresize  -L +64 VolGroup00/LogVol07


#lvextend -L +64 VolGroup00/LogVol07





Any suggessions.












Jason Martin <jhmartin@toger.us>
Sent by: linux-lvm-bounces@redhat.com
12/15/2004 10:15 AM PST
Please respond to LVM general discussion and development


To: linux-lvm@redhat.com
cc:
bcc:
Subject: Re: [linux-lvm] How to increase/decrease space







On Wed, Dec 15, 2004 at 12:11:30PM -0600, AdabalaP@schneider.com wrote:
> (1) Added more space (350 meg) to /usr using the command "lvresize
-L+350".
> When i display the volume group using "lvdisplay" it shows 2.3 gb, But
when
> i use "df -m" it is still at 1.9 gb and 92% used state.
You've resized the volume but not the filesystem sitting on top
of it. Some filesystems can be resized online while others must
be unmounted. Some may not be resizable at all.


See http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html
<http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html> .


-Jason Martin
--
This message is PGP/MIME signed.


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
<https://www.redhat.com/mailman/listinfo/linux-lvm>
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
<http://tldp.org/HOWTO/LVM-HOWTO/>


 <<C.DTF>>  <<ATT190653.txt>>
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [linux-lvm] How to increase/decrease space
  2004-12-16 15:52 [linux-lvm] How to increase/decrease space AdabalaP
@ 2004-12-16 16:22 ` Klaus Strebel
  0 siblings, 0 replies; 12+ messages in thread
From: Klaus Strebel @ 2004-12-16 16:22 UTC (permalink / raw)
  To: LVM general discussion and development

AdabalaP@schneider.com wrote:
Hi Abdala,

seem's that you mix disks, partions, and filesystems. Here a little 
PC-primer that you get an idea what all the other people are talking about.

1. You have a disk - obviously an IDE-drive 'caue the Linux device name 
is hda.

2. On the disk, you have 2 Partitions, named hda1 and hda2.

3. On the first partition, you have an ext3 filesystem (?) probably for 
/boot ??, the second partition is the only phisical volume of your 
volume group VolGrp00 managed by LVM2, countaining several logical volumes.

4. The logical volumes in your volume group VolGrp00 containing are 
formatted with a ext3 filesystem.

> Austine,
> 
> I have a hard disk of 4.8GB which i partitioned it into 2 parts (hda1 = 100
> meg, hda2 = 4.7gb). The whole disk is of ext3 file system type.
This means, that /dev/hda is an ext3 filesystem ... if that's the case, 
then the filesystem spans all partiotions and all the logical volumes 
and if you were able to mount it, you will surely damage all the other 
stuff on you drive ... well, you can't : i think Linux doesn't allow 
mounting of overlapping devices/partitions, and if it does, the 
filesystem is surely already damaged ...

> The hda2 is managed by using lvm2.
But you said, all drive is ext3 - well, seems you mixed something up ;-)

> Following is the partition sizes of the hda2 disk;
> 
> hda2        VolGrp00          4.6 gb
> 
> /           VolGrp00/LogVol00 450 meg     35% used
> /usr        VolGrp00/LogVol04 1.9 gb      92% used
> /usr/local  VolGrp00/LogVol05 128 meg     25% used
> /home       VolGrp00/LogVol03 128 meg     60% used
> /opt        VolGrp00/LogVol02 128 meg     35% used
> /var        VolGrp00/LogVol07 450 meg     30 % used
> swap        VolGrp00/LogVol01 342 meg
> 
> Here is sequence of steps that i have performed to inc/dec the partition
> sizes;
> 
> tried to increase /usr size by 400 meg.
> 
>       #lvresize -L +450 VolGrp00/LogVol04
> 
>       when i display using the "lvdisplay VolGrp00/LogVOl04" i see 2.4 gig
> allocated to this partition, but when i   see it through "df -m /usr" it
> hasn't changed.
> 
>       So, As per Jason's email i have done the below;
> 
>       #lvextend -L2.4G VolGrp00/LogVol04
So you resized the logical volumes, which is a kind of 'virtual 
partition', but the filesystem is still of the same size, it doesn't 
recognize the the 'device' or 'partition' it lives on has grown, so you 
have to tell him to (Jason Martin told you earlier, and pointed you to 
the LVM-HOWTO <http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html>).

Instead of complainig you should have better read that doc, and you'd 
know what to do.

> 
>       But again this hasn't changed my "df -m /usr" output.
> 
> I thought using LVM commands one should be able to take care of the inc/dec
> of partitions sizes under a given VG. Why should i be using "fdisk" and
> "e2fsadm" ?
Well, if you'd read the e2fsadm man page before growing your lvol, you'd 
  have known what to do. For an offline ext3 (don't know Fedora, 
propably they aleady use the online resize patches for ext3 ?), you can 
use resize2fs to grow your filesystem.

> 
> If i have missed or done any thing wrong while resizing the partitions can
> please provide me an example so that i could try it.
Jason pointed you there in the first reply to your request, so Read That 
Fucking Manual ;-).

Ciao
Klaus

-- 
Mit freundlichen Gr�ssen / best regards

Klaus Strebel, Dipl.-Inform. (FH), mailto:klaus.strebel@gmx.net

/"\
\ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
/ \

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-16 17:09 Nicoya Helm
  0 siblings, 0 replies; 12+ messages in thread
From: Nicoya Helm @ 2004-12-16 17:09 UTC (permalink / raw)
  To: linux-lvm, AdabalaP

What you have done with the commands below is to resize the logical
volume and partition - not the file system that reside on that logical
volume/partition.  the df or du commands are only considering file
system space actively accessible to the OS, which is why you are not
seeing a change in /usr partition.

The next step is to "grow" or resize the file system on /usr to fill
the addtional space on VolGrp00/LogVol04

The simplest way would probably be to umount /usr, the use the
resize2fs command to grow the file system.  This command works for both
ext2 and 3.  

I'm not terribly familiar with resize2fs, as I mostly manage reiserfs,
but the man page is very straightforward:

http://www.zevils.com/cgi-bin/man/man2html?resize2fs+8

And the command will probably be something as simple as "resize2fs
/dev/VolGrp00/LogVol04 [or your specific device]".  According to the man
page, if you are wanting to extend to the full size of the partition,
you do not need to specify the size - that is the default interpretation
of the command.

The e2fsadm command is basically a combination of these two steps - it
grows the LV and the ext2/3 filesystem at the same time.  But, since
you've already resized the LV, you only need to grow the file system to
match.

Hope that helps!



Nicoya Helm
Project Manager, Network Services
University of Kansas Medical Center
nhelm2@kumc.edu

>>> AdabalaP@schneider.com 12/16/04 9:52 AM >>>
Austine,

I have a hard disk of 4.8GB which i partitioned it into 2 parts (hda1 =
100
meg, hda2 = 4.7gb). The whole disk is of ext3 file system type.The hda2
is
managed by using lvm2. Following is the partition sizes of the hda2
disk;

hda2        VolGrp00          4.6 gb

/           VolGrp00/LogVol00 450 meg     35% used
/usr        VolGrp00/LogVol04 1.9 gb      92% used
/usr/local  VolGrp00/LogVol05 128 meg     25% used
/home       VolGrp00/LogVol03 128 meg     60% used
/opt        VolGrp00/LogVol02 128 meg     35% used
/var        VolGrp00/LogVol07 450 meg     30 % used
swap        VolGrp00/LogVol01 342 meg

Here is sequence of steps that i have performed to inc/dec the
partition
sizes;

tried to increase /usr size by 400 meg.

      #lvresize -L +450 VolGrp00/LogVol04

      when i display using the "lvdisplay VolGrp00/LogVOl04" i see 2.4
gig
allocated to this partition, but when i   see it through "df -m /usr"
it
hasn't changed.

      So, As per Jason's email i have done the below;

      #lvextend -L2.4G VolGrp00/LogVol04

      But again this hasn't changed my "df -m /usr" output.

I thought using LVM commands one should be able to take care of the
inc/dec
of partitions sizes under a given VG. Why should i be using "fdisk"
and
"e2fsadm" ?

If i have missed or done any thing wrong while resizing the partitions
can
please provide me an example so that i could try it.

Thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-16 20:05 AdabalaP
  0 siblings, 0 replies; 12+ messages in thread
From: AdabalaP @ 2004-12-16 20:05 UTC (permalink / raw)
  To: Nicoya Helm; +Cc: linux-lvm

Thanks Nicoya. I was successfully able to increase the size of the "/usr"
file system, By using "resize2fs" command.

Now, that i am able to increase the FS size, how do i go about reducing the
FS size with out the data loss, especially with "/" file system ?

While increasing the space on a LV, Do i need to do lvresize, lvextend,
resize2fs or just lvextend and resize2fs ?

Thanks.




                                                                                                                                       
                      "Nicoya Helm"                                                                                                    
                      <NHELM2@kumc.edu>        To:       <linux-lvm@redhat.com>, <AdabalaP@schneider.com>                              
                                               cc:                                                                                     
                      12/16/2004 11:09         Subject:  RE: [linux-lvm] How to increase/decrease space                                
                      AM                                                                                                               
                                                                                                                                       
                                                                                                                                       




What you have done with the commands below is to resize the logical
volume and partition - not the file system that reside on that logical
volume/partition.  the df or du commands are only considering file
system space actively accessible to the OS, which is why you are not
seeing a change in /usr partition.

The next step is to "grow" or resize the file system on /usr to fill
the addtional space on VolGrp00/LogVol04

The simplest way would probably be to umount /usr, the use the
resize2fs command to grow the file system.  This command works for both
ext2 and 3.

I'm not terribly familiar with resize2fs, as I mostly manage reiserfs,
but the man page is very straightforward:

http://www.zevils.com/cgi-bin/man/man2html?resize2fs+8

And the command will probably be something as simple as "resize2fs
/dev/VolGrp00/LogVol04 [or your specific device]".  According to the man
page, if you are wanting to extend to the full size of the partition,
you do not need to specify the size - that is the default interpretation
of the command.

The e2fsadm command is basically a combination of these two steps - it
grows the LV and the ext2/3 filesystem at the same time.  But, since
you've already resized the LV, you only need to grow the file system to
match.

Hope that helps!



Nicoya Helm
Project Manager, Network Services
University of Kansas Medical Center
nhelm2@kumc.edu

>>> AdabalaP@schneider.com 12/16/04 9:52 AM >>>
Austine,

I have a hard disk of 4.8GB which i partitioned it into 2 parts (hda1 =
100
meg, hda2 = 4.7gb). The whole disk is of ext3 file system type.The hda2
is
managed by using lvm2. Following is the partition sizes of the hda2
disk;

hda2        VolGrp00          4.6 gb

/           VolGrp00/LogVol00 450 meg     35% used
/usr        VolGrp00/LogVol04 1.9 gb      92% used
/usr/local  VolGrp00/LogVol05 128 meg     25% used
/home       VolGrp00/LogVol03 128 meg     60% used
/opt        VolGrp00/LogVol02 128 meg     35% used
/var        VolGrp00/LogVol07 450 meg     30 % used
swap        VolGrp00/LogVol01 342 meg

Here is sequence of steps that i have performed to inc/dec the
partition
sizes;

tried to increase /usr size by 400 meg.

      #lvresize -L +450 VolGrp00/LogVol04

      when i display using the "lvdisplay VolGrp00/LogVOl04" i see 2.4
gig
allocated to this partition, but when i   see it through "df -m /usr"
it
hasn't changed.

      So, As per Jason's email i have done the below;

      #lvextend -L2.4G VolGrp00/LogVol04

      But again this hasn't changed my "df -m /usr" output.

I thought using LVM commands one should be able to take care of the
inc/dec
of partitions sizes under a given VG. Why should i be using "fdisk"
and
"e2fsadm" ?

If i have missed or done any thing wrong while resizing the partitions
can
please provide me an example so that i could try it.

Thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-16 21:20 Nicoya Helm
  0 siblings, 0 replies; 12+ messages in thread
From: Nicoya Helm @ 2004-12-16 21:20 UTC (permalink / raw)
  To: linux-lvm

>>> AdabalaP@schneider.com 12/16/04 2:05 PM >>> 
>Thanks Nicoya. I was successfully able to increase the size of the
"/usr"
>file system, By using "resize2fs" command.

>Now, that i am able to increase the FS size, how do i go about
reducing the
>FS size with out the data loss, especially with "/" file system ?

That part I don't have experience with, but obviously the first step is
to reduce the amount of actual data on the FS so that it is less than
the size you want to shrink it to. If you are using LVM 1, you can use
e2fsadm to shrink the LV and the FS in one step, but there is no e2fsadm
for LVM2 .  For LVM 2 you have to do the 2-step resize2fs and lvreduce
as described in this post to another list:

http://www.balug.org/pipermail/balug-talk/2002-April/000310.html 

>While increasing the space on a LV, Do i need to do lvresize,
lvextend,
>resize2fs or just lvextend and resize2fs ?

You should only need to do lvresize _or_ lvextend, then resize2fs.  



Nicoya Helm
Project Manager, Network Services
University of Kansas Medical Center
nhelm2@kumc.edu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [linux-lvm] How to increase/decrease space
@ 2004-12-20 17:02 AdabalaP
  0 siblings, 0 replies; 12+ messages in thread
From: AdabalaP @ 2004-12-20 17:02 UTC (permalink / raw)
  To: LVM general discussion and development

Thanks Nicoya, It worked.

I was able to reduce my root "/" file system size, following the
instructions in
http://www.balug.org/pipermail/balug-talk/2002-April/000310.html .

but had to perform three additional steps;
(a) disable "/" fs mount in "fstab"
 (b)    reboot using rescue CD, and perfrom (i) resize2fs, (ii) lvreduce
 (c)    mount the "/" fs and change the "fstab" to enable "/" fs mount and
reboot.

thanks for everyone help.




                                                                                                                                       
                      "Nicoya Helm"                                                                                                    
                      <NHELM2@kumc.edu>        To:       <linux-lvm@redhat.com>                                                        
                      Sent by:                 cc:                                                                                     
                      linux-lvm-bounces        Subject:  RE: [linux-lvm] How to increase/decrease space                                
                      @redhat.com                                                                                                      
                                                                                                                                       
                                                                                                                                       
                      12/16/2004 03:20                                                                                                 
                      PM                                                                                                               
                      Please respond to                                                                                                
                      LVM general                                                                                                      
                      discussion and                                                                                                   
                      development                                                                                                      
                                                                                                                                       
                                                                                                                                       




>>> AdabalaP@schneider.com 12/16/04 2:05 PM >>>
>Thanks Nicoya. I was successfully able to increase the size of the
"/usr"
>file system, By using "resize2fs" command.

>Now, that i am able to increase the FS size, how do i go about
reducing the
>FS size with out the data loss, especially with "/" file system ?

That part I don't have experience with, but obviously the first step is
to reduce the amount of actual data on the FS so that it is less than
the size you want to shrink it to. If you are using LVM 1, you can use
e2fsadm to shrink the LV and the FS in one step, but there is no e2fsadm
for LVM2 .  For LVM 2 you have to do the 2-step resize2fs and lvreduce
as described in this post to another list:

http://www.balug.org/pipermail/balug-talk/2002-April/000310.html

>While increasing the space on a LV, Do i need to do lvresize,
lvextend,
>resize2fs or just lvextend and resize2fs ?

You should only need to do lvresize _or_ lvextend, then resize2fs.



Nicoya Helm
Project Manager, Network Services
University of Kansas Medical Center
nhelm2@kumc.edu

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-12-20 17:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-16 15:52 [linux-lvm] How to increase/decrease space AdabalaP
2004-12-16 16:22 ` Klaus Strebel
  -- strict thread matches above, loose matches on Subject: below --
2004-12-20 17:02 AdabalaP
2004-12-16 21:20 Nicoya Helm
2004-12-16 20:05 AdabalaP
2004-12-16 17:09 Nicoya Helm
2004-12-16  3:01 Gonyou, Austin
2004-12-16  2:15 AdabalaP
2004-12-15 19:45 AdabalaP
2004-12-15 20:20 ` Jason Martin
2004-12-15 18:11 AdabalaP
2004-12-15 18:15 ` Jason Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox