Information Technology Reference
In-Depth Information
If the
-F
command-line argument is not specified, the type of file system
defined in the
/etc/default/fs
file is used by default. In addition, if no par-
titions (raw logical device names) are specified, all the file systems listed in
the
/etc/vfstab
file are checked.
Like the commands used to create file systems, the
fsck
command requires the use
of raw logical device names. The
fsck
command can be used to check and repair
CacheFS, Universal Disk Format (UDF), and UFS file systems.
The superblock stores summary information about the file system and it
is the most frequently corrupted component. Fortunately, alternative
superblocks are configured when a file system is created using the
newfs
command. To replace a corrupted superblock, first use the
newfs
com-
mand with the
-N
command-line argument to display the alternative
superblocks. Then, use the
-o b=
block
option of the
fsck
command to
specify the alternative superblock. If for some reason you cannot run
newfs
to locate alternative superblocks, try block
32,
because it is typical-
ly the first alternative superblock in a UFS file system. The following list-
ing shows this procedure.
# newfs -N /dev/rdsk/c0t2d0s4
/dev/rdsk/c0t2d0s4: 615600 sectors in 405 cylinders
➥
of 19 tracks, 80 sectors
300.6MB in 26 cyl groups (16 c/g, 11.88MB/g,
➥
5696 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 24432, 48832, 73232, 97632, 122032, 146432, 170832,
➥
195232, 219632,
244032, 268432, 292832, 317232, 341632, 366032, 390432,
➥
414832, 439232,
463632, 488032, 512432, 536832, 561232, 585632, 610032,
# fsck -F ufs -o b=32 /dev/rdsk/c0t2d0s4
Alternate super block location: 32.
** /dev/rdsk/c0t2d0s4
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 9 used, 288846 free
***** FILE SYSTEM WAS MODIFIED *****
#