SUMMARY: RE: I used fsirand on the root filesystem.... :(

From: LOEWENTHAL Simon <sloewenthal_at_gemini.edu>
Date: Tue May 18 2004 - 10:01:48 EDT
Found it out myself, but I also got the same answers from several people:
Dave Foster, Wolfgang Schwurack.  Thanks to everyone who responded.

----------------------- SUMMARY -----------------------

I should've used the 'reboot -n' option to reboot the system.  The '-n'
option stops the system writing back the superblock when it syncs.

In order to solve the problem:

i)  Locate an alternative superblock to use using newfs.

newfs -Nv /dev/rdsk/c1t0d0s0  #  display the alternative superblocks.  I
used 32.

# newfs -Nv /dev/rdsk/c1t0d0s0
mkfs -F ufs -o N /dev/rdsk/c1t0d0s0 8386767 107 27 8192 1024 96 1 167 8192 t
0 -1 8 107 n
Warning: 1 sector(s) in last cylinder unallocated
/dev/rdsk/c1t0d0s0:     8386766 sectors in 2903 cylinders of 27 tracks, 107
sectors
        4095.1MB in 91 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 833072,
 7490224, 7582784, 7675344, 7767904, 7860464, 7953024, 8045584, 8138144,
 8230704, 8323264,

ii)  Run FSCK with  the different superblock:

# fsck -F ufs -o b=32
Alternate super block location: 32.
** /dev/rdsk/c1t0d0s0
** 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
70246 files, 1445659 used, 2682186 free (3458 frags, 334841 blocks, 0

This will also use the new superblock to FSCK all the otehr filesystems in
the vfstab.

iii)   IMPORTANT:
You have to "reboot -n" to keep that superblock.  If you do not you should
have the same problem as last time -  I  never tested this out myself.  I
read it on this archive:
http://www.sunmanagers.org/archives/1995/1618.html but the -n option is in
Sol.2.9.


Regards,
Simon.

---
Simon Loewenthal
Gemini Observatory
Information Systems Group
Video 139.229.33.88
Voice +56 51 205610


-----Original Message-----
From: sunmanagers-bounces@sunmanagers.org
[mailto:sunmanagers-bounces@sunmanagers.org]On Behalf Of LOEWENTHAL
Simon
Sent: Monday, May 17, 2004 3:29 PM
To: Sun Mangers
Subject: I used fsirand on the root filesystem.... :(


Hi all,

I was using fsirand on a Solaris 9 server.  Its man page said that if you
used this on the root filesystem then you should reboot immediatly
afterwards, so I brought the system to single user mode and ran this:

[root@gate]root$ fsirand /dev/dsk/c1t0d0s0
[root@gate]root$ reboot -- -s

Afterward it rebooted root failed FSCK complaining that the superblock was
bad:

The / file system (/dev/rdsk/c1t0d0s0) is being checked.
/dev/rdsk/c1t0d0s0: BAD SUPER BLOCK: BAD VALUES IN SUPER BLOCK
/dev/rdsk/c1t0d0s0: USE AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED
INFORMATION;
/dev/rdsk/c1t0d0s0: eg. fsck [-F ufs] -o b=# [special ...]
/dev/rdsk/c1t0d0s0: where # is the alternate super block. SEE fsck_ufs(1M).

/dev/rdsk/c1t0d0s0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

WARNING - Unable to repair the / filesystem. Run fsck
manually (fsck -F ufs /dev/rdsk/c1t0d0s0). Exit the shell when done to
continue the boot process.

Does anyone know how to get out of this fix?


Regards,
Simon.

---
Simon Loewenthal
Gemini Observatory
Information Systems Group
Video 139.229.33.88
Voice +56 51 205610

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.684 / Virus Database: 446 - Release Date: 13/05/2004
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.684 / Virus Database: 446 - Release Date: 13/05/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.684 / Virus Database: 446 - Release Date: 13/05/2004
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue May 18 10:01:43 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:32 EST