Skip to contentSkip to conversation

resize reiserfs

linux-lvm Ulrich Wiederhold 4 participants 4 messages Nov 22, 2001

lore
Share & tools
lore
#0 lore raw

Hi,
I need to resize my lv /dev/store/data now.

I already added the 2nd HD (/dev/hdc1) to the vg store using vgextend and extended the lv using lvextend.

Now I need to extend the reiserfs I got on this lv. I seached the web and found the resize_reiserfs perl-script, but if I try it, I only get this msg:
$#: ./resize_reiserfs --size +50G --lv /dev/store/data --dry-run

only 0 free PE's (0 K) left on VG store

Sure, I already added the PE´s to the lv.
What to do?

Uli

Signature · 1 line
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
#1 lore raw

Why not just use the resize_reiserfs program from the reiserfsprogs package available from ftp://ftp.namesys.com/pub/reiserfsprogs/reiserfsprogs-3.x.0j.tar.gz ?

Snip from manpage:

NAME
resize_reiserfs - Reiserfs filesystem resizer

SYNOPSIS

      resize_reiserfs [ -s [+|-]size[K|M|G] ] [ -fqv ] device

DESCRIPTION
The resize_reiserfs tool resizes an unmounted reiserfs file
system. It enlarges or shrinks an reiserfs file system located on a device so that it will have size bytes or size=old_size +(-) size
bytes if the + or - prefix is used. If the -s option is not
specified, the filesystem will be resized to fill the given device. The size parameter may have one of the optional modifiers K, M,
G, which means the size parameter is given in kilo-, mega-,
gigabytes respectively.

The resize_reiserfs program does not manipulate the size of
the device. If you wish to enlarge a filesystem, you must make sure you expand the underlying device first. This can be done using
cfdisk(8) for partitions, by deleting the partition and
recreating it with a larger size (assuming there is free space after the partition in question). Make sure you re-create it with the same
starting disk cylinder as before! Otherwise, the resize
operation will certainly not work, and you may lose your entire filesystem.

The resize_reiserfs program allows to grow a reiserfs on-line if
there is a free space on block device.

If you wish to shrink an reiserfs partition, first use
resize_reiserfs to shrink the file system. You may then use cfdisk(8) to shrink the device. When shrinking the size of the device, make
sure you do not make it smaller than the reduced size of the
reiserfs filesystem.

Quoted 18 lines · Ulrich Wiederhold

Hi,
I need to resize my lv /dev/store/data now.

I already added the 2nd HD (/dev/hdc1) to the vg store using vgextend and extended the lv using lvextend.

Now I need to extend the reiserfs I got on this lv. I seached the web and found the resize_reiserfs perl-script, but if I try it, I only get this msg:
$#: ./resize_reiserfs --size +50G --lv /dev/store/data --dry-run

only 0 free PE's (0 K) left on VG store

Sure, I already added the PE�s to the lv.
What to do?

Uli

#2 lore raw
In reply to Ulrich Wiederhold
Quoted 9 lines · Ulrich Wiederhold

I already added the 2nd HD (/dev/hdc1) to the vg store using vgextend and extended the lv using lvextend.

Now I need to extend the reiserfs I got on this lv. I seached the web and found the resize_reiserfs perl-script, but if I try it, I only get this msg:
$#: ./resize_reiserfs --size +50G --lv /dev/store/data --dry-run

only 0 free PE's (0 K) left on VG store

It looks like the resize_reiserfs script is trying to do LVM operations internally, and then doing the resize afterwards. However, this is terribly confusing, because the resize_reiserfs _program_ has the same name. You should get resize_reiserfs with the other reiserfs tools, but I'm not sure whether it is compiled and installed by default.

I would suggest just reducing the LV to the original size, or not using a relative size but an absolute size (so it doesn't try to grow the LV), and continue to use the script.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

#3 lore raw
In reply to Ulrich Wiederhold

hello !

Quoted 11 lines

Hi,
I need to resize my lv /dev/store/data now.

I already added the 2nd HD (/dev/hdc1) to the vg store using vgextend and extended the lv using lvextend.

Now I need to extend the reiserfs I got on this lv. I seached the web and found the resize_reiserfs perl-script, but if I try it, I only get this msg:
$#: ./resize_reiserfs --size +50G --lv /dev/store/data --dry-run

Quoted 4 lines

only 0 free PE's (0 K) left on VG store

Sure, I already added the PE?s to the lv.
What to do?

seems perl script tries extend lv again.

use resize_reiserfs from reiserfsprogs (3.x.0j or better) package, just type
resize_reiserfs /dev/store/data

it detects block device size and expands the file system as needed.

--
Alex.