Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-23 Thread Markus Falb
On 19.6.2012 06:25, Robert Nichols wrote:
> On 06/18/2012 03:09 PM, Jeff Boyce wrote:
>> Well, I have never seen a reference to resize4fs before (and yes my FS is
>> ext4).  It is not on my Centos 6.2 system, and doing a little searching
>> through repositories for that specifically, or e4fsprogs, and I can't find
>> it anywhere to even try it.  Any google reference seems to point back to
>> resize2fs.  I ended up booting a live SystemRescueCD and using GParted via
>> the GUI.  My notes indicate that is what I had done previously also.  I am
>> still stumped, everything that I have read indicates that resize2fs can do a
>> live resizing on ext4 file systems.  Can anybody confirm or deny this?
> 
> In CentOS 5.x ext4 was experimental, and there was a separate "e4fsprogs"

ext4 *is* fully supported since 5.6, but the separate e4fsprogs stayed.
-- 
Kind Regards, Markus Falb



signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-19 Thread Jeff Boyce
Replying to the daily digest, with my response at the bottom.


> Message: 18
> Date: Mon, 18 Jun 2012 22:28:31 +0200
> From: Dennis Jacobfeuerborn 
> Subject: Re: [CentOS] Resizing est4 filesystem while mounted
> To: centos@centos.org
> Message-ID: <4fdf8f6f.8030...@conversis.de>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 06/18/2012 10:09 PM, Jeff Boyce wrote:
>> Replying to the daily digest, with my response at the bottom.
>>
>>
>>
>>> Message: 13
>>> Date: Fri, 15 Jun 2012 12:22:08 -0700
>>> From: Ray Van Dolson 
>>> Subject: Re: [CentOS] Resizing est4 filesystem while mounted
>>> To: centos@centos.org
>>> Message-ID: <20120615192207.ga23...@bludgeon.org>
>>> Content-Type: text/plain; charset=us-ascii
>>>
>>> On Fri, Jun 15, 2012 at 12:10:09PM -0700, Jeff Boyce wrote:
>>>> Greetings -
>>>>
>>>> I had a logical volume that was running out of space on a virtual
>>>> machine.
>>>> I successfully expanded the LV using lvextend, and lvdisplay shows that
>>>> it
>>>> has been expanded. Then I went to expand the filesystem to fill the new
>>>> space (# resize2fs -p /dev/vde1) and I get the results that the
>>>> filesystem
>>>> is already xx blocks long, nothing to do. If I do a # df -h, I can see
>>>> that
>>>> the filesystem has not been extended. I could kick the users off the 
>>>> VM,
>>>> reboot the VM using a GParted live CD and extend the filesystem that 
>>>> way,
>>>> but I thought that it was possible to do this live and mounted? The RH
>>>> docs
>>>> say this is possible; the man page for resize2fs also says it is 
>>>> possible
>>>> with ext4. What am I missing here? This is a Centos 6.2 VM with an ext4
>>>> filesystem. The logical volumes are setup on the host system which is
>>>> also
>>>> a Centos 6.2 system.
>>>
>>> Try resize4fs (assuming your FS is ext4).
>>>
>>> Ray
>>
>> Well, I have never seen a reference to resize4fs before (and yes my FS is
>> ext4).  It is not on my Centos 6.2 system, and doing a little searching
>> through repositories for that specifically, or e4fsprogs, and I can't 
>> find
>> it anywhere to even try it.  Any google reference seems to point back to
>> resize2fs.  I ended up booting a live SystemRescueCD and using GParted 
>> via
>> the GUI.  My notes indicate that is what I had done previously also.  I 
>> am
>> still stumped, everything that I have read indicates that resize2fs can 
>> do a
>> live resizing on ext4 file systems.  Can anybody confirm or deny this? 
>> Is
>> the reason I can't do this because it is on an LVM logical volume? 
>> Thanks.
>
> Please post some details about your storage topology. Without this
> information its not really possible to be sure what is going on.
> resizefs cannot work as long as the underlying layers don't see any change
> in size and you didn't seem to look for that.
>
> Regards,
>   Dennis


I provided some of that information in my original post, but if you can help 
explain why I couldn't seem to resize the file system while mounted here is 
more information.

Host system is Centos 6.2 on a Dell PE T610 with hardware raid on a PERC 
H700.  Raid 5 is setup across three disks with a fourth hot spare.  I have 
created a volume group within the raid 5 encompassing most of my drive 
space.  Within the VG I have created numerous logical volumes that are 
assigned to specific systems.

Volume Group:  vg_mei
Logical Volumes:
   lv_earthroot
   lv_earthswap
   lv_earthvar
   lv_sequoiaroot
   lv_sequoiaswap
   lv_sequoiavar
   lv_sequoiahome
   lv_sequoiaecosystem

Earth is my host system and Sequoia is one of the guest systems. 
lv_sequoiaecosystem is the space dedicated to our Samba server and is the LV 
that I was expanding to make more space available to the rest of the staff. 
I had successfully extended lv_sequoiaecosystem using the following command 
from root on earth (lvextend -L+50G /dev/vg_mei/lv_sequoiaecosystem). 
Issuing the command  (lvdisplay /dev/vg_mei/lv_sequoiaecosystem) following 
this showed that the LV was successfully extended from 100 to 150 GB.

I then logged onto sequoia as root and issued a df -h to determine which 
device needed the file system to be resized (/dev/vde1).  The output below 
is current, after I resized the filesystem using GParted.

[root@sequoia ~]# df -h
FilesystemSize  Used Avail Use% Mounted on
/dev/vda2 4.5G  2.5G  1.8G  59% /
tmpfs1004

Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-18 Thread Robert Nichols
On 06/18/2012 03:09 PM, Jeff Boyce wrote:
> Well, I have never seen a reference to resize4fs before (and yes my FS is
> ext4).  It is not on my Centos 6.2 system, and doing a little searching
> through repositories for that specifically, or e4fsprogs, and I can't find
> it anywhere to even try it.  Any google reference seems to point back to
> resize2fs.  I ended up booting a live SystemRescueCD and using GParted via
> the GUI.  My notes indicate that is what I had done previously also.  I am
> still stumped, everything that I have read indicates that resize2fs can do a
> live resizing on ext4 file systems.  Can anybody confirm or deny this?

In CentOS 5.x ext4 was experimental, and there was a separate "e4fsprogs"
package containing the tools for working with it.  As of version 6.0,
ext4 is considered mainstream, and the tools have been merged back under
the ext2 umbrella, just as with ext3.

-- 
Bob Nichols "NOSPAM" is really part of my email address.
 Do NOT delete it.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-18 Thread Dennis Jacobfeuerborn
On 06/18/2012 10:09 PM, Jeff Boyce wrote:
> Replying to the daily digest, with my response at the bottom.
> 
> 
> 
>> Message: 13
>> Date: Fri, 15 Jun 2012 12:22:08 -0700
>> From: Ray Van Dolson 
>> Subject: Re: [CentOS] Resizing est4 filesystem while mounted
>> To: centos@centos.org
>> Message-ID: <20120615192207.ga23...@bludgeon.org>
>> Content-Type: text/plain; charset=us-ascii
>>
>> On Fri, Jun 15, 2012 at 12:10:09PM -0700, Jeff Boyce wrote:
>>> Greetings -
>>>
>>> I had a logical volume that was running out of space on a virtual 
>>> machine.
>>> I successfully expanded the LV using lvextend, and lvdisplay shows that 
>>> it
>>> has been expanded. Then I went to expand the filesystem to fill the new
>>> space (# resize2fs -p /dev/vde1) and I get the results that the 
>>> filesystem
>>> is already xx blocks long, nothing to do. If I do a # df -h, I can see 
>>> that
>>> the filesystem has not been extended. I could kick the users off the VM,
>>> reboot the VM using a GParted live CD and extend the filesystem that way,
>>> but I thought that it was possible to do this live and mounted? The RH 
>>> docs
>>> say this is possible; the man page for resize2fs also says it is possible
>>> with ext4. What am I missing here? This is a Centos 6.2 VM with an ext4
>>> filesystem. The logical volumes are setup on the host system which is 
>>> also
>>> a Centos 6.2 system.
>>
>> Try resize4fs (assuming your FS is ext4).
>>
>> Ray
> 
> Well, I have never seen a reference to resize4fs before (and yes my FS is 
> ext4).  It is not on my Centos 6.2 system, and doing a little searching 
> through repositories for that specifically, or e4fsprogs, and I can't find 
> it anywhere to even try it.  Any google reference seems to point back to 
> resize2fs.  I ended up booting a live SystemRescueCD and using GParted via 
> the GUI.  My notes indicate that is what I had done previously also.  I am 
> still stumped, everything that I have read indicates that resize2fs can do a 
> live resizing on ext4 file systems.  Can anybody confirm or deny this?  Is 
> the reason I can't do this because it is on an LVM logical volume?  Thanks.

Please post some details about your storage topology. Without this
information its not really possible to be sure what is going on.
resizefs cannot work as long as the underlying layers don't see any change
in size and you didn't seem to look for that.

Regards,
   Dennis
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-18 Thread Ray Van Dolson
On Mon, Jun 18, 2012 at 01:09:01PM -0700, Jeff Boyce wrote:
> >On Fri, Jun 15, 2012 at 12:10:09PM -0700, Jeff Boyce wrote:
> >>Greetings -
> >>
> >>I had a logical volume that was running out of space on a
> >>virtual machine.
> >>I successfully expanded the LV using lvextend, and lvdisplay
> >>shows that it
> >>has been expanded. Then I went to expand the filesystem to fill the new
> >>space (# resize2fs -p /dev/vde1) and I get the results that the
> >>filesystem
> >>is already xx blocks long, nothing to do. If I do a # df -h, I
> >>can see that
> >>the filesystem has not been extended. I could kick the users off the VM,
> >>reboot the VM using a GParted live CD and extend the filesystem that way,
> >>but I thought that it was possible to do this live and mounted?
> >>The RH docs
> >>say this is possible; the man page for resize2fs also says it is possible
> >>with ext4. What am I missing here? This is a Centos 6.2 VM with an ext4
> >>filesystem. The logical volumes are setup on the host system
> >>which is also
> >>a Centos 6.2 system.
> >
> >Try resize4fs (assuming your FS is ext4).
> >
> >Ray
> 
> Well, I have never seen a reference to resize4fs before (and yes my
> FS is ext4).  It is not on my Centos 6.2 system, and doing a little
> searching through repositories for that specifically, or e4fsprogs,
> and I can't find it anywhere to even try it.  Any google reference
> seems to point back to resize2fs.  I ended up booting a live
> SystemRescueCD and using GParted via the GUI.  My notes indicate
> that is what I had done previously also.  I am still stumped,
> everything that I have read indicates that resize2fs can do a live
> resizing on ext4 file systems.  Can anybody confirm or deny this?
> Is the reason I can't do this because it is on an LVM logical
> volume?  Thanks.
> 
> Jeff Boyce
> Meridian Environmental
> 

Interesting.  Maybe this is a difference between a 6.x and 5.x system.
On my RHEL 5.8 system:

# rpm -qf /sbin/resize4fs
e4fsprogs-1.41.12-2.el5

I see now from my Satellite server that this package dose not exist for
6.x.

It's not clear to me why you ran into the issue you did.  Will keep an
eye out for this here.

Ray
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-18 Thread Jeff Boyce
Replying to the daily digest, with my response at the bottom.



>Message: 13
>Date: Fri, 15 Jun 2012 12:22:08 -0700
>From: Ray Van Dolson 
>Subject: Re: [CentOS] Resizing est4 filesystem while mounted
>To: centos@centos.org
>Message-ID: <20120615192207.ga23...@bludgeon.org>
>Content-Type: text/plain; charset=us-ascii
>
>On Fri, Jun 15, 2012 at 12:10:09PM -0700, Jeff Boyce wrote:
>> Greetings -
>>
>> I had a logical volume that was running out of space on a virtual 
>> machine.
>> I successfully expanded the LV using lvextend, and lvdisplay shows that 
>> it
>> has been expanded. Then I went to expand the filesystem to fill the new
>> space (# resize2fs -p /dev/vde1) and I get the results that the 
>> filesystem
>> is already xx blocks long, nothing to do. If I do a # df -h, I can see 
>> that
>> the filesystem has not been extended. I could kick the users off the VM,
>> reboot the VM using a GParted live CD and extend the filesystem that way,
>> but I thought that it was possible to do this live and mounted? The RH 
>> docs
>> say this is possible; the man page for resize2fs also says it is possible
>> with ext4. What am I missing here? This is a Centos 6.2 VM with an ext4
>> filesystem. The logical volumes are setup on the host system which is 
>> also
>> a Centos 6.2 system.
>
>Try resize4fs (assuming your FS is ext4).
>
>Ray

Well, I have never seen a reference to resize4fs before (and yes my FS is 
ext4).  It is not on my Centos 6.2 system, and doing a little searching 
through repositories for that specifically, or e4fsprogs, and I can't find 
it anywhere to even try it.  Any google reference seems to point back to 
resize2fs.  I ended up booting a live SystemRescueCD and using GParted via 
the GUI.  My notes indicate that is what I had done previously also.  I am 
still stumped, everything that I have read indicates that resize2fs can do a 
live resizing on ext4 file systems.  Can anybody confirm or deny this?  Is 
the reason I can't do this because it is on an LVM logical volume?  Thanks.

Jeff Boyce
Meridian Environmental

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-16 Thread Dennis Jacobfeuerborn
On 06/16/2012 10:59 AM, Peter Eckel wrote:
> Hi Dennis, 
> 
>> The partitioning of the new disk in the guest is important because if you
>> use the disk directly as a PV then this PV will also be shown on the host.
>> An alternative is to modify the LVM filters in /etc/lvm/lvm.conf on the
>> host to specifically not scan the LV for the new disk.
>> I find it easier to create a partition though (i.e. use /dev/vda1 instead
>> of /dev/vda as the PV).
> 
> Thanks for your explanation. Until now I just filteres the guests' PVs on the 
> host on the "human interface level" by simply ignoring them, but yours is 
> definitely the cleaner and more secure way. 
> 
> Maybe I missed something, but in what way is it easier to partition each and 
> every LV one wants to use as a PV in a guest than to specify a proper filter 
> in /etc/lvm/lvm.conf once? 
> 
> I use a consistent naming scheme for the lv's like
> 
>   /dev/vg_/lv_virt_
> 
> and use the filter 
> 
>   filter = [ "r|/dev/vg_\d+/lv_virt_\.*|" ]
> 
> to ignore all the guest's PVs. Is there any downside in doing that, or are 
> there any advantages in using partitions instead of raw 'devices' for the PVs?

I don't think there are any meaningful advantages or disadvantages to
either approach. The partition approach allows you to copy and use the
disks on any system regardless of the filter configuration because LVM can
never see the metadata directly but even then if you forget the filter this
just makes things look a bit untidy until the filter is in place.

Hopefully the new virtio-scsi driver will allow the on-the-fly resizing of
virtual disks and make the live extension of diskspace in virtual machines
less cumbersome.

Regards,
  Dennis
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-16 Thread Peter Eckel
Hi Dennis, 

> The partitioning of the new disk in the guest is important because if you
> use the disk directly as a PV then this PV will also be shown on the host.
> An alternative is to modify the LVM filters in /etc/lvm/lvm.conf on the
> host to specifically not scan the LV for the new disk.
> I find it easier to create a partition though (i.e. use /dev/vda1 instead
> of /dev/vda as the PV).

Thanks for your explanation. Until now I just filteres the guests' PVs on the 
host on the "human interface level" by simply ignoring them, but yours is 
definitely the cleaner and more secure way. 

Maybe I missed something, but in what way is it easier to partition each and 
every LV one wants to use as a PV in a guest than to specify a proper filter in 
/etc/lvm/lvm.conf once? 

I use a consistent naming scheme for the lv's like

  /dev/vg_/lv_virt_

and use the filter 

  filter = [ "r|/dev/vg_\d+/lv_virt_\.*|" ]

to ignore all the guest's PVs. Is there any downside in doing that, or are 
there any advantages in using partitions instead of raw 'devices' for the PVs?

Best regards, 

  Peter.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-15 Thread Ross Cavanagh
On Sat, Jun 16, 2012 at 4:30 AM, Dennis Jacobfeuerborn <
denni...@conversis.de> wrote:

> On 06/15/2012 09:10 PM, Jeff Boyce wrote:
> > Greetings -
> >
> > I had a logical volume that was running out of space on a virtual
> machine.
> > I successfully expanded the LV using lvextend, and lvdisplay shows that
> it
> > has been expanded.  Then I went to expand the filesystem to fill the new
> > space (# resize2fs -p /dev/vde1) and I get the results that the
> filesystem
> > is already xx blocks long, nothing to do.  If I do a # df -h, I can see
> that
> > the filesystem has not been extended.  I could kick the users off the VM,
> > reboot the VM using a GParted live CD and extend the filesystem that way,
> > but I thought that it was possible to do this live and mounted?  The RH
> docs
> > say this is possible; the man page for resize2fs also says it is possible
> > with ext4.  What am I missing here?  This is a Centos 6.2 VM with an ext4
> > filesystem.  The logical volumes are setup on the host system which is
> also
> > a Centos 6.2 system.
>
> You didn't really specify your topology accurately so I assume you used
> lvextend on the host side. This will not be visible until you rebooted the
> guest.
>
> The only way to resize without taking the system offline is to use lvm in
> the guest. Add a new virtual disk on the host side which results in a
> hot-plug event in the guest (i.e. you should see the new drive added in the
> guest). Now create a single partition on the drive (this is important!) and
> use pvcreate to turn it into a physical volume. Now add the new PV to the
> Volume Group. Finally you can lvextend the LV in the guest and resize the
> filesystem.
>
> The partitioning of the new disk in the guest is important because if you
> use the disk directly as a PV then this PV will also be shown on the host.
> An alternative is to modify the LVM filters in /etc/lvm/lvm.conf on the
> host to specifically not scan the LV for the new disk.
> I find it easier to create a partition though (i.e. use /dev/vda1 instead
> of /dev/vda as the PV).
>
> Regards,
>  Dennis
>
> Not sure if this link would help, I used to refer to this now and then if
I needed to extend an online partition -->
http://www.randombugs.com/linux/howto-extend-lvm-partition-online.html
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-15 Thread Dennis Jacobfeuerborn
On 06/15/2012 09:10 PM, Jeff Boyce wrote:
> Greetings -
> 
> I had a logical volume that was running out of space on a virtual machine. 
> I successfully expanded the LV using lvextend, and lvdisplay shows that it 
> has been expanded.  Then I went to expand the filesystem to fill the new 
> space (# resize2fs -p /dev/vde1) and I get the results that the filesystem 
> is already xx blocks long, nothing to do.  If I do a # df -h, I can see that 
> the filesystem has not been extended.  I could kick the users off the VM, 
> reboot the VM using a GParted live CD and extend the filesystem that way, 
> but I thought that it was possible to do this live and mounted?  The RH docs 
> say this is possible; the man page for resize2fs also says it is possible 
> with ext4.  What am I missing here?  This is a Centos 6.2 VM with an ext4 
> filesystem.  The logical volumes are setup on the host system which is also 
> a Centos 6.2 system.

You didn't really specify your topology accurately so I assume you used
lvextend on the host side. This will not be visible until you rebooted the
guest.

The only way to resize without taking the system offline is to use lvm in
the guest. Add a new virtual disk on the host side which results in a
hot-plug event in the guest (i.e. you should see the new drive added in the
guest). Now create a single partition on the drive (this is important!) and
use pvcreate to turn it into a physical volume. Now add the new PV to the
Volume Group. Finally you can lvextend the LV in the guest and resize the
filesystem.

The partitioning of the new disk in the guest is important because if you
use the disk directly as a PV then this PV will also be shown on the host.
An alternative is to modify the LVM filters in /etc/lvm/lvm.conf on the
host to specifically not scan the LV for the new disk.
I find it easier to create a partition though (i.e. use /dev/vda1 instead
of /dev/vda as the PV).

Regards,
  Dennis
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resizing est4 filesystem while mounted

2012-06-15 Thread Ray Van Dolson
On Fri, Jun 15, 2012 at 12:10:09PM -0700, Jeff Boyce wrote:
> Greetings -
> 
> I had a logical volume that was running out of space on a virtual machine. 
> I successfully expanded the LV using lvextend, and lvdisplay shows that it 
> has been expanded.  Then I went to expand the filesystem to fill the new 
> space (# resize2fs -p /dev/vde1) and I get the results that the filesystem 
> is already xx blocks long, nothing to do.  If I do a # df -h, I can see that 
> the filesystem has not been extended.  I could kick the users off the VM, 
> reboot the VM using a GParted live CD and extend the filesystem that way, 
> but I thought that it was possible to do this live and mounted?  The RH docs 
> say this is possible; the man page for resize2fs also says it is possible 
> with ext4.  What am I missing here?  This is a Centos 6.2 VM with an ext4 
> filesystem.  The logical volumes are setup on the host system which is also 
> a Centos 6.2 system.

Try resize4fs (assuming your FS is ext4).

Ray
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Resizing est4 filesystem while mounted

2012-06-15 Thread Jeff Boyce
Greetings -

I had a logical volume that was running out of space on a virtual machine. 
I successfully expanded the LV using lvextend, and lvdisplay shows that it 
has been expanded.  Then I went to expand the filesystem to fill the new 
space (# resize2fs -p /dev/vde1) and I get the results that the filesystem 
is already xx blocks long, nothing to do.  If I do a # df -h, I can see that 
the filesystem has not been extended.  I could kick the users off the VM, 
reboot the VM using a GParted live CD and extend the filesystem that way, 
but I thought that it was possible to do this live and mounted?  The RH docs 
say this is possible; the man page for resize2fs also says it is possible 
with ext4.  What am I missing here?  This is a Centos 6.2 VM with an ext4 
filesystem.  The logical volumes are setup on the host system which is also 
a Centos 6.2 system.

Jeff Boyce
Meridian Environmental

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos