Growing Solaris UFS file systems


I recently needed to grow a Solaris UFS file system, and accomplished this with the growfs(1m) utility. The growfs(1m) utility takes two arguments. The first argument to growfs ( the value passed to “-M” ) is the mount point of the file system to grow. The second argument is the raw device that backs this mount point. The following example will grow “/test” to the maximum size available on the meta device d100:

$ growfs -M /test /dev/md/rdsk/d100

To see how many sectors will be available on d100 after the grow operation completes, you can run newfs with the “-N” option, and compare that with the current value of df (1m):

$ newfs -N /dev/md/dsk/d100

/dev/md/rdsk/d0: 232331520 sectors in 56944 cylinders of 16 tracks, 255
sectors
113443.1MB in 2191 cyl groups (26 c/g, 51.80MB/g, 6400 i/g)

This will report the number of sectors, cylinders and MBs that would be allocated if a new file system was created on meta device d100. As always, test everything on a non critical system prior to making changes to critical boxen.

This article was posted by Matty on 2005-01-29 00:14:00 -0400 -0400