Wednesday, August 31, 2005

Volume Management service

/etc/init.d/volmgt
*make sure that it does not start if want to restrict access to media

When media inserted, Volume Management runs

rmmount
* config file : /etc/rmmount.conf

Volume Management config file

/etc/vold.conf

To mount a diskette with Volume Management

volcheck

Force unmount on a busy file system

umount -f /export/home

Find who uses /export/home

fuser -cu /export/home

Kill all processes accessing /export/home

fuser -ck /export/home

Logical name for floppy

/dev/diskette

mount command needs file system type defined in

/etc/vfstab
/etc/default/fs <- local file systems
/etc/dfs/fstypes <- remote file systems

*if -F FStype option was not defined

UNIX name for DOS/FAT32 file system?

pcfs

Is UFS logging turned on by default?

no

"mount at boot" value for /(root), /usr, /var

is set to 'no'
kernel mounts these file systems through startup scrips

"fsck pass" values in vfstab

0,- : do not check
1 : check required
2 : check next

How many fields in vfstab?

7

Disk usage on per-user basis

quot -f /dev/rdsk/c0t0d0s7

*first column is size in Kbytes and second is num of files

To view superblock backups run

newfs -N /dev/rdsk/c0t0d0s7

If a superblock is corrupt

"Can't mount /dev/dsk/c0t0d0s7" is displayed

Force fsck if superblock unclean and run non-interactively

fsck -o f,p /dev/rdsk/c0t0d0s7

f -> force
p -> preen (non-interactively)

View percentage of minfree on a file system

fstyp -v /dev/dsk/c0t0d0s7 | head -10

To view Location Bar in SMC

click on view -> show -> location bar

Tuesday, August 30, 2005

Two ways to view HD label info

prtvtoc
format> verify

/etc/format.dat is used

to save custom partition table information to quickly format other drives of the same type.

Two ways to back up custom partition table

partition> name
format> save

prtvtoc /dev/rdsk/c0t0d0s7 > c0t0d0.bak

How do I save partition table of a metadevice?

Only with prtvtoc
* format does not see md disks

Two ways to partition a drive from backup

partition> select
partition> label

fmthard -s prtvtoc_file.bak /dev/rdsk/c0t0d0s2

Four ways to reconfigure devices

/reconfigure
boot -r
reboot -- -rv
devfsadm

Reconfigure only disks

devfsadm -c disk

Reconfigure only dad driver devices

devfsadm -i dad

List only attached devices

prtconf | grep -v not

To list number of hard links an inode has

ls -l -> the field right after permissions

Components of a HD

sector (also known as block) -> holds 512 bytes
track
cylinder

Create symbolic link link1 to file file1

ln -s file1 link1

Platform-dependent kernel modules

/platform

Platform-independent kernel modules

/kernel

/dev is a symbolic link to

/devices

/bin is a symbolic link to

/usr/bin