FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-10-2008, 02:26 AM
Rick Pasotto
 
Default resize2fs

I would like to increase the size of my /var partition. It is a logical
volume so I made it bigger with lvexpand. I then ran resize2fs, which
according to the man page works on mounted file systems with kernels
after 2.6 and my kernel is 2.6.22-3-k7. However, this is the output of
the command:

resize2fs 1.40.3 (05-Dec-2007)
Filesystem at /dev/vg0/var is mounted on /var; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
resize2fs: Filesystem does not support online resizing

The mount command gives:

/dev/mapper/vg0-var on /var type ext3 (rw)

Is online resizing a compile time flag that debian doesn't set?

lvdisplay now gives:

--- Logical volume ---
LV Name /dev/vg0/var
VG Name vg0
LV UUID SnuTgs-0Lvs-2BmS-TqQ8-Onj0-3xss-SrMjPS
LV Write Access read/write
LV Status available
# open 1
LV Size 25.00 GB
Current LE 6400
Segments 3
Allocation inherit
Read ahead sectors 0
Block device 254:2

but df still gives:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-var 15G 12G 2.1G 86% /var

Has the file system been expanded or not? Do I need to reboot to get
things in sync? I can't unmount/mount /var since many processes use it.

--
"Experience is that marvelous thing that enables you recognize a mistake
when you make it again." -- Franklin P. Jones
Rick Pasotto rick@niof.net http://www.niof.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2008, 03:03 AM
Andrew Reid
 
Default resize2fs

On Wednesday 09 January 2008 22:26, Rick Pasotto wrote:
> I would like to increase the size of my /var partition. It is a logical
> volume so I made it bigger with lvexpand. I then ran resize2fs, which
> according to the man page works on mounted file systems with kernels
> after 2.6 and my kernel is 2.6.22-3-k7. However, this is the output of
> the command:
>
> resize2fs 1.40.3 (05-Dec-2007)
> Filesystem at /dev/vg0/var is mounted on /var; on-line resizing required
> old desc_blocks = 1, new_desc_blocks = 2
> resize2fs: Filesystem does not support online resizing

I ran into this a while ago also, I have no explanation.
But I know the next one:

>
> lvdisplay now gives:
>
> --- Logical volume ---
> LV Name /dev/vg0/var
> ...
> LV Size 25.00 GB
> ...
>
> but df still gives:
>
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/vg0-var 15G 12G 2.1G 86% /var
>
> Has the file system been expanded or not?

No, the file system has not been resized yet, only the
(virtual) device on which it resides has been resized.
Rebooting in and of itself won't change this.

It may be possible to reboot with init=/bin/sh, which
will not start many processes, and resize it from that
environment. You may have to manually activate the lv
before you can talk to it.

Possibly somebody else has a less drastic suggestion?

-- A.
--
Andrew Reid / reidac@bellatlantic.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2008, 04:45 AM
Daniel Burrows
 
Default resize2fs

On Wed, Jan 09, 2008 at 10:26:54PM -0500, Rick Pasotto <rick@niof.net> was heard to say:
> I would like to increase the size of my /var partition. It is a logical
> volume so I made it bigger with lvexpand. I then ran resize2fs, which
> according to the man page works on mounted file systems with kernels
> after 2.6 and my kernel is 2.6.22-3-k7. However, this is the output of
> the command:
>
> resize2fs 1.40.3 (05-Dec-2007)
> Filesystem at /dev/vg0/var is mounted on /var; on-line resizing required
> old desc_blocks = 1, new_desc_blocks = 2
> resize2fs: Filesystem does not support online resizing

