Chapter 5 Study Guide

From ITCwiki
Revision as of 01:16, 15 February 2012 by JBackley (talk | contribs)
Jump to navigation Jump to search

This is where I am going to put the chapter 5 study guide. Don't read this until it is done and this sentance is not here! ~JB

Main Point

Bolded word to define

Blah blah

/Dev directoy

The /dev directory contains the special device files that control access all the devices. Two main types of devices under all systems:

Character devices

Data transfers character by character to and from the device.

Block devices

Transfers chunks or blocks of information at a time by using physical memory to buffer the transfer

To view the type of the file use the following command

“ls -l/dev/dsk”


Major and minor numbers are associated with the device special files in the /dev directory and are used by the operating system to determine the actual driver and device to be accessed by the user-level request for the special device file.

The major number identifies the device class or group, such as a controller for several terminals. The major number is assigned, sequentially, to each device driver by the Installable Driver Tools during driver installation.

The minor number identifies a specific device, such as a single terminal. Minor numbers are assigned to special files by the driver writer in another system configuration file called the Node file.

Filesystems

Filesystem: The organization imposed on a physical storage medium that is used to manage the storage, store, retrieve, and update data on device. All filesystems have three common components: the superblock, the inode table, and the data blocks. Together they organize files and allow rapid access to and retrieval of data.

Mounting

Mounting the process used to associate a device with a directory in the logical directory tree such that users can store data on that devices.


A mount point is a physical location or a directory in the partition used as a root filesystem.

Floppies

Used to transfer small amounts of information from computer to computer in the past Not available on all systems today Each disk must be formatted with a filesystem prior to being used to store files After formatting then you must mount it on the directory tree before it can be used

Use the mkfs (make file system) command to format the floppy disk Specify the filesystem type with a –t switch Specify a different file system name after the –t option such as the DOS FAT filesystem:

mkfs –t msdos /dev/fd0

If you don’t specify the filesystem then the default assumed is the ext2 file system: mkfs /dev/fd0

To mount a device on the directory tree use the mount command with options to specify the filesystem type to mount, the directory, and whether the /media/floppy directory is being used by any users use the fuser command with the –u option

For example:

fuser  -u /media/floppy

To unmount use the following command: unmount /media/floppy

CDs and DVDs

Can be mounted with mount and unmounted with umount Device files used by these drives are different than Floppies

Standard Configurations:

Primary master (dev/had)
Primary slave (dev/hdb)
Secondary master (dev/hdc)
Secondary slave (dev/hdd)

If you have SATA or SCSI drive then Linux uses different names

First SATA/SCSI drive (/dev/sda, /dev/scd0, /dev/sr0, and /devsg0)
Second SATA/SCSI drive ( /dev/sdb, /dev/scd1, /dev/sr1, and /dev/sg1)
Third SATA/SCSI drive ( /dev/sdc, /dev/scd2, /dev/sr2, and /dev/sg2

Symbolic Links

/dev/cdrom- 1st CD-ROM drive
/dev/cdrw 1st CD-RW drive
/dev/dvd 1st DVD-ROM drive
/dev/dvdrw 1st DVD-RW drive

ISO 9660 File System

CDs, and DVDs, use this filesystem type. Are read-only when accessed using a Linux You must use a disk-burning software to record to a CD, or DVD. To mount a CD or DVD to a directory use this filesystem type and add the –r (read only) option to the command

For example:

mount –r –t iso9660 /dev/cdrom /media/cd

Not limited to CDs, and DVDs. You can also create ISOs. To create an ISO image from a directory of files use the mkisofs command.

For example:

mkisofs –RJ –o newimage.iso/data 
mount –o loop –t iso9660 newimage.iso /mnt

Hard Disks

3 Flavors of Hard Disks: -PATA, SATA, SCSI PATA Primary master (/dev/hda) Primary slave (/dev/hdb) Secondary master (/dev/hdc) Secondary slave (/dev/hdd) SATA/SCSI /dev/sda /dev/sdb /dev/sdc Etc.


USB and Fireware based storage

Monitoring Filesystems

Hard Disk Quotas