Solar tmp magic!

This example shows how I grew the 2GB mounted /tmp to 3GB on a Solaris 10 5/09 u7 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.

#1. Get the relevant info of the /tmp

# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 2.0G 272K 2.0G 1% /tmp

# echo “::fsinfo” | mdb -k | egrep “VFSP|/tmp”
VFSP FS MOUNT
000003000f46d840 tmpfs /tmp

# Get the address of the tm_anonmax to set its value.
# echo “000003000f46d840::print vfs_t vfs_data | ::print -ta struct tmount tm_anonmax” | mdb -k
3000f488d00 tm_anonmax = 0x40000
// Address and the currrent value of the tm_anonmax

### 2. Set the new value
# echo “3000f488d00/Z 0x60000″ | mdb -kw
0x3000f488d00: 0x40000 = 0x60000
NOTE: the 0x60000 is 384KB -> 384KB * 8KB = 3072MB = 3GB.

### 3. Check if it’s set.
# echo “3000f488d00/J” | mdb -k
0x3000f488d00: 60000
OR
# echo “3000f46d840::print vfs_t vfs_data | ::print struct tmount tm_anonmax” | mdb -k
tm_anonmax = 0x60000

### 4. Check if it’s working or not.
# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 3.0G 272K 3.0G 1% /tmp

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *