Hi nhdw-ga,
The only officially supported way in Solaris to grow a UFS file
system is to use the growfs command.
- growfs : docs.sun.com - Sun Product Documentation
( http://docs.sun.com/db/doc/816-0211/6m6nc66rs?a=view )
However, growfs is included as a part of the base Solaris 9 OS
only. Before that it was available as part of the Solistice Disk
Suit(SDS). Users have however found that the growfs command available
as part of the Solistice Disk Suit, is just a script that makes use of
the devinfo and mkfs commands, making use of the undocumented flags
-G(for grow) and -M(used with -G to indicate a mounted fs). This means
that you can just copy and use the growfs script without installing
SDS, or you can directly use the mkfs command for the same effect.
- Subject: increasing file system size
Newsgroup: comp.arch.storage
( http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=ywbs9izg18.fsf%40as101.tel.hr&rnum=1
)
The following posting on the Veritas-vx mailing list has this to
say about the mkfs undocumented flags : "Them not being documented in
deliberate - these options are considered a private interface, and it
is not supported for users to use them directly."
- [Veritas-vx] grow root volume
( http://mailman.eng.auburn.edu/pipermail/veritas-vx/2002-October/005003.html
)
Another point to be noted, which is also mentioned in growfs
command's documentation, is that the file system cannot be expanded :
- When the file system is root (/), /usr, or swap
- When there is a local swap file in the target file system
Also see :
- Subject: expanding root filesystem
Newsgroup: comp.unix.solaris
( http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=39A9E3F8.955758E9%40devunix.org&rnum=6
)
As for whether mkfs is safe or not, a simple Google Groups search
yields a number of posts by people who have tried the method
successfully. Just try searching for "mkfs grow solaris ufs". The
steps you need to follow are documented at the Solaris IAOQ Site:
- Solaris Infrequently Asked and Obscure Questions
( http://library.brunel.ac.uk:8080/ )
Here is an extract :
" How do I grow a ufs filesystem?
a. Unmounted filesystem (not /, /usr, /var)
1. Allocate additional contiguous disk space with format(1m)
( Unnecessary if you are using a volume manager )
2. /usr/lib/fs/ufs/mkfs -G rawdevice newsize
b. Mounted filesytem (not /, /usr, /var)
1. Allocate additional contiguous disk space with format(1m)
( Unnecessary if you are using a volume manager )
2. /usr/lib/fs/ufs/mkfs -G -M mountpoint rawdevice newsize "
The last parameter 'newsize' for mkfs is the total number of blocks
of
underlying partition (as returned by devinfo -p).
A user testimonial of this methods success can be found at :
- Expanding Solaris filesystems:
( http://www.unixguide.net/sun/expandsolarisfilesystems.shtml
)
I have been able to find no other undocumented flags for mkfs, except
-G and -M. However, I will keep looking, and post my findings here if
I find anything.
Hope this helps.
If you need any clarifications, just ask!
Regards,
Theta-ga
=======================
Related Links :
- devinfo(1M)
( http://docs.sun.com/db/doc/816-0211/6m6nc66p5?a=view )
- mkfs(1M)
( http://docs.sun.com/db/doc/816-0211/6m6nc670d?a=view )
- Solaris FAQ : How can I grow a UFS filesystem?
( http://www.science.uva.nl/pub/solaris/solaris2/Q3.72.html )
=======================
Google/Google Groups Search Terms Used :
mkfs grow solaris ufs
mkfs "-g"
man growfs script solaris |