Skip to contentSkip to conversation

online resize

linux-lvm Michael Schulz 11 participants 16 messages Mar 15, 2006 – Mar 27, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

can please anybody tell me where I can found an aktual informaiton about LVM2 and the filesystems which are currently support online resizing?

In th LVM Howto I can't find the needied informations.

Regards

#1 lore raw

[linux-lvm] XFS Decreasing Size

I don't actually want to do this, but after expanding the XFS partition size (using xfs_growfs ) of a Logical Volume and looking for the "BACKDOWN" information, I couldn't find a simple explanation for shrink the partition back down.

Is this possible with XFS, or does one need to use XFS Dump to migrate the data to another partition?

thanks,
James

Signature · 2 lines
----------------------------------------------------------------------------
"The proper function of man is to live, not to exist. I shall not waste my days in trying to prolong them. I shall use my time." (Jack London)
#2 lore raw

Re: [linux-lvm] XFS Decreasing Size

Quoted 2 lines · James Hammett

Is this possible with XFS, or does one need to use XFS Dump to migrate the data to another partition?

XFS does not currently support shrinking filesystems, only growing.

#3 lore raw
In reply to Michael Schulz
Quoted 3 lines · Michael Schulz

can please anybody tell me where I can found an aktual informaiton about LVM2 and the filesystems which are currently support online resizing?

I use reiserfs for quite a number of years now and it seems to work fine. You can resize the volume when it is mounted, although I prefer unmounting it first if that is possible. It also shrinks, I believe even online, but I don't do shrinking very often. (I have done, but filesystems tend to grow rather than shrink.)

mkreiserfs
resize_reiserfs

Regards,

Gunther

#4 lore raw

We use Reiser3 here and it can grow a volume whilst it is mounted, but you have to unmount the volume before you can shrink it.

The man pages for resize_reiserfs indicate that it should be used on unmounted volumes...

AFAIK, Reiser is the only filesystem in common use that allows volumes to be reduced.

Quoted 31 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Gunther Clasen
Sent: 16 March 2006 09:03
To: LVM general discussion and development
Subject: Re: [linux-lvm] online resize

Quoted 3 lines · Michael Schulz

can please anybody tell me where I can found an aktual informaiton about LVM2 and the filesystems which are currently support online resizing?

I use reiserfs for quite a number of years now and it seems to work fine. You can resize the volume when it is mounted, although I prefer unmounting it first if that is possible. It also shrinks, I believe even online, but I don't do shrinking very often. (I have done, but filesystems tend to grow rather than shrink.)

mkreiserfs
resize_reiserfs

Regards,

Gunther

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

#5 lore raw
Quoted 5 lines · Roger Lucas

We use Reiser3 here and it can grow a volume whilst it is mounted, but you have to unmount the volume before you can shrink it.

The man pages for resize_reiserfs indicate that it should be used on unmounted volumes...

AFAIK, Reiser is the only filesystem in common use that allows volumes to be reduced.

Note that Reiser4 no longer supports this. :(

------------------------------------------------------------------------

| nate carlson | [email protected] | http://www.natecarlson.com |
|       depriving some poor village of its idiot since 1981            |

------------------------------------------------------------------------

#6 lore raw
Quoted 11 lines · Nate Carlson
Quoted 8 lines · Roger Lucas

We use Reiser3 here and it can grow a volume whilst it is mounted, but you have to unmount the volume before you can shrink it.

The man pages for resize_reiserfs indicate that it should be used on unmounted volumes...

AFAIK, Reiser is the only filesystem in common use that allows volumes to be reduced.

Note that Reiser4 no longer supports this. :(

According to the wikipedia page on Reiser4
<http://en.wikipedia.org/wiki/Reiser4>, Namesys will add this if someone pays them to.

ext2/3 has supported resizing for quite some time.

Dave Brown

#7 lore raw
In reply to Roger Lucas
Quoted 2 lines · Roger Lucas

AFAIK, Reiser is the only filesystem in common use that allows volumes to be reduced.

ext2/3 can do that, too. Since years. But you have to unmount first.

urs

#8 lore raw
In reply to Roger Lucas
Quoted 5 lines · Roger Lucas

We use Reiser3 here and it can grow a volume whilst it is mounted, but you have to unmount the volume before you can shrink it.

The man pages for resize_reiserfs indicate that it should be used on unmounted volumes...

reiser3, resizable online in two ways (growing only)
1)resize_reiserfs /path/to/dev 2)mount -o remount,resize /path/to/dev
To shrink reiser3 filesystem it must be unmounted.

