Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 10 8/11 Information Library |
1. Managing Removable Media (Overview)
2. Managing Removable Media (Tasks)
3. Accessing Removable Media (Tasks)
4. Writing CDs and DVDs (Tasks)
5. Managing Devices (Overview/Tasks)
6. Dynamically Configuring Devices (Tasks)
7. Using USB Devices (Overview)
9. Using InfiniBand Devices (Overview/Tasks)
11. Administering Disks (Tasks)
12. SPARC: Setting Up Disks (Tasks)
13. x86: Setting Up Disks (Tasks)
14. Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)
15. The format Utility (Reference)
16. Managing File Systems (Overview)
What's New in Oracle Solaris File Systems?
File System Monitoring Tool (fsstat)
Oracle Solaris ZFS File System
Enhancements to UFS File System Utilities (fsck, mkfs, and newfs)
Automatic Search for Backup Superblocks
fsck Reports When it Needs to be Rerun
Where to Find File System Management Tasks
Types of Oracle Solaris File Systems
Oracle Solaris Disk-Based File Systems
The Universal Disk Format (UDFS) File System
NFS Version 4 and CacheFS Compatibility Issues
Additional Virtual File Systems
Commands for UFS File System Administration
How File System Commands Determine the File System Type
Manual Pages for Generic and Specific File System Commands
Default Oracle Solaris File Systems
Support of Multiterabyte UFS File Systems
Features of Multiterabyte UFS File Systems
Limitations of Multiterabyte UFS File Systems
Where to Find Multiterabyte UFS Tasks
Overview of Mounting and Unmounting File Systems
Determining a File System's Type
How to Determine a File System's Type
17. Creating and Mounting File Systems (Tasks)
18. Using The CacheFS File System (Tasks)
19. Configuring Additional Swap Space (Tasks)
20. Checking UFS File System Consistency (Tasks)
21. UFS File System (Reference)
22. Backing Up and Restoring UFS File Systems (Overview)
23. Backing Up UFS Files and File Systems (Tasks)
24. Using UFS Snapshots (Tasks)
25. Restoring UFS Files and File Systems (Tasks)
26. UFS Backup and Restore Commands (Reference)
27. Copying Files and File Systems (Tasks)
This section describes new file system features in the Oracle Solaris release.
For a complete listing of new Oracle Solaris features and a description of Oracle Solaris releases, see Oracle Solaris 10 8/11 What’s New.
Solaris 10 6/06: A new file system monitoring tool, fsstat, is available to report file system operations. You can use several options to report activity, such as by mount point or by file system type.
For example, the following fsstat command displays all ZFS file system operations since the ZFS module was loaded:
$ fsstat zfs new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 268K 145K 93.6K 28.0M 71.1K 186M 2.74M 12.9M 56.2G 1.61M 9.46G zfs
For example, the following fsstat command displays all file system operations since the /export/ws file system mounted.
$ fsstat /export/ws new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 0 0 0 18.1K 0 12.6M 52 0 0 0 0 /export/ws
The default form is to report statistical information in easy to understand values, such as GB, KB, and MB.
For more information, see fsstat(1M).
Solaris 10 6/06: Oracle Solaris ZFS, a revolutionary new file system, provides simple administration, transactional semantics, end-to-end data integrity, and immense scalability. In addition, ZFS provides the following administration features:
Device management support
GUI administration tool
Persistent snapshots and cloning features
Quotas that can be set for file systems
ACL-based access control
Storage pool space reservations for file systems
Support for Oracle Solaris systems that have zones installed
For more information about using ZFS, see Oracle Solaris ZFS Administration Guide.
Solaris 10 6/06: The file system check utility, fsck, has been enhanced to include features from the FreeBSD 4.9 version of the fsck program, as well as other enhancements.
The fsck utility in this Oracle Solaris release includes the following improvements:
Checks and repairs file systems more thoroughly and provides improved error messages. For example, in some scenarios, fsck determines what structures are missing and replaces them appropriately.
Automatically searches for backup superblocks.
Reports when fsck needs to be rerun.
When clearing directories, fsck now attempts to recover directory contents immediately and therefore, reduces the time spent rerunning this utility.
If fsck finds duplicate blocks, and not all files that reference the duplicate blocks were cleared, fsck reports the inode numbers at the end of the fsck run. Then, you can use the find command to review the inodes that are damaged.
Improved error messages regarding the status of extended attributes and other special files, such as device files and ACL entries, are included.
Includes a -v option to enable more verbose messages.
In addition, the newfs and mkfs commands have been updated to include new options for displaying a file system's superblock information in text or dumping the superblock information in binary format.
newfs [ -S or -B ] /dev/rdsk/...
Displays the file system's superblock in text
Dumps the file system's superblock in binary
mkfs [ -o calcsb or -o calcbinsb ] /dev/rdsk/... size
Displays the file system's superblock in text
Dumps the file system's superblock in binary
The fsck utility uses this superblock information to search for backup superblocks.
The following sections describe specific fsck enhancements and their corresponding error messages. For step-by-step instructions on using the fsck utility to repair a damaged superblock, see How to Restore a Bad UFS Superblock (Solaris 10 6/06 Release).
The following fsck error message examples illustrate the automatic backup superblock discovery feature.
Caution - If a file system has a damaged superblock and it was created with newfs or mkfs customized parameters, such as ntrack or nsect, using fsck's automatically discovered superblock for the repair process could damage your file system. In the case of a file system that was created with customized parameters and it has a bad superblock, fsck provides the prompt to cancel the fsck session: CANCEL FILESYSTEM CHECK? |
If the file system was created with the newfs command and fsck responds that just the primary superblocks are corrupted, then consider letting fsck restore the superblock.
# fsck /dev/dsk/c1t2d0s0 ** /dev/rdsk/c1t2d0s0 BAD SUPERBLOCK AT BLOCK 16: BLOCK SIZE LARGER THAN MAXIMUM SUPPORTED LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS? no LOOK FOR ALTERNATE SUPERBLOCKS WITH NEWFS? yes FOUND ALTERNATE SUPERBLOCK 32 WITH NEWFS USE ALTERNATE SUPERBLOCK? yes FOUND ALTERNATE SUPERBLOCK AT 32 USING NEWFS If filesystem was created with manually-specified geometry, using auto-discovered superblock may result in irrecoverable damage to filesystem and user data. CANCEL FILESYSTEM CHECK? no ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3a - Check Connectivity ** Phase 3b - Verify Shadows/ACLs ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cylinder Groups CORRECT GLOBAL SUMMARY SALVAGE? y UPDATE STANDARD SUPERBLOCK? y 81 files, 3609 used, 244678 free (6 frags, 30584 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED *****
If the file system was created with the mkfs command and fsck responds that just the primary superblocks are corrupted, then consider letting fsck restore the superblock.
# fsck /dev/dsk/c1t2d0s0 ** /dev/rdsk/c1t2d0s0 BAD SUPERBLOCK AT BLOCK 16: BLOCK SIZE LARGER THAN MAXIMUM SUPPORTED LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS? yes FOUND ALTERNATE SUPERBLOCK 32 WITH MKFS USE ALTERNATE SUPERBLOCK? yes FOUND ALTERNATE SUPERBLOCK AT 32 USING MKFS If filesystem was created with manually-specified geometry, using auto-discovered superblock may result in irrecoverable damage to filesystem and user data. CANCEL FILESYSTEM CHECK? no ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3a - Check Connectivity ** Phase 3b - Verify Shadows/ACLs ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cylinder Groups CORRECT GLOBAL SUMMARY SALVAGE? y UPDATE STANDARD SUPERBLOCK? y 81 files, 3609 used, 243605 free (117 frags, 30436 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED *****
The following example illustrates what would happen if you specified fsck's -y option in a damaged superblock scenario. You are automatically dropped out of the fsck session. A message is displayed to rerun it with the alternate superblock.
# fsck -y /dev/dsk/c1t2d0s0 # ** /dev/rdsk/c1t2d0s0 BAD SUPERBLOCK AT BLOCK 16: BLOCK SIZE LARGER THAN MAXIMUM SUPPORTED LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS? yes LOOK FOR ALTERNATE SUPERBLOCKS WITH NEWFS? yes SEARCH FOR ALTERNATE SUPERBLOCKS FAILED. USE GENERIC SUPERBLOCK FROM MKFS? yes CALCULATED GENERIC SUPERBLOCK WITH MKFS If filesystem was created with manually-specified geometry, using auto-discovered superblock may result in irrecoverable damage to filesystem and user data. CANCEL FILESYSTEM CHECK? yes Please verify that the indicated block contains a proper superblock for the filesystem (see fsdb(1M)). FSCK was running in YES mode. If you wish to run in that mode using the alternate superblock, run `fsck -y -o b=453920 /dev/rdsk/c1t2d0s0'.
The following fsck error message scenario illustrates the new prompts for the backup superblock, but the fsck run is not canceled, in this example. Canceling the fsck session would be an appropriate response if this file system was created with customized parameters or if there is some other concern about running fsck on this file system.
The various superblock error conditions are provided in italics as follows:
# fsck /dev/rdsk/c0t1d0s0 ** /dev/rdsk/c0t1d0s0 BAD SUPERBLOCK AT BLOCK 16: BLOCK SIZE LARGER THAN MAXIMUM SUPPORTED BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DATA BLOCKS OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: INODES PER GROUP OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: MAGIC NUMBER WRONG BAD SUPERBLOCK AT BLOCK 16: BAD VALUES IN SUPER BLOCK BAD SUPERBLOCK AT BLOCK 16: NCG OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: CPG OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: NCYL IS INCONSISTENT WITH NCG*CPG BAD SUPERBLOCK AT BLOCK 16: SIZE OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: ROTATIONAL POSITION TABLE SIZE OUT OF RANGE BAD SUPERBLOCK AT BLOCK 16: SIZE OF CYLINDER GROUP SUMMARY AREA WRONG BAD SUPERBLOCK AT BLOCK 16: INOPB NONSENSICAL RELATIVE TO BSIZE LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS? yes FOUND ALTERNATE SUPERBLOCK 32 WITH MKFS USE ALTERNATE SUPERBLOCK? yes FOUND ALTERNATE SUPERBLOCK AT 32 USING MKFS If filesystem was created with manually-specified geometry, using auto-discovered superblock may result in irrecoverable damage to filesystem and user data. CANCEL FILESYSTEM CHECK? no ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2a - Check Duplicated Names ** Phase 2b - Check Pathnames ** Phase 3a - Check Connectivity ** Phase 3b - Verify Shadows/ACLs ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cylinder Groups SALVAGE? yes UPDATE STANDARD SUPERBLOCK? yes 82 files, 3649 used, 244894 free (6 frags, 30611 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED *****
Better reporting by fsck about when it needs to be rerun should alleviate the time and necessity of running it multiple times, which can be particularly time consuming on large file systems.
The following new messages prompt you to rerun the fsck utility at the end of an error scenario:
***** PLEASE RERUN FSCK *****
Or:
Please rerun fsck(1M) to correct this.
These new prompts resolve the previous difficulty in determining whether fsck should be rerun or not.
Unless you are prompted to rerun fsck as in the above messages, there is no need to run fsck, even after you see the following message:
***** FILE SYSTEM WAS MODIFIED *****
However, it doesn't harm the file system to rerun fsck after this message. This message is just informational about fsck's corrective actions.
New fsck messages are included that report on and repair files with extended attributes. For example:
BAD ATTRIBUTE REFERENCE TO I=1 FROM I=96
Attribute directory I=97 not attached to file I=96 I=96 OWNER=root MODE=40755 SIZE=512 MTIME=Jul 12 10:55:10 2010 DIR= <xattr> FIX? yes
ZERO LENGTH ATTR DIR I=12 OWNER=root MODE=160755 SIZE=0 MTIME=Jul 12 10:56:10 2010 CLEAR? yes
File should BE marked as extended attribute I=22 OWNER=root MODE=100644 SIZE=0 MTIME=Jul 12 10:57:10 2010 FILE= <xattr> FIX? yes
UNREF ATTR DIR I=106 OWNER=root MODE=160755 SIZE=512 MTIME=Jul 12 10:58:10 2010 RECONNECT? yes
File I=107 should NOT be marked as extended attribute I=107 OWNER=root MODE=100644 SIZE=0 MTIME=Jul 12 10:59:10 2010 FILE=?/attfsdir-7-att FIX? yes DIR I=106 CONNECTED.
The fsck error messages now reports information about blocks, fragments, or a LFNs, which are the logical fragment numbers from the start of the file. For example, you might see output similar to the following:
** Phase 1 - Check Blocks and Sizes FRAGMENT 784 DUP I=38 LFN 0 FRAGMENT 785 DUP I=38 LFN 1 FRAGMENT 786 DUP I=38 LFN 2 . . .
fsck processes objects as fragments, but in previous Solaris releases, only reported object information as blocks. It now correctly reports as fragments.
If fsck finds error conditions that involve duplicate blocks or fragments, fsck offers to display the uncleared files at end of the fsck output. For example, you might see output similar to the following:
LIST REMAINING DUPS? yes Some blocks that were found to be in multiple files are still assigned to file(s). Fragments sorted by inode and logical offsets: Inode 38: Logical Offset 0x00000000 Physical Fragment 784 Logical Offset 0x00000800 Physical Fragment 786 Logical Offset 0x00001000 Physical Fragment 788 Logical Offset 0x00001800 Physical Fragment 790
Then, you can use the find -i inode-number command to identify the name of inode 38, in this example.