Should newfs include -S 4096? was Re: boot problem after freebsd-update from 9.1-RC2 to 9.1-RC3

Warren Block wblock at wonkity.com
Sat Nov 24 15:28:10 UTC 2012


On Fri, 23 Nov 2012, freebsd at johnea.net wrote:

> One of the complications was getting old metadata off of the drive. After trying a couple of 'dd' invocations:
> # overwriting the first sector
> dd if=/dev/zero of=/dev/ada0 bs=512 count=1
> # also tried overwriting the last sector
> diskinfo ada0 | cut -f4
> 3907029168
> (subtract 34, per WB) (I actually just subtracted the trailing 68)
> dd if=/dev/zero of=/dev/ada0 seek=3907029100
>
> This would still seem to not delete all of the metadata, since after issuing:
>
> gmirror label -b split gm0 /dev/ada0
> gmirror load
> # repartition new mirror
> gpart create -s MBR mirror/gm0
> # ignore "mirror/gm0s1 added, but partition is not aligned on 4096 bytes" after add
> gpart add -t freebsd -a 4k mirror/gm0
> # create the bsdlabel partitions in slice 1 (s1)
> gpart create -s BSD mirror/gm0s1
>
> I would see that the old gm0s1a and gm0s1b had reappeared, even though I had not yet issued the 'add -t freebsd-ufs'. I'm not sure if they came back with the 'add -t freebsd' or the 'create -s BSD'.

Saved this since yesterday, thinking maybe I could come up with an idea, 
but so far I can't think what would cause that.  It might not hurt to 
force a retaste after the dd.

> The only thing that seemed to fix it was:
>
> gpart destroy -F /dev/ada0
>
> I also tried at one point:
>
> gpart destroy -F ada0
> gpart create -s gpt ada0
> gpart destroy -F ada0

> The thing I wonder about now: Should newfs include -S 4096?
>
> I used:
>
> newfs -U /dev/mirror/gm0s1a
>
> Will this lead to 512 byte sector access to the disk through the file system?
>
> Will this impact performance or longevity of the mirror?

It's a good question; I have not tried it.


More information about the freebsd-questions mailing list