Database Reference
In-Depth Information
[system] 0.00 0.00% 1590M 19.4% 2645M 25.8% - -
zone1 7.97 99.6% 83.1M 1.01% 75.7M 0.73% 0 0.00%
global 0.01 0.22% 148M 1.80% 136M 1.33% 940 0.00%
The previous system has the global zone and a user zone started and running, while a load generator in zone1
stresses all eight CPUs. You have the option to tune in on individual zones, as well as to request more detailed
information. In the previous output, you can see that zone1 is fairly busy, the %PART column reports that the system
is 96% busy. Physical memory and virtual memory, as well as network traffic, are no reason for concern. What should
ring alarm bells is the fact that the total resources are almost 100% in use: in other words, our zone1 consumes all of
the host's resources. Time to investigate!
Zonestat can also be used to perform longer-term monitoring and record statistics in the background. To gather
statistics over a 12-hour period with data points every 30 seconds and a summary report for high usage every
30 minutes, you could use the following command:
root@solaris:~# zonestat -q -R high 30s 12h 30m
Deleting a Zone
A zone can be deleted-careful: the subsequent commands do not ask for confirmation and also delete the ZFS data
store. In other words, as soon as you hit return, the zone is gone. You should have a valid and tested backup before
proceeding. If you built it according to the suggestion provided (all user data on separate datasets), then you won't
lose everything, but you do still have to go through a painful recovery of the zone itself.
So if you are absolutely sure that you want to remove the zone, shut it down first, wait a couple of hours to see
if anyone complains, and then delete it. It is not unheard of that a zone was officially declared not to be in use when
someone actually was using it. The shutdown command can be initiated from within the zone itself, or via the global zone:
root@solaris:~# zoneadm -z zone1 shutdown
root@solaris:~# zoneadm list -civ
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 installed /zones/zone1 solaris excl
The zone is now shut down. Last chance to check if the zone is not needed! If you are sure, then proceed by
removing the zone data. This must be performed from the global zone as root. Consider this example:
root@solaris:~# zoneadm -z zone1 uninstall
Are you sure you want to uninstall zone zone1 (y/[n])? y
Progress being logged to /var/log/zones/zoneadm.20120704T114857Z.zone1.uninstall
root@solaris:~# zoneadm list -civ
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 configured /zones/zone1 solaris excl
As you can see, the zone is no longer installed, but rather configured. To really get rid of it, you need to use the
zonecfg tool again with the delete option:
root@solaris:~# zonecfg -z zone1 delete
Are you sure you want to delete zone zone1 (y/[n])? y
root@solaris:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 5.11G 10.5G 39K /rpool
rpool/ROOT 2.01G 10.5G 31K legacy
 
Search WWH ::




Custom Search