|
|||
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: Adding a Disk (Tasks) 13. x86: Adding a Disk (Tasks) 14. Configuring Solaris iSCSI Targets and Initiators (Tasks) 15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS) 16. The format Utility (Reference) 17. Managing File Systems (Overview) 18. Creating UFS, TMPFS, and LOFS File Systems (Tasks) 19. Mounting and Unmounting File Systems (Tasks) 20. Using The CacheFS File System (Tasks) 21. Configuring Additional Swap Space (Tasks) 22. Checking UFS File System Consistency (Tasks) How the File System State Is Recorded What the fsck Command Checks and Tries to Repair Interactively Checking and Repairing a UFS File System How to Check the root (/), /usr, or /var File Systems From an Alternate Boot Device How to Check Other File Systems (Not root (/), /usr, or /var) How to Preen a UFS File System How to Restore a Bad Superblock ( Solaris Express Release) How to Restore a Bad Superblock (Solaris 8, 9, and 10 Releases) Syntax and Options for the fsck Command 23. UFS File System (Reference) 24. Backing Up and Restoring File Systems (Overview) 25. Backing Up Files and File Systems (Tasks) 26. Using UFS Snapshots (Tasks) 27. Restoring Files and File Systems (Tasks) 28. UFS Backup and Restore Commands (Reference) 29. Copying UFS Files and File Systems (Tasks) |
Restoring a Bad SuperblockWhen the superblock of a file system becomes damaged, you must restore it. The fsck command tells you when a superblock is bad. Fortunately, copies of the superblock are stored within a file system. You can use the fsck -o b command to replace the superblock with one of these copies or use fsck's automatic search for backup superblocks feature, which is new in the Solaris Express release. For more information about this feature, see Automatic Search for Backup Superblocks. For more information about the superblock, see Superblock. If the superblock in the root (/) file system becomes damaged and you cannot restore it, you have two choices:
How to Restore a Bad Superblock ( Solaris Express Release)This procedure is new in the Solaris Express release. If your file system has a bad superblock, fsck automatically calculates an alternative superblock as seen in the following messages: BAD SUPERBLOCK AT ... LOOK FOR ALTERNATE SUPERBLOCKS WITH MKFS? LOOK FOR ALTERNATE SUPERBLOCKS WITH NEWFS? Caution - If a file system with a damaged superblock was created with newfs or mkfs customized parameters, such as ntrack or nsect, using fsck's automatically calculated superblock for the repair process could irreparably 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 following prompt to cancel the fsck session: CANCEL FILESYSTEM CHECK? 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.
How to Restore a Bad Superblock (Solaris 8, 9, and 10 Releases)
The following example shows how to restore the superblock copy 5264. # newfs -N /dev/rdsk/c0t3d0s7 /dev/rdsk/c0t3d0s7: 163944 sectors in 506 cylinders of 9 tracks, 36 sectors 83.9MB in 32 cyl groups (16 c/g, 2.65MB/g, 1216 i/g) super-block backups (for fsck -b #) at: 32, 5264, 10496, 15728, 20960, 26192, 31424, 36656, 41888, 47120, 52352, 57584, 62816, 68048, 73280, 78512, 82976, 88208, 93440, 98672, 103904, 109136, 114368, 119600, 124832, 130064, 135296, 140528, 145760, 150992, 156224, 161456, # fsck -F ufs -o b=5264 /dev/rdsk/c0t3d0s7 Alternate superblock location: 5264. ** /dev/rdsk/c0t3d0s7 ** 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 36 files, 867 used, 75712 free (16 frags, 9462 blocks, 0.0% fragmentation) ***** FILE SYSTEM WAS MODIFIED ***** # |
||
|