Saturday, April 16, 2011

Change /tmp size on Solaris 10 Zone

Log into global zone where local zone(s) reside.

Using zlogin, login to the local zone:
# zlogin –z (zone)

As root edit the vfstab:
# vi /etc/vfstab

Find the line in vfstab for the /tmp filesystem:
swap - /tmp tmpfs - yes size=512mb (this could be any value, 512 is example)

Change the value of size=512mb to the requested value (in MB):
swap - /tmp tmpfs - yes size=2048mb

Save the vfstab and exit back to the global zone.

To make the changes take effect the zone must be stopped and booted:
# zoneadm –z (zone) halt
# zoneadm –z (zone) boot

  Log back into local zone and confirm changes by reviewing df –h output:
# zlogin –z
# df –h|grep /tmp
swap                   2.0G     0K   2.0G     0%    /tmp