XFS, MUST be mounted to resize use xfs_grow /mount/point
JFS, resizable online with a mount -o remount,resize /path/to/dev ext2/3, resizable offline reliably. Online resize is a *very* experimental experiment. Have good backups.

For a good reference if one is ever needed to give to a friend, relative or foe try http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html

Signature · 3 lines
Zac Slade
[email protected]
ICQ:1415282 YM:krakrjak AIM:ttyp99
#9 lore raw
Quoted 1 line · Zac Slade

ext2/3, resizable offline reliably. Online resize is a *very* experimental experiment. Have good backups.

ext2/3 online resize is available as default in RedHat 4, and it just works.

L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#10 lore raw
Quoted 6 lines · Luca Berra
Quoted 2 lines · Zac Slade

ext2/3, resizable offline reliably. Online resize is a *very* experimental experiment. Have good backups.

ext2/3 online resize is available as default in RedHat 4, and it just works.

I'm glad that's the case for you. If it works don't fix it. However, from recent experience it is not release quality (especially for shrinking).

Signature · 3 lines
Zac Slade
[email protected]
ICQ:1415282 YM:krakrjak AIM:ttyp99
#11 lore raw
Quoted 8 lines · Zac Slade
Quoted 6 lines · Luca Berra
Quoted 2 lines · Zac Slade

ext2/3, resizable offline reliably. Online resize is a *very* experimental experiment. Have good backups.

ext2/3 online resize is available as default in RedHat 4, and it just works.

I'm glad that's the case for you. If it works don't fix it. However, from recent experience it is not release quality (especially for shrinking).

if you have any horror story, please share it, it will surely help other users out there.

Regards,
L.

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
#12 lore raw
Quoted 2 lines · Luca Berra

if you have any horror story, please share it, it will surely help other users out there.

Distribution: Gentoo
Data: /home
Target: Resize from 1GiB to 800MiB (plenty of free space)
Filesystem: ext3
Method: ext2resize with kernel patches and latest e2fsprogs

Unmount /home in single user mode. Resize using ext resizing utilities and spend the next 12 hours recovering inodes with fsck only to find a few hundred megs of data in /home/lost+found (with nonsensical names) and swearing off ext3 for mission critical data.

Signature · 3 lines
Zac Slade
[email protected]
ICQ:1415282 YM:krakrjak AIM:ttyp99
#13 lore raw
Quoted 9 lines · Zac Slade
Quoted 2 lines · Luca Berra

if you have any horror story, please share it, it will surely help other users out there.

Distribution: Gentoo
Data: /home
Target: Resize from 1GiB to 800MiB (plenty of free space)
Filesystem: ext3
Method: ext2resize with kernel patches and latest e2fsprogs

Quoted 4 lines

Unmount /home in single user mode. Resize using ext resizing utilities and spend the next 12 hours recovering inodes with fsck only to find a few hundred megs of data in /home/lost+found (with nonsensical names) and swearing off ext3 for mission critical data.

Nice story, but as a bug report, this is mostly useless:

* After umount, did you run an e2fsck -f?

* Do you have a script(1) log of the whole session? (You'd probably have this started as a last resort log then you started the fsck'ing after the resize.)

* What exactly is "ext resizing utilities"? Did you save a copy of it (incl. sources to find out about additionally applied patches?)

