Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

resize_ffs(8) [netbsd man page]

RESIZE_FFS(8)						    BSD System Manager's Manual 					     RESIZE_FFS(8)

NAME
resize_ffs -- resize a file system on disk or in a file SYNOPSIS
resize_ffs [-y] [-s size] special DESCRIPTION
resize_ffs resizes a file system. special is the name of the raw disk device or file where the file system resides. resize_ffs can both grow and shrink file systems. When growing, the disk device must of course be large enough to contain the new file system; resize_ffs simply extends the file system data structures into the new space. When shrinking, resize_ffs assumes this. resize_ffs has to copy anything that currently resides in the space being shrunk away; there must be enough space free on the file system for this to succeed. If there isn't, resize_ffs will complain and exit; when this happens, it attempts to always leave the file system in a consistent state, but it is probably a good idea to check the file system with fsck(8). If no -s option is provided, resize_ffs will grow the file system to the underlying device size which is determined from special. The options are as follows: -s Specify the file system size to which the file system should be resized. The size is given as the count of disk sectors, usually 512 bytes. It will not work correctly for file systems with other sector sizes. To see the exact value, have a look at the disk speci- fication or the disklabel. Mostly used to shrink file systems. -y Disable sanity questions made by resize_ffs. WARNING
Interrupting resize_ffs may leave your file system in an inconsistent state and require a restore from backup. It attempts to write in the proper order to avoid problems, but as it is still considered experimental, you should take great care when using it. When resize_ffs is applied to a consistent file system, it should always produce a consistent file system; if the file system is not consis- tent to start with, resize_ffs may misbehave, anything from dumping core to completely curdling the data. It's probably wise to fsck(8) the file system before and after, just to be safe. You should be aware that just because fsck(8) is happy with the file system does not mean it is intact. EXIT STATUS
resize_ffs exits with 0 on success. Any major problems will cause resize_ffs to exit with the non-zero exit(3) codes, so as to alert any invoking program or script that human intervention is required. EXAMPLES
resize_ffs /dev/vg00/rlv1 will enlarge the file system on the Logical Volume /dev/vg00/lv1 from Volume Group vg00 to the current device size. SEE ALSO
fs(5), fsck(8), newfs(8) HISTORY
The resize_ffs command first appeared in NetBSD 2.0. AUTHORS
der Mouse <mouse@rodents.montreal.qc.ca> (primary author) Jeff Rizzo <riz@NetBSD.org> (Byteswapped file system and UFS2 support) A big bug-finding kudos goes to John Kohl for finding the rotational layout bug referred to in the WARNING section above. BUGS
Can fail to shrink a file system when there actually is enough space, because it does not distinguish between a block allocated as a block and a block fully occupied by two or more frags. This is unlikely to occur in practice; except for pathological cases, it can happen only when the new size is extremely close to the minimum possible. Has no intelligence whatever when it comes to allocating blocks to copy data into when shrinking. Doesn't currently support shrinking FFSv2 file systems. BSD
January 4, 2011 BSD

Check Out this Related Man Page

RESIZE_REISERFS(8)					      System Manager's Manual						RESIZE_REISERFS(8)

NAME
resize_reiserfs - resizer tool for the ReiserFS filesystem SYNOPSIS
resize_reiserfs [ -s [+|-]size[K|M|G] ] [ -j dev ] [ -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 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. 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
0 Resizing successful. -1 Resizing not successful. 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): df umount /mnt resize_reiserfs -s -1G /dev/hda8 mount /dev/hda8 /mnt df /mnt AUTHOR
This version of resize_reiserfs has been written by Alexander Zarochentcev <zam@namesys.com>. 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. SEE ALSO
cfdisk(8), reiserfsck(8), debugreiserfs(8) Reiserfsprogs-3.6.21 January 2009 RESIZE_REISERFS(8)
Man Page