In FreeNAS 9.3, I created a partition (slice?) by doing:
fdisk -BI /dev/ada3
bsdlabel -wB /dev/ada3s1
newfs -O2 -U /dev/ada3s1a
This drive is now /dev/sdg on Ubuntu 14.04, which I've been unable to mount.
I've tried to mount it like so:
$ sudo mount -r -t ufs -o ro,ufstype=ufs2 /dev/sdg1 /mnt/tmp/
mount: wrong fs type, bad option, bad superblock on /dev/sdg1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Output from more relevant commands:
$ sudo fdisk -l /dev/sdg
Disk /dev/sdg: 1000.2 GB, 1000203804160 bytes
16 heads, 63 sectors/track, 1938018 cylinders, total 1953523055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x90909090
Device Boot Start End Blocks Id System
/dev/sdg1 * 63 1953522143 976761040+ a5 FreeBSD
$ sudo hexdump /dev/sdg1 | grep -w '1954'
0000d00 3cf0 0000 543d 0119 7400 3d1f 0119 1954
...
As you can see, the UFS2 magic number 0x19540119 is present at offset 0xd0c. At what offset does the driver expect it?
dmesg shows:
[ 2499.499004] sd 7:0:0:0: [sdg] 1953523055 512-byte logical blocks: (1.00 TB/931 GiB)
[ 2499.500127] sd 7:0:0:0: [sdg] Write Protect is off
[ 2499.500133] sd 7:0:0:0: [sdg] Mode Sense: 00 38 00 00
[ 2499.500996] sd 7:0:0:0: [sdg] Asking for cache data failed
[ 2499.501306] sd 7:0:0:0: [sdg] Assuming drive cache: write through
[ 2499.528760] sdg: sdg1
[ 2499.528760] sdg1: <bsd: >
[ 2499.532364] sd 7:0:0:0: [sdg] Attached SCSI disk
[ 2511.225195] ufs: ufs_fill_super(): bad magic number
I have also tried without the ro option. I've tried ufstype=44bsd, offset=32256 and offset=32768
Any suggestions are greatly appreciated!