I'm new to OpenWRT so please bear with me. I really hope I've done my research. I spent all last night learning how packages and init scripts work, how to check the system logs, etc. I've just run out of ideas as to why this isn't working.
So I have a USB enclosure that holds two 2TB drives. Both drives are formatted HFS+, as they were originally used on a Mac. I'd really like to keep them that way if at all possible. I noticed that HFS+ has good filesystem performance on this router, so I was optimistic (I mean, how else would you test it?). I hope to hook this up via the USB port on my TL-WR1043ND and share over Samba.
I downloaded all the packages I thought I'd need, got everything set up nicely but for some reason, the volumes just won't mount! I'll run through some of the boot process and some debugging I've done to figure out where the problem is. I've trimmed out parts of the log having to do with other stuff for readability.
---------------------------------------------------------------------------------------
ar71xx-ehci ar71xx-ehci: Atheros AR91xx built-in EHCI controller
kernel: ar71xx-ehci ar71xx-ehci: new USB bus registered, assigned bus number 1
kernel: ar71xx-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
kernel: ar71xx-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
kernel: usb usb1: configuration #1 chosen from 1 choice
kernel: hub 1-0:1.0: USB hub found
kernel: hub 1-0:1.0: 1 port detected
…
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
info kernel: Initializing USB Mass Storage driver...
info kernel: scsi0 : SCSI emulation for USB Mass Storage devices
info kernel: usbcore: registered new interface driver usb-storage
info kernel: USB Mass Storage support registered.
debug kernel: usb-storage: device found at 2
debug kernel: usb-storage: waiting for device to settle before scanning
info sysinit: WARNING: /lib/functions/fsck not found
notice kernel: scsi 0:0:0:0: Direct-Access WDC WD20 EARS-00MVWB0 50.0 PQ: 0 ANSI: 4
notice kernel: scsi 0:0:0:1: Direct-Access WDC WD20 EARS-00MVWB0 50.0 PQ: 0 ANSI: 4
debug kernel: usb-storage: device scan complete
…
notice kernel: sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
notice kernel: sd 0:0:0:1: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
notice kernel: sd 0:0:0:0: [sda] Write Protect is off
debug kernel: sd 0:0:0:0: [sda] Mode Sense: 11 00 00 00
err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
notice kernel: sd 0:0:0:1: [sdb] Write Protect is off
debug kernel: sd 0:0:0:1: [sdb] Mode Sense: 11 00 00 00
err kernel: sd 0:0:0:1: [sdb] Assuming drive cache: write through
err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
info kernel: sda:
err kernel: sd 0:0:0:1: [sdb] Assuming drive cache: write through
info kernel: sdb: sda1
warn kernel: sdb1
err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
notice kernel: sd 0:0:0:0: [sda] Attached SCSI disk
err kernel: sd 0:0:0:1: [sdb] Assuming drive cache: write through
notice kernel: sd 0:0:0:1: [sdb] Attached SCSI disk
…
info kernel: yaffs: dev is 8388609 name is "sda1"
info kernel: yaffs: passed flags ""
warn kernel: yaffs: Attempting MTD mount on 8.1, "sda1"
info kernel: yaffs: dev is 8388609 name is "sda1"
info kernel: yaffs: passed flags ""
warn kernel: yaffs: Attempting MTD mount on 8.1, "sda1"
notice fstab: mount: mounting /dev/sda1 on /mnt/sda1 failed: Invalid argument
info kernel: yaffs: dev is 8388625 name is "sdb1"
info kernel: yaffs: passed flags ""
warn kernel: yaffs: Attempting MTD mount on 8.17, "sdb1"
info kernel: yaffs: dev is 8388625 name is "sdb1"
info kernel: yaffs: passed flags ""
warn kernel: yaffs: Attempting MTD mount on 8.17, "sdb1"
notice fstab: mount: mounting /dev/sdb1 on /mnt/sdb1 failed: Invalid argument
---------------------------------------------------------------------------------------
So what I get out of this is the host controller is found and loaded, the port is detected, the drive controller is detected, the disks are detected (they are indeed western digitals as noted), but when it comes time for fstab to mount the drives, it chokes with "Invalid Argument". The fact that "yaffs" is reporting these messages confuses me a little. Isn't that a different file system from hfs+?
So my next step is since the router can see these drives, I'll mount them manually. Maybe fstab was doing something dumb like detecting the wrong file system. So I check with fdisk -l:
---------------------------------------------------------------------------------------
root@OpenWrt:~# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 243202 1953514583+ ee EFI GPT
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 243202 1953514583+ ee EFI GPT
---------------------------------------------------------------------------------------
Yep, these are GUID partitioned, yeah, those are the right sizes and stuff. So…
root@OpenWrt:~# mount -t hfsplus /dev/sda1 /mnt/sda1
mount: mounting /dev/sda1 on /mnt/sda1 failed: Invalid argument
Oh come on! Well, maybe the hfsplus component didn't load or something.
---------------------------------------------------------------------------------------
root@OpenWrt:~# insmod hfsplus
insmod: can't insert 'hfsplus': File exists
root@OpenWrt:~# rmmod hfsplus
root@OpenWrt:~# insmod hfsplus
---------------------------------------------------------------------------------------
So no errors there… I'm out of ideas as to what could be wrong. The error messages I'm getting aren't particularly helpful and I think I've googled the same 6 words in different orders a thousand times now. If anyone could offer some suggestions, I'd really appreciate it.
Some more details:
I'm working with OpenWRT Backfire 10.03.1-rc4, and given it all the packages I think I'd need to hook up a USB drive and share files. Here's a listing of all the relevant packages I've got installed:
---------------------------------------------------------------------------------------
block-hotplug
block-mount
fdisk
hotplug2
kmod-fs-hfs
kmod-fs-hfsplus
kmod-fs-msdos
kmod-fs-ntfs
kmod-fs-vfat
kmod-nls-base
kmod-nls-utf8
kmod-scsi-core
kmod-usb-core
kmod-usb-ohci
kmod-usb-storage
kmod-usb2
luci-app-samba
samba3
---------------------------------------------------------------------------------------
Just grabbed a bunch of file systems that I thought I'd want in the future and character support packages because I couldn't figure out which went with which.