On Thu, 7 Jun 2007, Otto Moerbeek wrote:

> We have seen some reports now on disappearing paritions. On sparc and
> sparc64, there were actual bugs that have been fixed now. 
> 
> For all platforms, the suspect new consistency checking code now been
> disabled until we find out what is causing the mishap, and (very)
> recent kernels should be back to normal.
> 
> Please report with dikslabel info and dmesg if things are still going
> wrong. Preferable with fdisk (if applicable) and old disklabel
> information as well.

I have thinking a bit more about the problem, and it is very likely the
following scenario happened:

1. Kernel upgrade by source.

2. Reboot

3. Kernel reads old disklabel format and converts it in-memory to the
new v1 format. 

4. Run a newfs using the old executable that does not know about the
new disklabel format. newfs writes the block and fragment size info
the old way, on a spot that is used in v1 labels to store the high 16
bits of the offset and size of a partition. The label is written with
version = 1, since the in-memory copy is v1. 

5. Reboot, the kernel now sees a v1 disklabel with very high offset
and/or size, the new consistency code (which is now disabled) kicks in
and marks the partition as unused. 

So the lesson here is: keep userland and kernel in sync, or use a
snapshot to upgrade. 

        -Otto

Reply via email to