Forum
USB Dual Bay Dock Won't Mount Both HDs - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Peripherals (/forum-27.html)
+--- Thread: USB Dual Bay Dock Won't Mount Both HDs (/thread-1227.html)



USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 13th Aug, 2013 07:13 AM

XBian version: XBian 1.0 Beta 1.1
RPi model (512mb)

Problem description:

I currently have a Cavalry Dual Bay USB Dock that has both drive bays being utilized, set up in JBOD mode (Both drives mount just fine with my windows machine using this setup). I have media on both drives and would like to add both as sources for my media library in xbian, connected to the USB port on the RPi. The only problem is that when both drives are connected to the dock, only one of the drives (the one connected to Bay 2) gets recognized.

I have tested each drive individually in both bays of the USB dock and they both mount fine by themselves, but when both bays are occupied, the drive in Bay 1 never gets mounted.

Below is the link for the USB Dock that I own.

http://www.amazon.com/gp/aw/d/B0030MHL66

Any help is appreciated! Thanks!


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 13th Aug, 2013 09:39 AM

can you please try http://ivka57.dyndns-ip.com/pool/main/x/xbian-package-kernel/xbian-package-kernel_1.3-4.2_armhf.deb this kernel ?

I added full LUN support to scsi (so usb_storage). Don't have other idea now.


RE: USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 13th Aug, 2013 01:31 PM

Hello mk01! Thanks for the reply. I tried the kernel you recommended and got the following:

------------------------------------------------------------------------------------------------
root@xbian:/media# dpkg -i xbian-package-kernel_1.3-4.2_ armhf.deb
(Reading database ... 30080 files and directories currently installed.)
Preparing to replace xbian-package-kernel 1.2-2 (using xbian-package-kernel_1.3-4.2_armhf.deb) ...
Unpacking replacement xbian-package-kernel ...
dpkg: warning: unable to delete old directory '/lib/modules/3.9.8+': Directory not empty
dpkg: dependency problems prevent configuration of xbian-package-kernel:
xbian-package-kernel depends on rng-tools; however:
Package rng-tools is not installed.
xbian-package-kernel depends on xbian-package-initramfs-tools (>= 1.0-1.2); however:
Version of xbian-package-initramfs-tools on system is 1.0-0.8.

