18.01.2007, Oles Hnatkevych, don_oles@able.com.ua

SA-239: Intermediate System Administration for the Solaris 9 OS
SA-200-S10: Intermediate System Administration for the Solaris 10 OS

Module 1, Introducing Solaris OE / 10 OS Directory Hierarchy

  • Describe / (root) subdirectories
    /etc /dev /devices /var ...
  • Describe file components
    directory - filename - inode - data
  • Describe file types
    $ ls -l
    $ ls -l /devices/
    files directories soft links devices
    device major/minor numbers.
    $ mkdir
    
  • Use hard links
    $ ln -s /path/to/filea /path/to/fileb       # make soft link
    
    $ ln /path/to/filea /path/to/fileb          # make hard link
    $ ls -i                                     # view inode numbers
    

Module 2, Managing Logical Disk Devices

  • Describe the basic architecture of a disk
    platters, heads, cylinders, tracks, sectors
    slices (0-7)
    slice 2 (whole disk)
    c0t0d0s0 (controller 0, target 0, disk 0, slice 0)
    
  • Describe the naming conventions for devices
    $ ls /dev/dsk               # logical device names
    $ ls -l /dev/dsk/c0t0d0s0   # link to physical device name
    $ ls -l /devices/...        # physical device names
    instace names: sd0, dad0, hme0...
    $ more /etc/path_to_inst    # physical to instance correspondence
    
  • List devices
    $ more /etc/path_to_inst    # physical and instance names
    $ prtconf | grep -v not     # view only attached devices
    $ prtconf -p                # view tree as PROM has seen during boot
    $ format                    # view only disk devices
    
  • Reconfigure devices
    # touch /reconfigure        # next boot will reconfigure dev tree
    # init 5                    # poweroff (init 6 - reboot)
    
    # devfsadm                  # reconfigure on live system
    # devfsadm -c disk -c tape -c audio
    # devfsadm -i driver_name
    # devfsadm -i dad
    # devfsadm -v               # print changes
    # devfsadm -C               # clean unused links from /dev
    
  • Perform hard disk partitioning
    VTOC (1-st sector, #0)
    Partition properties: No, Tag (boot root swap ...),
       Flag (r/w, mountable/not), Cylinders, Size, Blocks
    $ man format                # good understanding is adviced
    ~/.format.dat, /etc/format.dat
    
  • Manage disk labels
    format> verify                  # view VTOC from format
    # prtvtoc /dev/rdsk/c0t0d0s0    # another way to see VTOC
    # prtvtod /dev/.... >xxx.dat    # save VTOC to file
    # fmthard -s xxx.dat /dev/...   # label with saved VTOC
    
  • Describe the Solaris Management Console
  • Partition a disk by using the Solaris Management Console

Module 3, Managing the Solaris OE / 10 OS File System

  • Describe Solaris OS file systems
    Disk based FS: ufs, hsfs, psfs, usfs
    Distributed FS: nfs
    Pseudo FS: tmpfs, swapfs, fdfs, procfs, mntfs
    
  • Create a new ufs file system
    VTOC (sector #0)
    bootblk (sectors #1-#15, all FS)
    Primary superblock (sectors #16-#31)
    Backup superblocks (sector #32 from cylinder group)
    Cylinder groups (from 16 cylinders)
    Cylinder group blocks
    Inodes, inode table
    Data blocks
    Fragmentation (for files less 96K)
    # newfs                         # frontend to mkfs
    # newfs /dev/rdsk/c1t1d1s0      # make new ufs FS
    # fstyp -v /dev/rdsk/c0t0d0s0 | head -10    # view minfree and other data
    # tunefs -m 1 /dev/rdsk/c1t3d0s0            # set minfree to 1%
    
  • Check the file system by using the fsck command
    # fsck /dev/rdsk/c0t0d0s0           # check device
    # fsck /var                         # check device from /etc/vfstab
    # fsck -o f,p /dev/rdsk/c0t0d0s5    # force (check anyway if clean) and preen (noninteractive, stop if errors)
    
  • Resolve file system inconsistencies
    # fsck -o b=32 /dev/rdsk/c1t3d0s0   # check using backup superblock
    # newfs -N /dev/rdsk/...            # show where would be superblocks without really formatting partition
    
  • Monitor file system use
    $ df [options] [/mountpoint]        # view usage/free space
    $ du [options] [/some/dir]          # view file size/usage
    # quot -af                          # view used space/files by users on all mounted FS
    # quot -f /dev/dsk/...              # view space/files by users
    

Module 4 Performing Mounts and Unmounts

  • Identify mounting fundamentals
    $ df                                # display mounted filesystems
    $ /usr/bin/mount                    # display mounted filesystems
    $ cat /etc/mnttab                   # display mounted filesystems (this file is itself a filesystem)
    # /sbin/mount                       # boot scripts use this one
    $ cat /etc/vfstab                   # look what should be mounted on boot
        # /etc/mnttab & /var/run are NOT in vfstab
        # /dev/to/mount /dev/to/fsck  /mount/point fstype fsckpass  mountatboot mountoption
    
  • Perform mounts
    # mount /dev/device /path/to/dir
    # mount /dev/dsk/c0t0d0s7 /export/home
    # mount /export/home                            # look device in vfstab
    # mount -o ro,nosuid,noatime,nolargefiles,logging /dev/dsk/c0t0d0s7 /export/home
    # mountall                                      # mount all filesystems in /etc/vfstab
    # mountall -l                                   # mount all local filesystems
    # fstyp /dev/rdsk/c0t0d0s7                      # what is FS type?
    # mount -F hsfs -o ro /dev/dsk/c0t6d0s0 /cdrom  # mount cdrom high sierra fs
    # mount -F pcfs /dev/diskette /pcfs             # mount diskette
    
  • Perform unmounts
    # umount
    # umount /export/home
    # umount /dev/dsk/c0t0d0s7
    # /usr/sbin/umountall           # all except / /usr /proc /dev/fd /var /var/run /tmp
    # umountall -l                  # all local ...
    
    # fuser -cu mount_point         # see what processes use filesystem
    # fuser -ck mount_point         # kill all processes that use filesystem
    # fuser -c mount_point          # verify that no other processes use filesystem
    # umount -f mount_point         # force umount
    
    ok boot cdrom -s                # boot from cdrom into singleuser mode
    # fsck /dev/rdsk/c0t0d0s0       # check root fs
    # mount /dev/dsk/c0t0d0s0 /a    # mount disk root fs
    # export TERM=sun; vi /a/etc/vfstab # hack it
    # umount /a; init 6             # boot again
    
  • Access mounted diskettes or CD-ROMs
    # /etc/init.d/volmgt            # start/stop volume manager
    $ cat /etc/vold.conf            # vold configuration
    
    
  • Restrict access to a mounted diskette or CD-ROM
    
    
  • Access a diskette or CD-ROM without Volume Management
    
    
  • /etc/vfstab, mount, /etc/mnttab, mountall
  • umount [-f], umountall, fuser
  • boot cdrom -s
  • vold, volcheck
  • vold.conf, rmmount.conf

Module 5 Installing the Solaris™9 Operating Environment

  • suninstall (cdrom) (+upgrade)
  • Web Start (java, cdrom) (+upgrade)
  • Jump Start (net, scripts)
  • WebStart Flash (flasharchive copy)
  • Live Upgrade
  • packages, clusters, groups
  • Core, End User, Developer, Entire Distribution, OEM
  • grep METACLUSTER /var/sadm/system/admin/.clustertoc
  • cat /var/sadm/system/admin/CLUSTER

Module 6 Performing Solaris 9 OE Package Administration

  • /var/sadm/install/contents
  • pkgadd, pkgrm, pkginfo, pkgchk
  • /var/sadm/pkg/
  • /var/spool/pkg/

Module 7 Managing Software Patches on the Solaris 9 OE

  • showrev, patchadd [-d !!!], patchrm
  • /var/sadm/patch
  • install_cluster [-nosave]

Module 8 Executing BootPROM Commands

  • prtdiag -v
  • PROM, NVRAM (hostid, global MAC)
  • POST, diag-switch?, Stop-N, Stop-D, Stop-A, /etc/default/kbd, kbd -i
  • banner, boot, words, sifting, printenv, setenv, reset-all, set-defaults
  • probe-{smth}, .version, test, .enet-addr, .idprom, .speed, .registers
  • boot -s, boot -a, boot cdrom -s, boot -r, boot -v
  • help
  • boot-device disk net cdrom
  • show-devs, show-nets, show-disks ....
  • devalias
  • nvalias, nvunalias, use-nvramrc
  • eeprom
  • Stop-A, ok sync

Module 9 Performing Boot and Shutdown Procedures

  • 0,s/S,1,2,3,5,6
  • who -r
  • init
  • phases
  • boot PROM (POST, booblk, installboot)
  • boot programs (ufsboot, genunix+unix, /platform/‘uname -m‘/kernel[/sparcv9])
  • kernel initialization (/etc/system, modules /kernel, /usr/kernel/, /platform/`uname -m/i`/kernel)
  • init (/etc/inittab, /sbin/rc?)
  • /etc/rc?.d/[KS]*[.sh], /etc/init.d/
  • init, shutdown, halt, reboot, poweroff
  • SMF

Module 10 Performing User Administration

  • passwd, shadow, group
  • useradd, usermod, userdel, groupadd, groupmod, groupdel
  • smuser, smgroup
  • /etc/skel
  • /etc/profile (sh,ksh,bash), /etc/.login (C), ~/.hushlogin
  • ~/.profile, ~/.kshrc, ~/.cshrc
  • export

Module 11 Performing System Security

  • who, rusers/rpc.rusersd
  • finger
  • last, /var/adm/wtmpx
  • /var/adm/loginlog
  • su, /etc/default/su
  • /etc/default/login
  • /etc/ftpd/ftpusers
  • /etc/hosts.equiv, ~/.rhosts
  • /etc/group, groups, id
  • chown, chgrp, chmod
  • suid, sgid, sticky bit

Module 12 Configuring Printer Services

  • /usr/share/lib/terminfo/, /usr/lib/lp/ /etc/lp/, /var/spool/lp/
  • model/, postscript/, filter.table
  • interfaces/, printers/
  • in.lpd, lp, lpr, lpshced, lpadmin, lpstat, nsswitch.conf, printers.conf*
  • /usr/sadm/admin/bin/printmgr
  • classes
  • accept, reject, enable, disable
  • lpstat, /etc/init.d/lp

Module 13 Using Print Commands

  • lp [-d [h:]p], lpr [-P [h:]p]
  • accept, reject, enable, disable, lpmove

Module 14 Controlling System Processes

  • prstat, nice, priocntl
  • kill, pkill
  • at, atq, /var/spool/cron/atjobs/, /etc/cron.d/at.[deny|allow]
  • crontab, /var/spool/cron/crontabs, /etc/cron.d/cron.[deny|allow]

Module 15 Performing File System Backups

  • /dev/rmt/{0123456789...}[lmhcu][n]
  • mt [-f /dev/rmt/Xn] {status|rewind|offline|fsf XXX}
  • ufsdump {X}S (determine size/nuber of tapes)
  • /etc/dumpdates
  • /usr/sbin/ufsdump {0..9}[v][S][l][o][u][n][f [host:]device] (/.rhosts)

Module 16 Performing File System Restores

  • cd /fold/; ufsrestore [t][r][x/file1/file2][i][v][f/device]
  • rm restoresymtable
  • ufsrestore rf /dev/rmt/0
  • (/usr) boot cdrom -s;newfs;mount;usfrestore;rm restoresymtable;umount;fsck;ufsdump;init 6
  • (/) ... installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0; ...
  • ufsrestore ivf /dev/rmt/0, - ls, add <* | file1 file2...>, delete, marked, extract, q

Module 17 Backing Up a Mounted File System With a UFS Snapshot

  • /usr/sbin/fssnap -F FSType -V -o special_option(s) mount-point | special
  • fssnap -F ufs -o bs=/var/tmp /export/home
  • ufsrestore rf /dev/rmt/0
  • fssnap -i [mountpoint]
  • mount -F ufs -o ro /dev/fssnap/0 /x; cd /x; tar cvf /dev/rmt/0 .
  • ufsdump 0ufN /dev/rmt/0 /dev/rdsk/c0t1d0s0 /dev/rfssnap/0
  • ufsrestore tf /dev/rmt/0
  • fssnap -i [mountpoint]
  • ufsdump {N}!!!
  • fssnap -d; rm /back_store_file

SA-229: Advanced System Administration for the Solaris 10 OS
SA-202-S10: Advanced System Administration for the Solaris 10 OS

Module 1 Describing Interface Configuration

  • ifconfig -a; banner; ifconfig up/down; ping; snoop;
  • /etc/rcS.d/S30network.sh; /etc/hostname.XXX; /etc/inet/hosts
  • /etc/nodename, /etc/hostname.XXX, /etc/inet/hosts, /etc/net/ticlts/hosts, /etc/net/ticots/hosts, /etc/net/ticotsord/hosts
  • /usr/sbin/sys-unconfig

Module 2 Describing the Client-Server Model

  • inetd, /etc/inet/inetd.conf, /etc/rc2.d/S72inetsvc, /etc/inet/protocols, /etc/inet/services
  • rpcbind, /etc/rpc, /etc/inet/inetd.conf, rpcinfo [-s] [-p]

Module 3 Customizing the Solaris™ Management Console

  • /etc/init.d/init.wbem, smc edit, /var/sadm/smc/toolboxes, smcregister

Module 4 Managing Swap Configuration

  • /etc/vfstab, pagesize [-a], swap [-s] [-l] [-a /dev/dsk/...|file] [-d], mkfile

Module 5 Managing Crash Dumps and Core Files

  • dumpadm, /etc/dumpadm.conf, savecore [-m]
  • coreadm, /etc/coreadm.conf, coreadm -p core.%f.%p $$

Module 6 Configuring NFS

  • /etc/dfs/: dfstab, sharetab, fstypes, /etc/rmtab, /etc/nfs/nfslog.conf, /etc/default/nfslogd, /etc/init.d/nfs.server, /etc/rc3.d/S15nfs.server
  • mountd, nfsd, statd, lockd, nfslogd
  • share, unshare, shareall, unshareall, dfsshares, dfmounts

Module 7 Configuring AutoFS

  • Describe the fundamentals of the AutoFS file system
  • Use automount maps

Module 7 Configuring AutoFS

  • Describe the fundamentals of the AutoFS file system
  • Use automount maps