[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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.


Reply to: