Google Answers Logo
View Question
Q: Growing a UFS filesystem under Solarir ( Answered 5 out of 5 stars,   0 Comments )
Subject: Growing a UFS filesystem under Solarir
Category: Computers > Operating Systems
Asked by: nhdw-ga
List Price: $7.00
Posted: 29 Jan 2003 09:13 PST
Expires: 28 Feb 2003 09:13 PST
Question ID: 149991
I heard that the following command can be used to increase the size of
a mounted filesystem after the partition size has been increased...

/usr/lib/fs/ufs/mkfs -G -M /mount_point /dev/rdsk/c#t#d#s# newsize

I would like to verify that this command will do what they say it will
do without doing anything bad to the existing filesystem... I have not
been able to find any reference to the -G or -M flags
anywhere I've looked... I would like some references or any
information about these and all other flags of this type for the mkfs
command when applied to a UFS filesystem.


Clarification of Question by nhdw-ga on 29 Jan 2003 09:14 PST
Growing a UFS filesystem under Solarir .. I can't believe I didnt
catch the typo... Solaris is what I meant to type...
Subject: Re: Growing a UFS filesystem under Solarir
Answered By: theta-ga on 29 Jan 2003 12:32 PST
Rated:5 out of 5 stars
Hi nhdw-ga,
    The only officially supported way in Solaris to grow a UFS file
system is to use the growfs command.
           - growfs : - Sun Product Documentation
             ( )

    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

    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 

    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

  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
        ( )

 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
underlying partition (as returned by devinfo -p).  

A user testimonial of this methods success can be found at :
      - Expanding Solaris filesystems: 

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!


Related Links :

    - devinfo(1M)
      ( )

    - mkfs(1M)
      ( )

    - Solaris FAQ :  How can I grow a UFS filesystem? 
      ( )

Google/Google Groups Search Terms Used :
       mkfs grow solaris ufs
       mkfs "-g"
       man growfs script solaris
nhdw-ga rated this answer:5 out of 5 stars
Perfect... All the info I needed and more... Thanks for another great answer Theta!

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy