On Fri, Jul 10, 2015 at 04:04:04PM +0000, Vijay Sankar wrote:

> My objective for this weekend was to follow the new dpb and build ports
> without using sudo. So I was hoping to upgrade to the latest snapshot on a
> system that I use for tests.
> 
> The test system has a 2TB drive and it had two 300GB partitions in it for
> ports and vm; and a 120GB SSD for the OS and used to look as follows:
> 
> Filesystem     Size    Used   Avail Capacity  Mounted on
> /dev/sd1a     1005M   55.0M    900M     6%    /
> /dev/sd1k     64.5G   20.9G   40.3G    34%    /home
> /dev/sd1d      3.9G   10.0K    3.7G     0%    /tmp
> /dev/sd1f      2.0G    966M    946M    51%    /usr
> /dev/sd1g     1005M    191M    764M    20%    /usr/X11R6
> /dev/sd1h      9.8G    2.9G    6.5G    31%    /usr/local
> /dev/sd1j      2.0G    2.0K    1.9G     0%    /usr/obj
> /dev/sd1i      2.0G    827M    1.1G    43%    /usr/src
> /dev/sd1e     13.5G   26.5M   12.8G     0%    /var
> /dev/sd0h      298G    176G    107G    62%    /ports
> /dev/sd0f      298G   19.6G    263G     7%    /vm
> 
> My /etc/fstab was
> 
> 4f0cd8b5e7fd8f6a.b none swap sw
> 4f0cd8b5e7fd8f6a.a / ffs rw 1 1
> 4f0cd8b5e7fd8f6a.k /home ffs rw,nodev,nosuid 1 2
> 4f0cd8b5e7fd8f6a.d /tmp ffs rw,nodev,nosuid 1 2
> 4f0cd8b5e7fd8f6a.f /usr ffs rw,nodev 1 2
> 4f0cd8b5e7fd8f6a.g /usr/X11R6 ffs rw,nodev 1 2
> 4f0cd8b5e7fd8f6a.h /usr/local ffs rw,nodev 1 2
> 4f0cd8b5e7fd8f6a.j /usr/obj ffs rw,nodev,nosuid 1 2
> 4f0cd8b5e7fd8f6a.i /usr/src ffs rw,nodev,nosuid 1 2
> 4f0cd8b5e7fd8f6a.e /var ffs rw,nodev,nosuid 1 2
> 4d43e3389228e319.h /ports ffs rw,nodev,nosuid 1 2
> 4d43e3389228e319.f /vm ffs rw,nodev,nosuid 1 2
> 
> I am not sure what happened -- but when I rebooted the system this morning
> /ports and /vm would not mount; so I commented out the last two lines in
> /etc/fstab and rebooted. After reboot disklabel seems to have changed
> completely and it currently looks like this:
> 
> # disklabel sd0
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: ST2000DM001-1CH1
> duid: 0000000000000000
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 503
> total sectors: 8089950
> boundstart: 0
> boundend: 8089950
> drivedata: 0
> 
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>   c:          8089950                0  unused
> 
> 
> Is there any way fix the disklabel or is this an error that is impossible to
> recover from? duid used to show up as 4d43e3389228e319 and not
> 0000000000000000.
> 
> Please let me know if you have any suggestions.

Get your old label from /var/backups and try to restore it with
disklabel -R.  You don't tell what your platform is, it might be that
you also need to do fdisk work first to restore the mbr partition
table. 

But of course, it is also interesting to know what happened to you
disk. But since you do not tell us what you did you are on your own
here. 

        -Otto

Reply via email to