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 2

Goals

In this session you will:
  • learn about Solaris filesystems
  • make new filesystems
  • check and repair filesystems

POST

  1. using the command line tool, add a new user to your box named test2. Give the user the Korn shell, place the home directory in your usual place, and set their password.
  2. log into the box to test the user account (ie, telnet localhost). Log back out of the account.
  3. temporarily disable the account. Verify the disabling by attempting to log in as above.
  4. Re-enable the account, and test. Log out of the account.
  5. delete the account using the command line tool.

  6. using the GUI tool, add a new user to your box named test2a. Give the user the bash shell, place the home directory in your usual place, and set their password.
  7. test the account
  8. lock out their account (hint: passwd)
  9. test the account
  10. how would you re-enable the account?
  11. delete the account using the gui tool.

the solaris filesystem layout

Pseudo-files: /proc, etc

unix filesystem basics

  • it's flat, not hierarchical
  • works on inode numbers, not filenames.
  • a partition is effectively a group of cylinders (HD)
  • partition information is stored in a (or several redundant) superblock, which contains information about number/size of blocks, number of inodes, free block count, inode count
  • info is kept in an inode table, one per partition: (128bytes of metadata) inode number, uid/gid, perms, type, (modtime, access, creation), number of links, location on disc.
  • inode table for each partition; therefore hlinks only on same partition
  • df to see how it's laid out
  • df -i to see how inodes are being used
  • cat /etc/vfstab to see how it got that way :-)
  • ls -i to see inode numbers (remember this for hlink stuff below)
  • file types
    • normal files ascii or binary
    • programs files with the x bit turned on
    • directory binary file containing a list of files/dirs "in" it, with inode numbers
  • creation of a new file
    1. OS picks out an unused inode, inserts info
    2. enters file/inode info into parent dir
    3. increments link count to 1
    4. the parent dir contains the ONLY reference to the filename
  • mv'ing a file moves the file info from one dir to another. That's it.
  • rm'ing a file
    1. file info removed from parent dir
    2. decrement link count in inode table
    3. if (links == 0) free up the inode in the inode table
  • hardlinks
    • same as creation of new file, only points to existing inode
    • ln originalfile link
  • symlinks
    • completely different animal: it is a pointer to another filename/path, not to an inode
    • ln -s originalfile link
    • all commands will pass through to the underlying file, except rm, which removes the symlink

making a new filesystem

newfs -F fstype device

mounting a filesystem

mount -F device mountpoint

/etc/vfstab

checking/repairing a filesystem

umount mountpoint
fsck -F fstype raw_device

clean unmounting, etc.

Homework


http://www.mousetrap.net/syllabus/solaris8/day2.html
$Id: day2.orb,v 1.10 2002/12/03 14:24:14 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.