squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

solaris8 - Day 3

Goals

In this session you will:
  • use unix filesystems

POST

  1. log into your solaris box as a non-root user
  2. what is your system load like?
  3. who is on your box and what are they doing?
  4. how is your diskspace doing? Which filesystems are physical/local and which are remote or virtual?
  5. temporarily alter your user account so you cannot log in; there are several ways of doing this so take your pick.
  6. verify the account cannot login
  7. re-enable the account; verify.

layout of unix filesystems

  • **special** /: root; the source of all things in unix
    • /etc: configuration files
    • **special** /usr: usually consumes a great deal of diskspace, because it contains things like
      • /usr/bin: user binaries
      • /usr/sbin: system binaries
      • /usr/lib: library files for linking and development
      • /usr/include: .h files for c/c++ development
      • /usr/doc: extra documentation files
      Traditionally, partitions mounted on **special** directories require specific handling when it comes to doing filesystem maintenance.
    • /var: "varying" data
      • /var/run/: temporary runtime files for apps (e.g. pidfiles)
      • /var/adm, /var/log: logfiles
      • /var/spool: traditional location for print, mail, uucp and other spools
      • /: root; the source of all things in unix
    • /opt: on Solaris systems, third-party software is generally installed here
    • /tmp: temporary files. This dir is traditionally writable. A vfs in Solaris.
    • /dev: device files for hardware, etc
    • /proc: vfs for holding process table info
    • /export: used with NFS filesystems

creation of filesystems

  • making new filesystems

    (touch reconfigure)

    • due to bios limitations, you may be limited to 8gb
    • up to 10 slices (partitions):
    • format calls fdisk and other functions
    • newfs creates the UFS filesystem[s]
    • fsck the new filesystem[s]
    • mount the partition
    • edit your fstab

    how it works with removable media

    • formatting floppies: fdformat -v -U; /usr/sbin/newfs -v /vol/dev/aliases/floppy0
    • mounting floppies and cdroms: volrmmount -i floppy0; volrmmount -e floppy0
    • may be automounted, especially cdroms: /vol/dev/aliases/floppy0, mounted on /floppy/floppy0
  • how things can get sideways
    • problems: fsflush runs 2x/min - changes are cached (cf smartdrive); poweroffs are Unclean, disk or controller failures
    • symptoms: superblock corruption (tries to use alternate), free block/inode inconsistencies, inode description corruption, link count weirdness,
  • fsck needed (sanity check)?
    • unmount the filesystem
    • fsck -m /dev/rdsk/devname
  • fsck the discs (sanity check)?
    • unmountall -l
    • fsck: lather rinse repeat
    • find lost+found files and figure out what they are!
  • preening the discs (fix the easy stuff)
    • unmountall -l
    • fsck -o p: lather rinse repeat
  • repairing a bad superblock
    newfs -N raw_device
    fsck -F ufs -o b=superblock_starting_block raw_device
    fsck -F ufs raw_device
    

    software management

    You will install software:
    • from sourcecode
    • from precompiled binaries

    package management with the CLI tools

    • installing from the spool
      • files are not copied to the spool directory, they are actually spooled: pkgadd -d device-name -s spooldir pkgid ; pkginfo -d spooldir | grep pkgid
      • the default location to look for packages is /var/spool/package
    • installing individual packages
      • pkgadd -d directory pkgid
      • pkgchk -v pkgid
    • information about installed packages
      • pkginfo -l pkgid
    • removing installed packages
      • pkgrm pkgid

        note that pkgrm by itself will attempt to remove all packages

    package management with admintool

    patch management

    Solaris 2.6 and later use command line tools to apply patches, although scripts are also packed.

    Support customers get CDs every few weeks. Nonsupported customers grab patches off the net: http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access

    • showrev -p, patchadd -p show patches
    • pkgparam pkgid PATCHLIST shows patches for a given pkg
    • patchadd patchid shows patches for a given pkg
    • patchrm patchid shows patches for a given pkg

    Homework


    http://www.mousetrap.net/syllabus/solaris8/day3.html
    $Id: day3.orb,v 1.17 2002/12/04 02:06:57 mouse Exp $

  • © 1994-2002 jason carr.
    distributed under the terms of the GNU Free Documentation License.

    jason carr

    Reminders

    • Classroom temperature can be wildly variable. Dress lightly and bring layers.
    • your username is based on the class title and the last two digits of your workstation's hostname.
    • remember to take your work with you.