dpkg: error processing xbian-package-kernel (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xbian-package-kernel
---------------------------------------------------------------------------------------

I'm not entirely sure how to proceed. Any suggestions? Thanks!


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 13th Aug, 2013 01:38 PM

(13th Aug, 2013 01:31 PM)adt1340 Wrote:  Hello mk01! Thanks for the reply. I tried the kernel you recommended
dpkg: error processing xbian-package-kernel (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xbian-package-kernel
---------------------------------------------------------------------------------------

I'm not entirely sure how to proceed. Any suggestions? Thanks!

there are some dependencies you will have to follow, step by step always download related package (http://ivka57.dyndns-ip.com/pool/main/) to the same directory and then just "dpkg -i *.deb"

rnd-tools install from repo with "apt-get install rnd-tools"


RE: USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 13th Aug, 2013 03:40 PM

Hey mk01,

I got the initramfs-tools dependency issue fixed by downloading the related package you suggested. However, when I try to install the rnd-tools package, this is what happens:

---------------------------------------------------------------------
root@xbian:~# apt-get install rnd-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rnd-tools
root@xbian:~#
---------------------------------------------------------------------

I'm not sure as to why this doesn't work :/


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 13th Aug, 2013 04:25 PM

(13th Aug, 2013 03:40 PM)adt1340 Wrote:  E: Unable to locate package rnd-tools
root@xbian:~#
---------------------------------------------------------------------

I'm not sure as to why this doesn't work :/

typo while copying your text. "rng-tools". check your posted logs.


RE: USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 14th Aug, 2013 03:04 AM

Hey mk01. Okay Im now able to install rng-tools just fine. When I went to install the kernel, should i keep my old config, or update the config? Sorry for the questions, Im pretty new to this stuff. Thanks!


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 14th Aug, 2013 03:28 AM

do nothing, just install the packages. do you also have other packages as for instance xbian-package-initramfs-tools. nothing wrong can happen, worst case dpkg will inform you about additional needed package.

go for it !


RE: USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 14th Aug, 2013 01:35 PM

Okay, so I believe I was able to upgrade the kernel as you suggested. I ended up installing the following packages, as these were all required to not give me any error during installation:

rng-tools (from Repo)

btrfs-tools_1.0-xbian_armhf.deb
xbian-package-initramfs-tools_1.0-1.2_armhf.deb
xbian-package-splash_1.0-1.1_armhf.deb
xbian-package-kernel_1.3-4.2_armhf.deb

As I mentioned above, when I went to install all the packages, I was given no errors (suggesting to me that it worked). Only problem is that now the Rpi will not get past the initialization screen once I go through with a reboot of the system. I'm not sure if I ended up doing something incorrect. I can install a fresh copy of XBian 1.0 Beta 1.1 to try again if necessary. Thanks!


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 14th Aug, 2013 05:29 PM

You didn't do anything wrong. Only I forgot there is one dependency in those packages which is full filled by installing xbian-update 1.2 but this would install beta 2 on you RPI.

I will fix it, publish new initramfs tools package and let you know.

or if you read this faster, on beta 1.1 edit /etc/default/tmpfs file, change

"RUN_SIZE=10240
LOCK_SIZE=5120
SHM_SIZE=2048"

for

"RUN_SIZE=10%
#LOCK_SIZE=5120
#SHM_SIZE=2048"

only then install the packages and reboot.


RE: USB Dual Bay Dock Won't Mount Both HDs - adt1340 - 15th Aug, 2013 01:33 PM

Hey mk01, this worked like a charm! Got it working earlier this evening. Both harddrives are now recognized by the Rpi just fine now!

Got one more question. Will this fix be included in future Xbian versions, or should I just stick with this for the long haul? Thanks again!


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 15th Aug, 2013 06:56 PM

thanks for feedback.

it will become part of standard xbian with beta2 release.


RE: USB Dual Bay Dock Won't Mount Both HDs - weekend - 31st Aug, 2013 04:07 AM

I have the exact same problem but the fix doesn't work for me. The versions of the files above have since changed so I couldn't test with those and had to take the ones currently on your server.
After searching if I could fix it myself it seems that CONFIG_SCSI_MULTI_LUN=y has to be set. (it isn't in https://github.com/xbianonpi/xbian-patches/blob/master/kernel/.config and I assume that is one of the changes you made)
I compiled the kernel following the instructions at https://github.com/xbianonpi/xbian/wiki/Compiling-the-Linux-kernel-&-Raspberry-Pi-firmware and changed that setting. After some fooling around (and messing up the filesystem on the SD in such a way that plugging it into my laptop caused it to crash O.O) I got the fresh kernel working just fine but it still wouldn't create the second device.
In the end I just did it manually which seems like a good enough work around for now although a more permanent solution would be nice.

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HDD Model: Rev: 1234
Type: Direct-Access ANSI SCSI revision: 05

# echo "scsi add-single-device 0 0 0 1" > /proc/scsi/scsi

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HDD Model: Rev: 1234
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: HDD Model: Rev: 1234
Type: Direct-Access ANSI SCSI revision: 05

The device is now usable and shows up in /dev

Lessons learned:
CONFIG_SCSI_MULTI_LUN=y should probably be set.
Creating a backup of your SD is a lot less painful than filling in a 50 char wifi password 6 times in a day.
Same bug exists in raspbmc and in my quest to fix it I found I like xbian more than raspbmc or openelec.

Special thanks to the xbian dev's and especially mk01, I would have never given xbian a chance if it wasn't for the existing bug report and quick reply about this issue.


RE: USB Dual Bay Dock Won't Mount Both HDs - mk01 - 3rd Sep, 2013 11:00 PM

(31st Aug, 2013 04:07 AM)weekend Wrote:  Lessons learned:
CONFIG_SCSI_MULTI_LUN=y should probably be set.
Creating a backup of your SD is a lot less painful than filling in a 50 char wifi password 6 times in a day.

yes, missing MULTI_LUN=y was the problem there.
so you wasn't successful with the pre-compiled kernels from the beta2 repo without messing around with /proc kernel parameters?

I was hoping with the MULTILUN to put this issue behind us, but looks like not Undecided

thanks for letting me know.

mk