dresize

Resize a Power-Safe (fs-qnx6.so) filesystem

Syntax:

dresize [options] device

Runs on:

QNX Neutrino

Options:

-g num_groups
Specify the number of allocation groups.
-n num_inodes
Specify the number of inodes.
-v level
Set the level of verbosity:
  • 0: quiet mode (the default)
  • 1: normal mode
  • 2: debug output
device
The name of the file or device to operate against.

Description:

The dresize utility resizes a Power-Safe (fs-qnx6.so) filesystem to fit potentially smaller media than was specified at creation time. You must have prepared the filesystem for this with dprepresize.

These tools let you use a large disk when you create the starting image and then load the image onto a smaller disk. When you load the image on a smaller device, the allocation tables will be too large, so you can then use the resizing tool to shrink the size of the bitmap and accompanying metadata, and update the superblocks with information that's valid for the smaller disk.

The first time you boot the system, you can run dresize. If the signature in the superblock indicates that the disk needs to be resized, the resizing operation starts. Once the size of the disk is known, the bitmap is resized, and the metadata is updated to reflect the new bitmap size. Both superblocks are then updated with the correct total blocks, free blocks, allocation groups, etc. Finally, a new header block is written with the correct superblock locations.

Examples:

Resize a filesystem with no output:

dresize /dev/hd0t178

Resize a filesystem with output:

dresize -v1 /dev/hd0t178

Resize a filesystem and format with 25000 inodes:

dresize -v1 -n25000 /dev/hd0t178

Resize a filesystem and format with 4 groups:

dresize -v1 -g4 /dev/hd0t178

Resize a filesystem with debug output:

dresize -v2 /dev/hd0t178