AIUI this means you didn't create the filesystem with "-O resize_inode",
so you can't do online resizing. Unfortunately there's no way to change
this after the filesystem is created (see bug #351720), so you're stuck
booting into single-user mode and unmounting /var, or making a boot disk
and running resize2fs from there.

Daniel


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2008, 12:08 PM
Theodore Tso
 
Default resize2fs

On Wed, Jan 09, 2008 at 09:45:30PM -0800, Daniel Burrows wrote:
> > resize2fs: Filesystem does not support online resizing
>
> AIUI this means you didn't create the filesystem with "-O resize_inode",
> so you can't do online resizing. Unfortunately there's no way to change
> this after the filesystem is created (see bug #351720), so you're stuck
> booting into single-user mode and unmounting /var, or making a boot disk
> and running resize2fs from there.

Well, there *is*, but you have to run an off-line program once
(ext2prepare, in the ext2resize package first). The reason why that
program hasn't been integrated into e2fsprogs is because I looked at
the source code, and it was too scary for me to support. I used to
tell people though that while *I* was too chicken to support it, as
far as I knew no one had ever reported data loss, they'd have to
decide on their own whether they felt comfortable using it.

Unfortunately, a few months ago someone actually told me about
ext2prepare corrupting their filesystem, so I can't say that anymore.
I don't know whether the *single* report was due to hardware errors
(and the person getting unlucky), or filesystem corruption that had
been lurking on the filesystem that interacted extremely tragically
with ext2prepare. So use ext2prepare at your own risk. YMMV. Past
results do not indicate future returns, etc.

If you only need to resize your filesystem once, you're better just
doing an offline resize.

- Ted

P.S. New versions of e2fsprogs request the online resizing inode, so
you don't need to specify -O resize_inode. In fact, which features
are enabled by default can be found in /etc/mke2fs.conf.






--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2008, 02:40 PM
"Douglas A. Tutty"
 
Default resize2fs

On Wed, Jan 09, 2008 at 10:26:54PM -0500, Rick Pasotto wrote:
> I would like to increase the size of my /var partition. It is a logical
> volume so I made it bigger with lvexpand. I then ran resize2fs, which
> according to the man page works on mounted file systems with kernels
> after 2.6 and my kernel is 2.6.22-3-k7. However, this is the output of
> the command:
>

If this is an old filesystem (with out the rsize bit [I forget what that
is called] set) and you may want to resize in the future and on-line
resizing is important to you, it may be better to recreate the
filesystem.

This is easy if you have enough free space. Create a temporary LV the
same size the current one, put a new filesystem on it (with the correct
resize option if necessary), then copy the data over using a method that
doesn't change ownership, mtime, (and possibly atime if any scripts rely
on that re cleaning out or backing up stuff). See the multi-disk HOWTO
for some options. There's tar, rsync, cp -a (?).

Once this is done and the system is running on the new filesystem and
the old is unmounted, delete the old LV and extend the new one and
resize the filesystem.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-24-2008, 06:48 PM
John Nelson
 
Default resize2fs

hi
Why does resize2fs have to scan the whole partition when expanding? it
dosent do this when it shrinks


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
 
Old 03-24-2008, 09:23 PM
Theodore Tso
 
Default resize2fs

On Mon, Mar 24, 2008 at 03:48:04PM -0400, John Nelson wrote:
> hi
> Why does resize2fs have to scan the whole partition when expanding? it
> dosent do this when it shrinks

Resize2fs sometimes, when either expanding or shrinking a partition,
will need to scan the inode table so it can move blocks. It may need
to do this if it is shrinking a partition, and there are files which
are using blocks at the end of partition which will no longer be
available at the end of the srhink operation, so it needs to scan the
inode tables to determine which inodes need to be updated as part of
moving the data blocks.

When resize2fs is expanding the filesystem, if the filesystem grows
enough that more blocks need to be reserved for the block group
descriptors, then similarly it will need to scan the inode table to
determine which inodes will need to be updated when moving blocks out
of the way so the block group descriptors can be expanded.

Regards,

- Ted

_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

Tue Mar 25 00:30:01 2008
Return-path: <fedora-list-bounces@redhat.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Tue, 25 Mar 2008 00:26:19 +0200
Received: from hormel1.redhat.com ([209.132.177.33] helo=hormel.redhat.com)
by s2.java-tips.org with esmtp (Exim 4.68)
(envelope-from <fedora-list-bounces@redhat.com>)
id 1Jdv7T-0004qr-QX
for tom@linux-archive.org; Tue, 25 Mar 2008 00:26:19 +0200
Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110])
by hormel.redhat.com (Postfix) with ESMTP id 374026192AD;
Mon, 24 Mar 2008 18:26:14 -0400 (EDT)
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com
[172.16.52.254])
by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id
m2OMQBXU009578 for <fedora-list@listman.util.phx.redhat.com>;
Mon, 24 Mar 2008 18:26:11 -0400
Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32])
by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2OMQBto023377
for <fedora-list@redhat.com>; Mon, 24 Mar 2008 18:26:11 -0400
Received: from mars.math-info.univ-paris5.fr (mars.math-info.univ-paris5.fr
[193.48.200.18])
by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id m2OMPaLu004935
for <fedora-list@redhat.com>; Mon, 24 Mar 2008 18:25:37 -0400
Received: from [127.0.0.1] (mars.math-info.univ-paris5.fr [127.0.0.1])
by mars.math-info.univ-paris5.fr (8.14.1/jtpda-5.4) with ESMTP id
m2OMPYZl017458
for <fedora-list@redhat.com>; Mon, 24 Mar 2008 23:25:35 +0100
Message-ID: <47E82A5E.30000@math-info.univ-paris5.fr>
Date: Mon, 24 Mar 2008 23:25:34 +0100
From: =?ISO-8859-1?Q?Fran=E7ois_Patte?=
<francois.patte@math-info.univ-paris5.fr>
User-Agent: Thunderbird 2.0.0.9 (X11/20071115)
MIME-Version: 1.0
To: For users of Fedora <fedora-list@redhat.com>
References: <47E769BB.90803@math-info.univ-paris5.fr>
<200803241804.17511.npr@bottlehall.co.uk>
In-Reply-To: <200803241804.17511.npr@bottlehall.co.uk>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Miltered: at mars.math-info.univ-paris5.fr with ID 47E82A5E.000 by Joe's
j-chkmail (http : // j-chkmail dot ensmp dot fr)!
X-j-chkmail-Score: MSGID : 47E82A5E.000 on mars.math-info.univ-paris5.fr :
j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000
X-j-chkmail-Status: Ham
X-RedHat-Spam-Score: -0.092
X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254
X-Scanned-By: MIMEDefang 2.63 on 172.16.48.32
X-loop: fedora-list@redhat.com
Subject: Re: /dev/dm-x????
X-BeenThere: fedora-list@redhat.com
X-Mailman-Version: 2.1.5
Precedence: junk
Reply-To: For users of Fedora <fedora-list@redhat.com>
List-Id: For users of Fedora <fedora-list.redhat.com>
List-Unsubscribe: <https://www.redhat.com/mailman/listinfo/fedora-list>,
<mailto:fedora-list-request@redhat.com?subject=unsubscribe>
List-Archive: <https://www.redhat.com/archives/fedora-list>
List-Post: <mailto:fedora-list@redhat.com>
List-Help: <mailto:fedora-list-request@redhat.com?subject=help>
List-Subscribe: <https://www.redhat.com/mailman/listinfo/fedora-list>,
<mailto:fedora-list-request@redhat.com?subject=subscribe>
Sender: fedora-list-bounces@redhat.com
Errors-To: fedora-list-bounces@redhat.com
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 24.03.2008 19:04, Nicholas Robinson a =E9crit :

| I would sign-off in French, but I'd only embarrass myself.
|

Au revoir!

Thanks.

- --
Fran=E7ois Patte
UFR de math=E9matiques et informatique
Universit=E9 Paris Descartes
45, rue des Saints P=E8res
F-75270 Paris Cedex 06
T=E9l. +33 (0)1 44 55 35 61
http://www.math-info.univ-paris5.fr/~patte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFH6CpedE6C2dhV2JURAtFRAJsHyUPmWMs4aspifkpqXz 14lEnhPwCeM4VA
e/2FgaUrvvz1ayVxpkzez3w=3D
=3DhWC9
-----END PGP SIGNATURE-----

--=20
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-30-2011, 02:54 AM
Ed Morrison
 
Default resize2fs

Hi All:

I am trying to resize a centos (5.2) VM drive. I use VMware and I have
increased the size of the drive by 40G. I am running resize2fs on
/dev/sdb1 (which is my root partition) but when I do I get this error:

[root@centos ~]# resize2fs /dev/sdb1 120G
resize2fs 1.39 (29-May-2006)
The containing partition (or device) is only 19970795 (4k) blocks.
You requested a new size of 31457280 blocks.

How can I change the block size?

I have also tried to use gparted live cd but it will not allow me to
increase the size even though it sees 40g of unused space. I can only
create a new partition.

Any help would be appreciated.

Thanks,
Ed
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-30-2011, 03:13 AM
Ken godee
 
Default resize2fs

> I am trying to resize a centos (5.2) VM drive. I use VMware and I have
> increased the size of the drive by 40G. I am running resize2fs on
> /dev/sdb1 (which is my root partition) but when I do I get this error:
>
> [root@centos ~]# resize2fs /dev/sdb1 120G
> resize2fs 1.39 (29-May-2006)
> The containing partition (or device) is only 19970795 (4k) blocks.
> You requested a new size of 31457280 blocks.
>
> How can I change the block size?
>
> I have also tried to use gparted live cd but it will not allow me to
> increase the size even though it sees 40g of unused space. I can only
> create a new partition.
>
> Any help would be appreciated.
>

I just ran into same kinda of thing and
I for one found much easier to create new
virtual 40gb drive, restore backup, drop old drive,
use new one. done.

If anything goes wrong you still have old virtual drive
you can go back to.







_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-30-2011, 05:23 AM
"Timo Neuvonen"
 
Default resize2fs

> I am trying to resize a centos (5.2) VM drive. I use VMware and I have
> increased the size of the drive by 40G. I am running resize2fs on
> /dev/sdb1 (which is my root partition) but when I do I get this error:
>
> [root@centos ~]# resize2fs /dev/sdb1 120G
> resize2fs 1.39 (29-May-2006)
> The containing partition (or device) is only 19970795 (4k) blocks.
> You requested a new size of 31457280 blocks.
>
> How can I change the block size?

Yo don't need to. But to increase the filesystem size, you'll need more
blocks, which means you'll first need to increase the size of the partition.
Thereafter, you resize the filesystem to use that free space. So, there are
two steps and now you are skipping step #1 and trying step #2 directly.

Here is some help:
http://www.howtoforge.com/linux_resizing_ext3_partitions

--
TiN


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

Thread Tools




All times are GMT. The time now is 12:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org