Solaris QuickSheet Annex
Description:
Annex (noun)
- an addition to a structure.
- something added to a document, a supplement to a document.
This is a list of items that would not fit on the Solaris QuickSheet. The problem with the Solaris QuickSheet (or more specifically the Solaris OS) is the sheer number of commands that simply will not fit on one sheet. As a result there is a difficult process of determining what is of value and what is not.
ZFS
Create a zpool of (externally protected) disks
zpool create mypool c4t0d24 c4t0d25 c4t0d26
Create a zfs filesystem in the zpool mypool
zfs create mypool/u02
Remove a zfs filesystem from the zpool mypool
zfs destroy mypool/u02
Take the zpool offline (export it) so we can use it on another system
zpool export mypool
Get a list of available / importable zpools
zpool import
Create a mirrored zpool and mount root of the zpool to alternate location
zpool create -m /opt/webapp webapp mirror c0t1d0 c2t1d0
Find the status and member disks of the previously created zpool
zpool status webapp
Create a zpool (on a slice) without a mount point for the root of the zpool
zpool create -m none data_pool_01 c0t0d0s6
Create mount points for apps using the previous zpool
zfs create -o mountpoint=/opt/webapp1 data_pool_01/webapp1
Take a snapshot of the zpool for "today". These snapshots are available (read only) from .zfs/snapshot/<name> in the root of the zfs filesystem.
zfs snapshot data_pool_01/webapp1@`date +%m-%d-%y`
Remove yesterday's snapshot. (Note: The gnu date command can do this with the -d option and is available as part of the coreutils package from www.sunfreeware.com)
zfs destroy data_pool_01/webapp1@`TZ=$TZ+24 date +%m-%d-%y`
A zpool cannot (currently) be reduced in size. Disks can be removed from a zpool only if they are a part of a mirror or are migrated out. Any action that would reduce the size of the zpool (such as removing a non-protected disk) cannot be done without destroying the entire zpool.
Disk Suite (SVM - Solaris Volume Manager)
Remove a metadevice called d6
metaclear d6
Simultaneously remove a metadevice called d5 and its two mirror components d14 and d15
metaclear d5 d14 d15
List all metadbs
metadb
Performance Statistics
Get stats on a pool (all members and aggregate) every second
zpool iostat -v my_zpool 1
Get extended (x) iostats with aggregations for controllers (C) and user friendly names (n) every 5 seconds
iostat -xCn 5
Get extended stats to include MPxIO paths every 5 seconds
iostat -Xn 5
More info about your system
Find the size of the address space (32/64 bitness) that the kernel supports
isainfo -b
x86 Solaris
Disable the graphical login (desktop startup)
/usr/dt/bin/dtconfig -d
.profile Additions
Give yourself meaningful prompts (and emacs key bindings if available). The leading "-" on the shell name is reference to this being a login shell.
case "${0}" in
-ksh)
PS1="[${LOGNAME}@$(hostname) "'${PWD##*/}'"]# "
set -o emacs
;;
-bash)
PS1="[\u@\h \W]# "
set -o emacs
;;
-sh)
cd()
{
chdir $* ;
PWD=`pwd`;
PS1="[${LOGNAME}@`hostname` `basename $PWD`]# " ;
}
cd
;;
esac