Welcome to the Reiser4 Wiki, the Wiki for users and developers of the ReiserFS and Reiser4 filesystems.

For now, most of the documentation is just a snapshot of the old Namesys site (archive.org, 2007-09-29).

There was also a Reiser4 Wiki (archive.org, 2007-07-06) once on pub.namesys.com.

Resize reiserfs

From Reiser4 FS Wiki
(Difference between revisions)
Jump to: navigation, search
(http://web.archive.org/web/20061113154808/www.namesys.com/resize_reiserfs.html)
 
m (formatting fixes)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
=== NAME ===
 
=== NAME ===
resize_reiserfs - resizer tool for the ReiserFS filesystem
+
 
 +
resize_reiserfs - resizer tool for the [[ReiserFS]] filesystem
  
 
=== SYNOPSIS ===
 
=== SYNOPSIS ===
resize_reiserfs [ -s [+|-]size[K|M|G] ] [ -j dev ] [ -fqv ] device
+
 
 +
  resize_reiserfs [ -s [+|-]size[K|M|G] ]
 +
                  [ -j dev ]
 +
                  [ -fqv ] ''device''
  
 
=== DESCRIPTION ===
 
=== DESCRIPTION ===
The resize_reiserfs tool resizes an unmounted reiserfs file system. It enlarges or shrinks a 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 <tt>resize_reiserfs</tt> tool resizes an unmounted ReiserFS file system. It enlarges or shrinks a 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 <tt>-s</tt> 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 allows to grow a reiserfs on-line if there is a free space on block device.
+
 
If you wish to shrink a 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.
+
The <tt>resize_reiserfs</tt> 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 [http://manpages.ubuntu.com/manpages/karmic/man8/cfdisk.8.html 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 <tt>resize_reiserfs</tt> program allows to '''grow''' a ReiserFS '''online''' if there is a free space on block device.
 +
 
 +
If you wish to '''shrink''' a ReiserFS partition, first use <tt>resize_reiserfs</tt> to shrink the file system. You may then use <tt>cfdisk(8)</tt> 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.'''
  
 
=== OPTIONS ===
 
=== OPTIONS ===
-s [+|-]size
 
Set the new size in bytes.
 
-j dev
 
Set the journal device name.
 
-f
 
Force, do not perform checks.
 
-q
 
Do not print anything but error messages.
 
-v
 
Turn on extra progress status messages (default).
 
  
=== RETURN VALUES ===
+
  -s [+|-]size  Set the new size in bytes.
  
0 Resizing successful.
+
  -j dev  Set the journal device name.
-1 Resizing not successful.
+
 
 +
  -f      Force, do not perform checks.
 +
 
 +
  -q      Do not print anything but error messages.
 +
 
 +
  -v      Turn on extra progress status messages (default).
 +
 
 +
=== EXIT CODES  ===
 +
 
 +
0 Resizing successful.
 +
* -1 Resizing not successful.
  
 
=== EXAMPLES ===
 
=== EXAMPLES ===
  
The following example shows how to test resize_reiserfs. Suppose 2Gb reiserfs filesystem is created on the device /dev/hda8 and is mounted on /mnt. For shrinking the device we need to unmount it first, then run resize_reiserfs with a size parameter (in this case -1Gb):
+
The following example shows how to test <tt>resize_reiserfs</tt>. Suppose a 2GB ReiserFS filesystem is created on the device <tt>/dev/hda8</tt> and is mounted on <tt>/mnt</tt>. To shrink the device we need to unmount it first, then run <tt>resize_reiserfs</tt> with a size parameter (in this case -1GB):
df
+
 
umount /mnt
+
  umount /mnt
resize_reiserfs -s -1G /dev/hda8
+
  resize_reiserfs -s -1G /dev/hda8
mount /dev/hda8 /mnt
+
  mount /dev/hda8 /mnt
df /mnt
+
  
 
=== AUTHOR ===
 
=== AUTHOR ===
This version of resize_reiserfs has been written by Alexander Zarochentcev <zam@namesys.com>.
+
 
 +
This version of resize_reiserfs has been written by Alexander Zarochentcev.
  
 
=== BUGS ===
 
=== BUGS ===
Please report bugs to the ReiserFS developers <reiserfs-dev@namesys.com>, providing as much information as possible--your hardware, kernel, patches, settings, all printed messages; check the syslog file for any related information.
+
 
 +
Please report bugs to the ReiserFS developers {{listaddress}}, providing as much information as possible - your hardware, kernel, patches, settings, all printed messages; check the syslog file for any related information.
  
 
=== SEE ALSO ===
 
=== SEE ALSO ===
  
[http://manpages.ubuntu.com/manpages/karmic/man8/cfdisk.8.html cfdisk(8)], [[reiserfsck|reiserfsck(8)]], [[debugreiserfs|debugreiserfs(8)]]
+
* [[reiserfsck|reiserfsck(8)]]
 +
* [[debugreiserfs|debugreiserfs(8)]]
 +
* [http://manpages.ubuntu.com/manpages/karmic/man8/cfdisk.8.html cfdisk(8)],
  
  
 
[[category:ReiserFS]]
 
[[category:ReiserFS]]

Latest revision as of 19:57, 2 July 2009

Contents

[edit] NAME

resize_reiserfs - resizer tool for the ReiserFS filesystem

[edit] SYNOPSIS

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

[edit] DESCRIPTION

The resize_reiserfs tool resizes an unmounted ReiserFS file system. It enlarges or shrinks a 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 online if there is a free space on block device.

If you wish to shrink a 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.

[edit] OPTIONS

 -s [+|-]size  Set the new size in bytes.
 -j dev  Set the journal device name.
 -f      Force, do not perform checks.
 -q      Do not print anything but error messages.
 -v      Turn on extra progress status messages (default).

[edit] EXIT CODES

  • 0 Resizing successful.
  • -1 Resizing not successful.

[edit] EXAMPLES

The following example shows how to test resize_reiserfs. Suppose a 2GB ReiserFS filesystem is created on the device /dev/hda8 and is mounted on /mnt. To shrink the device we need to unmount it first, then run resize_reiserfs with a size parameter (in this case -1GB):

 umount /mnt
 resize_reiserfs -s -1G /dev/hda8
 mount /dev/hda8 /mnt

[edit] AUTHOR

This version of resize_reiserfs has been written by Alexander Zarochentcev.

[edit] BUGS

Please report bugs to the ReiserFS developers <reiserfs-devel@vger.kernel.org>, providing as much information as possible - your hardware, kernel, patches, settings, all printed messages; check the syslog file for any related information.

[edit] SEE ALSO

Personal tools