growfs failed

OS: Solaris 10
Issue: metastat shows 12GB /var, df shows 3 GB /var.
Solution: growfs
Error:

# growfs -M /var /dev/md/rdsk/d6
/dev/md/rdsk/d6: Unable to find Media type. Proceeding with system determined parameters.
failed to disable logging.

I think the "unable to find Media type" is not a problem. I saw someone running growfs successfully with this error. The problam is "failed to disable logging". The OS is still writing to /var, that makes growfs unable to freeze /var in order to expand space. I stopped syslogd but still got "failed to disable logging".

Any idea? Thank you!

add the nologging option to the UFS file system entry in the vfstab file and try using growfs again

Hi,

If you still see the error, you need to check if the /var is still mounted before doing the growfs.Before going the filesystem, you need to umount the particular FS.

Not true.
After a volume that contains a UFS file system is expanded (meaning that more space is added), you also need to expand the file system in order to recognize the added space. You must manually expand the file system with the growfs command. The growfs command expands the file system, even while the file system is mounted. However, write access to the file system is not possible while the growfs command is running.

It doesn't work. Thanks anyway !!

# grep nologging /etc/vfstab
/dev/md/dsk/d6 /dev/md/rdsk/d6 /var ufs 1 no nologging,nosuid

# growfs -M /var /dev/md/rdsk/d6
/dev/md/rdsk/d6: Unable to find Media type. Proceeding with system determined parameters.
failed to disable logging

i take it you unmounted /var and then mounted accordingly?

i'm thinking of a few things you might be able to try. off the top of me head stopping system-log might work (svc:/system/system-log:default). maybe something a little bit more intrusive might be a write lock on /var (lockfs -w /var). not sure if that would work.

others have thoughts on this?

Please run a "mount | grep '/var'" to see what options it's currently got set.
Instead of unmounting and mounting again to pick up new options, you can usually get away with a remount (mount -oremount /var).

That said, I was pretty sure (ie I don't actually know for certain) you can growfs with logging still turned on so that's an odd error you have.

SD - agreed. logging shouldn't be the issue here. i've done it plenty of times. i figure it makes the call to turn logging off anyway so why not try and turn it off before hand. maybe this will resolve the issue.

Hi everyone,

It is working! Yes. I need to umount/mount var after replacing logging with nologging for var in vfstab. After that growfs works. The df shows normal var space after growfs ran.

Thanks a lot everyone! :):):slight_smile: