UFS Cannot mount volume formatted on NetBSD

Hello,

I need some help to mount a hardware RAID volume on FreeBSD.

The RAID volume was previously formatted on NetBSD, probably as FFS. On NetBSD, it mounted without any problem.

Now the machine is running FreeBSD.

The RAID controller is a 3ware card:
none2@pci0:1:0:0: class=0x010400 rev=0x01 hdr=0x00 vendor=0x13c1 device=0x1004 subvendor=0x13c1 subdevice=0x1004
vendor = '3ware Inc'
device = '9650SE SATA-II RAID PCIe'
class = mass storage
subclass = RAID


At first, FreeBSD detected the controller but no driver was attached. I installed and loaded twa-kmod.
kldload /boot/modules/twa.ko


Now the RAID volume is visible as /dev/da0.

dmesg shows:
3ware device driver for 9000 series storage controllers, version: 3.80.06.003
twa0: <3ware 9000 series Storage Controller> port 0xe000-0xe0ff mem 0xd0000000-0xd1ffffff,0xdf320000-0xdf320fff irq 16 at device 0.0 on pci1
twa0: INFO: (0x15: 0x1300): Controller details:: Model 9650SE-2LP, 2 ports, Firmware FE9X 4.08.00.006, BIOS BE9X 4.08.00.001
da0 at twa0 bus 0 scbus9 target 0 lun 0
da0: <AMCC 9650SE-2LP DISK 4.08> Fixed Direct Access SPC-3 SCSI device
da0: Serial Number CE37866R00027B0054FD
da0: 100.000MB/s transfers
da0: 476827MB (976541696 512 byte sectors)
GEOM: da0: invalid disklabel.
GEOM: diskid/DISK-CE37866R00027B0054FD: invalid disklabel.


bsdlabel shows this:
# /dev/da0:
type: ?
disk: ld0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 60786
sectors/unit: 976541696
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0
track-to-track seek: 0
drivedata: 0

4 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 976541696 0 4.2BSD 0 0 0
d: 976541696 0 unused 0 0
bsdlabel: number of partitions (4) < DEFPARTITIONS (8)
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilities


fstyp does not recognize the filesystem:
UFS1 superblock failed: fs->fs_metaspace (131072) > fs->fs_fpg / 2 (94776)
fstyp: /dev/da0: filesystem not recognized


But file -s /dev/da0 detects a Unix Fast File System: Unix Fast File system [v1] (little-endian)

I tried to mount it read-only:
mkdir -p /mnt/raid
mount -t ufs -o ro /dev/da0 /mnt/raid


But FreeBSD refuses to mount it:
mount: /dev/da0: No such file or directory


I also tried mounting the entries shown by bsdlabel, but the result was the same.

The following error appears in dmesg after the mount attempt:
UFS1 superblock failed: fs->fs_metaspace (131072) > fs->fs_fpg / 2 (94776)
 
For Writing UFS on NetBSD & OpenBSD & FreeBSD are different.
Also "slicing can be different". Sometimes you can however mount "read-only" and sometimes you must specify an offset to start of a partition.
You can try
Code:
-lsblk
-gpart show -l
-gpart show -p
-glabel list -a

I suppose there is no MBR or GPT on start of the disk, so probably a full "NETBSD disk , with own loader" .... painfull.
Note if you know the exact number of bytes from start of the disk you can do something like,
Code:
mdconfig -a -t vnode -f /dev/ada0 -o osf=204800 -x 409600
Then try to mount that
 
Thank you.

I checked this.

There is no visible MBR or GPT on the RAID volume.

The "a" partition starts at offset 0. So I do not think the problem is a wrong partition offset.

I also tried mounting the "a" partition, but I got the same result as with /dev/da0.

# glabel list da0
Geom name: da0
Providers:
1. Name: diskid/DISK-CE37866R00027B0054FD
Mediasize: 499989348352 (466G)
Sectorsize: 512
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 976541696
length: 499989348352
index: 0
Consumers:
1. Name: da0
Mediasize: 499989348352 (466G)
Sectorsize: 512
Mode: r0w0e0

# gpart show -l
=> 40 468862048 ada0 GPT (224G)
40 1024 1 (null) (512K)
1064 461372416 2 (null) (220G)
461373480 7488608 3 (null) (3.6G)

# gpart show -p
=> 40 468862048 ada0 GPT (224G)
40 1024 ada0p1 freebsd-boot (512K)
1064 461372416 ada0p2 freebsd-ufs (220G)
461373480 7488608 ada0p3 freebsd-swap (3.6G)
 
Back
Top