Sys Admin Part 1, Managing File Systems

Being able to complete the following tasks demostrates you have the essentials of managing file systems.

Listing Disks On A System

On a Sparc based system, from the eeprom, you can perform a probe-scsi-all

Discovering New Disks On A System


Partitioning A Disk


Creating A New UFS File System

Before attempting to create a UFS file system:
  • Determine the raw device name of the disk slice.  (i.e. /dev/rdsk/c0t0d0s1)
  • Make sure the disk slice you are using doesn't already have a file system that is mounted.
  • You must be superuser
So the task is to create a UFS file system on slice 3 of the target disk 1 on controller 2, with a block size of 4k, and 8k of bytes per inode.
 newfs -b 4096 -i 8192 /dev/rdsk/c2t1d0s3 
 The next tasks is to create a UFS file system that current is smaller than 1 terabyte, but needs to be able to be grown larger than 1 terabyte.  The raw disk is c1t0d0s0
newfs -T /dev/rdsk/c1t0d0s0

Checking A File System

The task is to check the file system on slice 1 of target disk 1 attached to controller 0.
fsck /dev/rdsk/c0t1d0s1

Fix A File System


Monitoring File Systems

The task is to display the number of free blocks, in kilobytes.
df -k
The next task is to show the file system statistics for all ZFS file systems, first displaying the average since the ZFS module was mounted and then display updated statistics every 5 seconds, for a total of 30 seconds
fsstat zfs 5 6

Mount A File System


Setting Up A File System To Mount On Boot

This involves editing the /etc/vfstab file.

Expand A File System


Accessing Removable Media


Restricting Access To Removable Media


Manually Accessing Removable Media