Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2002 16:39:23 +0000 (GMT)
From:      Daniel Flickinger <attila@hun.org>
To:        Kirk McKusick <mckusick@beastie.mckusick.com>
Cc:        FreeBSD-CURRENT <current@freebsd.org>
Subject:   Re: UFS-2 partition destroyed by change
Message-ID:  <20021128163923.PyLY939@hun.org>
In-Reply-To: <200211280753.gAS7rX59074517@beastie.mckusick.com>
References:  <20021128060136.znoK8944@hun.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Sent: Wed, 27 Nov 2002 23:53:33 -0800 by Kirk McKusick:

| If I understand correctly, you ran a new fsck on a UFS-2 that
| had not yet been mounted by your new kernel. Thus you had a
| version of fsck that expected a converted UFS-2 filesystem
| that you had not yet converted (by mounting with the new kernel).
| I would have expected it to fail with a bad superblock magic
| number. Had you mounted it before running the new fsck, all would
| have been well. I am at a loss to explain why fsck did not gag
| and refuse to check it though.

    Yes, basically... force of 25 years habit with UNIX/BSD:

	shutdown now
	sync
	sync
	umount -a
	sync
	halt
	...
	SPC
	boot -s
	fsck -y
	exit

    No, unfortunately, fsck did not gag --it just ate it and
    spit out a few seeds. Nothing important lost; da1a needed
    updating, anyway.

    Your announcement was timely; fortunately, I had not
    converted the remaining nine working partitions.  I
    installed a new boot block: 'disklabel -B da1'; rebuilt
    the da1a partition: 'newfs -O 2 /dev/da1a'; and mounted
    it on the 1200 GMT 27 Nov kernel and world.

    OK, I just loaded the 1200 GMT 28 Nov slice by the same
    procedure as above. da1a is a UFS-2 partition which had
    been mounted to the 1200 GMT 27 Nov slice --no problem--
    which leaves the "mystery" of why fsck did not choke on
    the magic numbers --in other words, the usual enigma:
    "...but, you're not supposed to do it that way"
    "...but, I just did".

    Since my boot partition is still UFS-1, I could back the
    source down to 1200 GMT 25 Nov, redo da1a with the
    pre-change UFS-2, re-update to today, and see if fsck
    tears it up. I'm not thrilled with that, but it would be
    all part of the cause, and my total build time is less
    than 90 minutes; 180 for the double pass. Let me know.

  --
  Sanity is the Playground for the Unimaginative

| + =-=-=-=-=
| +
| + Sent: Thu, 28 Nov 2002 06:01:36 +0000 (GMT)
| + To: Daniel Flickinger <attila@hun.org>
| + To: FreeBSD-CURRENT <current@freebsd.org>
| + Cc: Kirk McKusick <mckusick@mckusick.com>
| + Subject: UFS-2 partition destroyed by change
| + X-ASK-Info: Confirmed by User
| +
| + I only had one UFS-2 partition, the backup root
| + partition on da1a. After McKusick's notice of change:
| +
| + Message-ID: <200211250511.gAP5BU59067794@beastie.mckusick.com>
| +
| + for 26 Nov, I installed the kernel and world sliced at
| + 1200 GMT 27 Nov.
| +
| + As a matter of principle, I _always_ run fsck -y from
| + single user at reboot of a new world (which means every
| + day now) even though I have not had a crash --pardon me
| + for too many years of BSD, but habits stick
| +
| + da1a was shredded; only lost+found:
| +
| + p1:da1a #535-> ll lost+found/
| + total 8
| + 0 br-xrw--wT  1 root  wheel    0,   0 Jan  1  1970 #00455
| + 0 br-xrw--wT  1 root  wheel    0,   0 Jan  1  1970 #00561
| + 0 br-xr-xr-x  1 root  wheel    0,   0 Jan  1  1970 #00813
| + 0 br-xr-x--t  1 root  wheel    0,   0 Jan  1  1970 #00865
| + 8 d-wSr-x--T  2 root  wheel      8192 Jan  1  1970 #01031
| +
| + The directory is empty. No pipers for Last Post, but a
| + rather good sendoff of 80MB to bit heaven. No other
| + partition even whimpered.... and nothing really lost
| + since it was a duplicate of da0a.
| +
| + I was about to convert the remaining 9 partitions to
| + UFS-2 when I read Kirk's notice and decided to wait. I'll
| + rebuild the da1a partition with UFS-2 (new and improved
| + version?) and see what happens tomorrow morning with the
| + 1200 GMT 28 Nov slice.
| +
| + If I do a 'disklabel -B da1' (I have a pair of
| + dangerously dedicated 9G 160 SCSIs), I presume that
| + /boot/mbr is now the correct "new" UFS-2 boot record? My
| + intention is to convert all parititions one-by-one,
| + except da0a, to UFS-2, and then 'boot -s' from da1 and
| + 'dd' da0a since the disks are siamese twins.
| +
| +
| + --
| + Sanity is the Playground for the Unimaginative


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021128163923.PyLY939>