Friday, October 14, 2005

Strange fsck behaviour with alternated superblock

Subject: Re: Strange fsck behaviour with alternated superblock

JBR wrote:
> Why is it asking "FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE?" when doing
> fsck with alternated superblock ?
> Is this normal behaviour?

Yes, this is normal. The dynamic data is only updated (or only
regularly updated) in the main superblock I think, so the other ones
get stale pretty fast. Really, they're a repository of layout
information about the FS so you can find things like cgs &c in
emergency.

--tim

> I'am using Solaris 9 on a V440 with a Sun Storedge 3310.
> I have a strange behaviour with using fsck with a alternated supperblock:

> First make a filesystem:

> # newfs /dev/md/rdsk/d21
> newfs: /dev/md/rdsk/d21 last mounted as /afs7
> newfs: construct a new file system /dev/md/rdsk/d21: (y/n)? y
> /dev/md/rdsk/d21: 1430192192 sectors in 65533 cylinders of 64
> tracks,
> 341 sectors
> 698336.0MB in 13107 cyl groups (5 c/g, 53.28MB/g, 6528 i/g)
> super-block backups (for fsck -F ufs -o b=#) at:
> 32, 109504, 218976, 328448, 437920, 547392, 656864, 766336, 875808,
> 985280,
> Initializing cylinder groups:
> ............................................................................
> ...
> ............................................................................
> ...
> ............................................................................
> ...
> ........................
> super-block backups for last 10 cylinder groups at:
> 1429159104, 1429268576, 1429378048, 1429487520, 1429596992, 1429706464,
> 1429815936, 1429925408, 1430034880, 1430144352,
> Do normal fsck:

> # fsck -F ufs /dev/md/rdsk/d21
> ** /dev/md/rdsk/d21
> ** Last Mounted on /afs7
> ** 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, 704125298 free (10 frags, 88015661 blocks, 0.0%
> fragmentation)

> Mount de filesystem:

> # mount /afs7

> Umount without doing something on the filesystem:

> # umount /afs7

> Do fsck with alternated superblock:

> # fsck -F ufs -o b=109504 /dev/md/rdsk/d21
> Alternate super block location: 109504.
> ** /dev/md/rdsk/d21
> ** 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
> FREE BLK COUNT(S) WRONG IN SUPERBLK
> SALVAGE? y

> 2 files, 9 used, 704190842 free (10 frags, 88023854 blocks, 0.0%
> fragmentation)

> ***** FILE SYSTEM WAS MODIFIED *****

> Again same fsck without mounting fs:

> # fsck -F ufs -o b=109504 /dev/md/rdsk/d21
> Alternate super block location: 109504.
> ** /dev/md/rdsk/d21
> ** 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, 704190842 free (10 frags, 88023854 blocks, 0.0%
> fragmentation)

> ***** FILE SYSTEM WAS MODIFIED *****

> Modified , without asking something!

> When doing normal fsck everything is ok, but when using alternated
> superblock (makes no difference which one) it is always asking the
> salvage
> question. Makes also no difference if filesystem is mounted or not
> mounted
> between fsck's.

> Why is it asking "FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE?" when
> doing
> fsck with alternated superblock ?
> Is this normal behaviour?

yes, the alternate SB's are only updated during mkfs_ufs(1M),
tunefs(1M) and growfs(1M) - they are not kept updated during
regular use as far as dynamic changes to allocations is concerned.

---
frankB

0 Comments:

Post a Comment

<< Home