APPLIES TO : Solaris 10
ISSUE : The /tmp was configured to 512MB mount and it's exceeded and unfortunately that server cannot be rebooted or the /tmp cannot be umounted (bunch of files were opened and used). OR the mount_tmpfs doesn't support the "remount" option ("mount -F tmpfs -o remount /tmp")
GOAL : Increase /tmp FS space online with out reboot the Solaris 10 server.
SOLUTION : Increase the /tmp to 3GB
This example shows how I grew the 512MB mounted /tmp to 3GB on a Solaris 10 8/11 u10 SPARC system.
Please, don't try this in your system. If you don't listen to me then keep in mind that the HEXA numbers might differ on your system.
EXAMPLE :
1. Get the relevant info of the /tmp
JUDI-DEV-001 # df -h /tmp
Filesystem size used avail capacity Mounted on
swap 512M 152K 512M 1% /tmp
JUDI-DEV-001 #
JUDI-DEV-001 # echo "::fsinfo" | mdb -k | egrep "VFSP|/tmp"
VFSP FS MOUNT
0000060019aaea80 tmpfs /tmp
JUDI-DEV-001 #
2. Get the address of the tm_anonmax to set its value.
JUDI-DEV-001 # echo "0000060019aaea80::print vfs_t vfs_data | ::print -ta struct tmount tm_anonmax" | mdb -k
600167d0810 ulong_t tm_anonmax = 0x10000
JUDI-DEV-001 #
// Address and the current value of the tm_anonmax
3. Set the new value
JUDI-DEV-001 # echo "600167d0810/Z 0x60000" | mdb -kw
0x600167d0810: 0x10000 = 0x60000
JUDI-DEV-001 #
NOTE: the 0x60000 is 384KB -> 384KB * 8KB = 3072MB = 3GB.
4. Check if it's set.
JUDI-DEV-001 # echo "600167d0810/J" | mdb -k
0x600167d0810: 60000
JUDI-DEV-001 #
OR
JUDI-DEV-001 # echo "60019aaea80::print vfs_t vfs_data | ::print struct tmount tm_anonmax" | mdb -k
tm_anonmax = 0x60000
JUDI-DEV-001 #
5. Check if it's working or not.
JUDI-DEV-001 # df -h /tmp
Filesystem size used avail capacity Mounted on
swap 3.0G 152K 3.0G 1% /tmp
JUDI-DEV-001 #
This modification will not exists post reboot, After reboot of server the default configured tmp size (512MB) will get mounted, Please make sure to change the /etc/vfstab entry. with a - instead of 512 for /tmp
CONCLUSION :
The Live Example above shows a real example which was done by myself on a Sol10 system.
I think this solution above can be done on any Solaris version which has the feature of the tmpfs-ed /tmp Filesystem
Credits and More details :-
http://ilapstech.blogspot.com/2009/11/grow-tmp-filesystem-tmpfs-on-line-under.html
~Judi~