* These nonsensical names you refer to are the file's inode numbers, in decimal. For mission-critical systems, it's wise to regularly get inode listings with filenames. Did you compare those inode numbers with your backups?

* Did you prepare an image-backup of your 1GB container beforehand? Helps for easy recovery as well as error reproduction (esp. because 1GB isn't all that hard to store on one CD when there's plenty of free space, which can be made to compress very well.)

MfG, JBG

Signature · 4 lines
Jan-Benedict Glaw       [email protected]    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
#14 lore raw
Quoted 1 line · Jan-Benedict Glaw

Nice story, but as a bug report, this is mostly useless:

This is not a bug report. I did not file one (at the time I didn't have the time to track it). And I needed my data then. The time it would take to track the bug down, get a fix and get it running would have put me even further behind. I remade the fs into reiser3 and restored the data. I have had many successful resizes (but grow and shrink) since using reiser3.

Quoted 1 line

* After umount, did you run an e2fsck -f?

Yes.

Quoted 3 lines

* Do you have a script(1) log of the whole session? (You'd probably have this started as a last resort log then you started the fsck'ing after the resize.)

No. The session was not run through script(1).

Quoted 2 lines

* What exactly is "ext resizing utilities"? Did you save a copy of it (incl. sources to find out about additionally applied patches?)

resize2fs. I do not have a copy of the version used.

Quoted 4 lines

* These nonsensical names you refer to are the file's inode numbers, in decimal. For mission-critical systems, it's wise to regularly get inode listings with filenames. Did you compare those inode numbers with your backups?

I know they are inode numbers, but they don't help you much in that situation. You think people keep inode listings with backups? What a perfect world you live in. I think it's not superflous information, but it is not a part of your average backup. As a matter of fact I've not incountered a system that does this. Sure you can do this on your own and it sort of makes sense. This just seems like a strange suggestion to me.

Quoted 4 lines

* Did you prepare an image-backup of your 1GB container beforehand? Helps for easy recovery as well as error reproduction (esp. because 1GB isn't all that hard to store on one CD when there's plenty of free space, which can be made to compress very well.)

I did restore the data eventually. I apologize if that was not clear. I was frustrated that the tool did not perform as expected and it is something I should have followed up on with a bug report. I should go back and do some experimenting with the current e2fsprogs and see if they behave better now.

Signature · 3 lines
Zac Slade
[email protected]
ICQ:1415282 YM:krakrjak AIM:ttyp99
#15 lore raw
Quoted 4 lines · Zac Slade
Quoted 3 lines

* Do you have a script(1) log of the whole session? (You'd probably have this started as a last resort log then you started the fsck'ing after the resize.)

No. The session was not run through script(1).

That's something I learned the hard way, too. Though that was not a Linux session.

Quoted 10 lines
Quoted 4 lines

* These nonsensical names you refer to are the file's inode numbers, in decimal. For mission-critical systems, it's wise to regularly get inode listings with filenames. Did you compare those inode numbers with your backups?

I know they are inode numbers, but they don't help you much in that situation. You think people keep inode listings with backups? What a perfect world you live in. I think it's not superflous information, but it is not a part of your average backup. As a matter of fact I've not incountered a system that does this. Sure you can do this on your own and it sort of makes sense. This just seems like a strange suggestion to me.

inode/filename listings are rarely heared of, but I have them at my hands for the backups I drive. Learned that the hard way, too... Again, not on a Linux box.

Quoted 8 lines
Quoted 4 lines

* Did you prepare an image-backup of your 1GB container beforehand? Helps for easy recovery as well as error reproduction (esp. because 1GB isn't all that hard to store on one CD when there's plenty of free space, which can be made to compress very well.)

I did restore the data eventually. I apologize if that was not clear. I was frustrated that the tool did not perform as expected and it is something I should have followed up on with a bug report. I should go back and do some experimenting with the current e2fsprogs and see if they behave better now.

So at least you had no data loss. That's most important.

MfG, JBG

Signature · 4 lines
Jan-Benedict Glaw       [email protected]    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));