3

I'm trying to migrate my home server from FreeNAS 8.3 to DragonFly BSD. In order to shuffle my files about I picked up a Seagate 8Tb Archive disk, attached it via eSATA, formatted it as UFS under FreeNAS then patiently waited about a week for it to trickle full.

Now I've got DragonFly going, but try as I might I can't get the UFS volume mounted. Is there some way to get this thing mounted under DragonFly?

I can see that the drive is using GPT (and a protective MBR) and is definitely UFS. Is there something incompatible between the two systems, despite their FreeBSD heritage? It also seems odd that I can see slices but not partitions. I expected ls /dev/ad6* to give me something like /dev/ad6p1a since the drive is using GPT, but evidently not.

I'm yet to try anything invasive (as in, write to the disk) because I'm completely in the dark on what the cause is.

% uname -a
DragonFly loki.misque.me 4.4-RELEASE DragonFly v4.4.3-RELEASE #5: Mon Apr 18 22:47:32 EDT 2016     [email protected]:/usr/obj/home/justin/release/4_4/sys/X86_64_GENERIC  x86_64

Some basic information about the disk:

% ls /dev/ad6*
/dev/ad6    /dev/ad6s0  /dev/ad6s1    

% cat /etc/fstab 
# Device                Mountpoint  FStype  Options     Dump    Pass#
/dev/serno/4C530012740115112064.s1a /       ufs rw      1   1
/dev/serno/4C530012740115112064.s1d /home       ufs rw      2   2
/dev/serno/4C530012740115112064.s1e /tmp        ufs rw      2   2
/dev/serno/4C530012740115112064.s1f /usr        ufs rw      2   2
/dev/serno/4C530012740115112064.s1g /var        ufs rw      2   2
/dev/serno/4C530012740115112064.s1b none        swap    sw      0   0
proc                    /proc       procfs  rw      0   0

/dev/ad6s1              /mnt/backup ufs ro      0   0

The mount effort in question:

% sudo mount -v /mnt/backup
mount_ufs: /dev/ad6s1 on /mnt/backup: incorrect super block

And my diagnostic efforts:

% sudo fdisk /dev/ad6
******* Working on device /dev/ad6 *******
parameters extracted from device are:
cylinders=15504021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=15504021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 238,(EFI GPT)
    start 1, size 4294967295 (2097151 Meg), flag 80 (active)
    beg: cyl 0/ head 0/ sector 2;
    end: cyl 1023/ head 255/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>    

% sudo disklabel64 -r ad6
disklabel64: bad pack magic number

% sudo disklabel64 -r ad6s0
disklabel64: bad pack magic number

% sudo disklabel64 -r ad6s1
disklabel64: bad pack magic number    

% sudo camcontrol devlist
<ATA WDC WD20EARX-00P AB51>        at scbus3 target 1 lun 0 (da0,sg0,pass0)
<ATA WDC WD30EFRX-68E 0A80>        at scbus3 target 2 lun 0 (da1,sg1,pass1)
<ATA OCZ-AGILITY 1.4>              at scbus3 target 3 lun 0 (da2,sg2,pass2)
<ATA WDC WD30EFRX-68A 0A80>        at scbus3 target 4 lun 0 (da3,sg3,pass3)
<ATA WDC WD20EARS-00M AB51>        at scbus3 target 5 lun 0 (da4,sg4,pass4)
<ATA WDC WD20EFRX-68E 0A82>        at scbus3 target 6 lun 0 (da5,sg5,pass5)
<ATA WDC WD20EARS-00M AB51>        at scbus3 target 7 lun 0 (da6,sg6,pass6)
<SanDisk Cruzer Fit 1.27>          at scbus6 target 0 lun 0 (pass8,sg8,da8)

% sudo gpt show /dev/ad6
        start         size  index  contents
            0            1      -  PMBR
            1            1      -  Pri GPT header
            2           32      -  Pri GPT table
           34           94      -  
          128      4194304      0  GPT part - FreeBSD Swap
      4194432  15623858696      1  GPT part - FreeBSD UFS/UFS2
  15628053128            7      -  
  15628053135           32      -  Sec GPT table
  15628053167            1      -  Sec GPT header

% sudo file -s /dev/ad6
/dev/ad6: DOS/MBR boot sector; partition 1 : ID=0xee, active, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 4294967295 sectors

% sudo file -s /dev/ad6s1
/dev/ad6s1: Unix Fast File system [v2] (little-endian) last written at Thu Jan  1 00:00:00 1970, number of blocks 0, number of data blocks 0, pending blocks to free 0, system-wide uuid 0,

2 Answers 2

1

DragonflyBSD user here.

If I recall correctly, FreeBSD's UFS and DragonflyBSD's UFS are not compatible. FreeBSD added a number of features to their version of UFS, such as soft updates, which are not supported under Dragonfly.

If you have two machines, you might find it easier to simply NFS export the drive from the original FreeNAS machine or transfer your files via SSH from the FreeNAS machine to the Dragonfly machine.

If you run into any issues along the way, the user mailing list is typically very friendly: https://www.dragonflybsd.org/mailinglists/ and you can also ask questions via IRC as well.

2
  • It looks more like Dragonfly isn't reading the GPT table correctly? A cleanly unmounted UFS volume shouldn't have a problem with softupdates. Maybe +J, but I don't know. Commented Jul 30, 2016 at 15:13
  • I've been neglectful here, apologies. According to the man page for newfs(8) soft updates are supported anyway. I put the whole thing in the "too hard basket" and, of all things, have used NTFS as the common tongue.
    – Andrew
    Commented Aug 1, 2016 at 1:01
0

You chose a rather convoluted migration.

FreeBSD, and therefore FreeNAS, uses UFS2 while DragonFly uses the older UFS1. Both have softupdates but UFS2 has a different format as it supports some other features like more timestamps, extended attributes, faster fsck and SUJ.

1
  • Thanks Pedro - that does appear to be the issue. To close the loop, FreeBSD (so presumably FreeNAS) can create UFS1 partitions with something like newfs -O 1 /dev/ad6s1. I'm not keen to test this myself though - that would require another week of waiting for the drive to fill up...
    – Andrew
    Commented Aug 2, 2016 at 4:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .