Multiple USB disks on USB expansion port

Hi,

I’m having trouble connecting multiple disks on a single USB expanstion port of the EX4. Basically, it is a a 2- or 4-bay USB 3.0 (1.1 and 2.0 compatible) enclosure like this ( http://www.amazon.com/gp/product/B00JLFIKN4/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1)..)

I’ve imagined that the EX4 should recognize all the disks installed in the enclosure (whch is basically a USB hub), however it only recognizes the first disk. Let’s say, if it is a 4-bay enclosure, it will only recognize the first disk on the HUB. If I remove the first disk, it will recognize the disk on the second bay (which is the first installed).

The enclosure works fine, I have it working on a Macbook Pro 2008 (USB 2.0) and have tested it also on a Macbook Pro 2013 and on a Macbook Air 2013 (both USB 3.0).

Have anybody tried installing multiple disks (using a USB hub) on a single expansion USB port?

The basic idea is to create a LVM spanned logical volume using 4 disks of different capacity (2x2TB, 1x1TB, and 1x3TB) to use as a backup device. I’m sure the firmware does supoport LVM. However, when I try to initialize the disks (create a physical volume), I get the following error:

read failed after 0 of 4096 at 10737352704: Input/output error
read failed after 0 of 4096 at 10737410048: Input/output error
read failed after 0 of 4096 at 0: Input/output error
read failed after 0 of 4096 at 4096: Input/output error

Clearly, something is wrong, but I can’t figure out what. I can see the multiple devices (/dev/sde, /dev/sdf, /dev/sdg, and /dev/sdh) but I can access only the first one: /dev/sde. If I try to access any of the other three devices (or two or one if less than 4 disks are installed) it just fails.

Thanks

I do not believe the WD My Cloud EX4 supports USB hubs or enclosures with independent drive mounting. The User Manual refers to individual external drives on the USB ports.

Regards, 

ganda fialho, so por esse nome deves ser tuga xd

yep EX4 doesnt support that and its not meant to support… doesnt have drivers / code for that 

individual disks should work just fine

Answer from support ticket:

“…we recommend you to update the Firmware on the unit. After you perform the Firmware update, or if the Firmware is up to date, we recommend you to do a System Restore to the unit…  About your question about the USB Hub, you may be able to use a Power USB Hub on the USB ports of your WD My Cloud EX4.

It looks like any WD believes that any problem is solved by a firmware update and a system restore. Clearly, it is not the case. THe firware was up to date and I did a system restore. As I was expecting, this didn’t solve the problem.

I followed up their answer requesting a straight answer if the devices does or doesn’t support multiple disks on the same port. It is a simple answer. Actually, a test which anyone with a device, a USB hub, and 2 USB disks can perform. If it does work for anybody I would like to know. But apparenlty, WD never did this test, so they don’t know the answer. Maybe for that reason, they used the work “may” instead of “will”, “should”, etc.

I agree the answer from WD support email is a really useless answer. But I am pretty sure the answer is no, EX4 does not spport USB devices with multiple drives. As someone already answered, you’d need the right drivers to do so, which I don’t believe are included on EX4’s firmware.

Apparently the EX4 does support multiple disks. Here is the WD support answer: “We recommend you to use a Power USB Hub, since it should allow you to recognize multiple drives to a single USB port on the unit, as we have tested and has worked”.

Later I will enable some USB debug on the device’s kernel and post here more info on connecting devices a HUB.

Here is what appears on the kernel log (from the “dmesg” command):

usb 2-2: new SuperSpeed USB device number 5 using etxhci_hcd_131016
scsi18 : usb-storage 2-2:1.0
scsi 18:0:0:0: Direct-Access ST310003 33AS 0X06 PQ: 0 ANSI: 6
sd 18:0:0:0: [sde] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 18:0:0:0: Attached scsi generic sg4 type 0
sd 18:0:0:0: [sde] Write Protect is off
sd 18:0:0:0: [sde] Mode Sense: 27 00 00 00
scsi 18:0:0:1: Direct-Access Hitachi HDS5C3030BLE630 0X06 PQ: 0 ANSI: 6
sd 18:0:0:0: [sde] No Caching mode page present
sd 18:0:0:0: [sde] Assuming drive cache: write through
sd 18:0:0:1: [sdf] Very big device. Trying to use READ CAPACITY(16).
sd 18:0:0:1: Attached scsi generic sg5 type 0
sd 18:0:0:0: [sde] No Caching mode page present
sd 18:0:0:0: [sde] Assuming drive cache: write through
sd 18:0:0:1: [sdf] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
sd 18:0:0:1: [sdf] 4096-byte physical blocks
sd 18:0:0:1: [sdf] Write Protect is off
sd 18:0:0:1: [sdf] Mode Sense: 27 00 00 00
scsi 18:0:0:2: Direct-Access SAMSUNG HD204UI 0X06 PQ: 0 ANSI: 6
sd 18:0:0:1: [sdf] No Caching mode page present
sd 18:0:0:1: [sdf] Assuming drive cache: write through
sd 18:0:0:2: Attached scsi generic sg6 type 0
scsi 18:0:0:3: Direct-Access WDC WD20 EARX-00PASB0 0X06 PQ: 0 ANSI: 6
sd 18:0:0:2: [sdg] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 18:0:0:1: [sdf] Very big device. Trying to use READ CAPACITY(16).
sd 18:0:0:2: [sdg] Write Protect is off
sd 18:0:0:2: [sdg] Mode Sense: 27 00 00 00
sd 18:0:0:3: [sdh] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 18:0:0:1: [sdf] No Caching mode page present
sd 18:0:0:1: [sdf] Assuming drive cache: write through
sd 18:0:0:3: Attached scsi generic sg7 type 0
sd 18:0:0:2: [sdg] No Caching mode page present
sd 18:0:0:2: [sdg] Assuming drive cache: write through
sd 18:0:0:3: [sdh] Write Protect is off
sd 18:0:0:3: [sdh] Mode Sense: 27 00 00 00
 sde: sde1 sde2 sde3
sd 18:0:0:3: [sdh] No Caching mode page present
sd 18:0:0:3: [sdh] Assuming drive cache: write through
sd 18:0:0:2: [sdg] No Caching mode page present
sd 18:0:0:2: [sdg] Assuming drive cache: write through
sd 18:0:0:0: [sde] No Caching mode page present
sd 18:0:0:0: [sde] Assuming drive cache: write through
sd 18:0:0:0: [sde] Attached SCSI disk
sd 18:0:0:3: [sdh] No Caching mode page present
sd 18:0:0:3: [sdh] Assuming drive cache: write through
 sdf: sdf1 sdf2 sdf3
sd 18:0:0:1: [sdf] Very big device. Trying to use READ CAPACITY(16).
 sdg: sdg1 sdg2 sdg3
sd 18:0:0:1: [sdf] No Caching mode page present
sd 18:0:0:1: [sdf] Assuming drive cache: write through
sd 18:0:0:1: [sdf] Attached SCSI disk
 sdh: sdh1 sdh2 sdh3
sd 18:0:0:2: [sdg] No Caching mode page present
sd 18:0:0:2: [sdg] Assuming drive cache: write through
sd 18:0:0:2: [sdg] Attached SCSI disk
sd 18:0:0:3: [sdh] No Caching mode page present
sd 18:0:0:3: [sdh] Assuming drive cache: write through
sd 18:0:0:3: [sdh] Attached SCSI disk
FAT-fs (sde2): invalid media value (0x00)
FAT-fs (sde2): Can't find a valid FAT filesystem
ufsd:
ufsd:======NTFSBoot->le(0)======
ufsd:Signature : ?????
ufsd:RWBlocks : 0x74662d60 x 0x200, sde2, rw
ufsd:SectorsPerVolume : 0x0 x 0x0
ufsd:SectorsPerCluster : 0x0
ufsd:MFT : 0x200
ufsd:MFTMirr : 0x0
ufsd:Record size : 0
ufsd:Index size : -24
ufsd:Magic : 0x00
ufsd:===========================
ufsd:Invalid NTFS boot signature
ufsd:
ufsd:=== HfsVolumeHeader->le =========
ufsd:Signature : (null)
ufsd:Version : 0
ufsd:Attributes : 0x0
ufsd:LastMounted : (null)
ufsd:BytesPerBlock : 0x0
ufsd:Invalid HFS+ signature at 2
ufsd: failed to mount "sde2"
ufsd:
ufsd:======NTFSBoot->le(0)======
ufsd:Signature : 
ufsd:RWBlocks : 0x40000 x 0x200, sde3, rw
ufsd:SectorsPerVolume : 0x0 x 0x0
ufsd:SectorsPerCluster : 0x0
ufsd:MFT : 0x0
ufsd:MFTMirr : 0x0
ufsd:Record size : 0
ufsd:Index size : 0
ufsd:Magic : 0x00
ufsd:===========================
ufsd:Invalid NTFS boot signature
ufsd:
ufsd:=== HfsVolumeHeader->le =========
ufsd:Signature : H+
ufsd:Version : 4
ufsd:Attributes : 0x80002100
ufsd:LastMounted : HFSJ
ufsd:BytesPerBlock : 0x1000
ufsd:RWBlocks : 0x40000 x 0x200, sde3, rw
ufsd:TotalSectors : 0x40000
ufsd:TotalBlocks : 0x8000
ufsd:FilesCount : 3
ufsd:FoldersCount : 2
ufsd:Serial number : b05f6397-6f5545a8
ufsd:ModifyDate : 0xd0002841
ufsd:FreeBlocks : 0x74fb
ufsd:NextCatalogId : 0x1a
ufsd:WriteCount : 0x1
ufsd:Allocation : 0x00000001 [0x00000001 + 0x1)
ufsd:Extens : 0x00000100 [0x00000803 + 0x100)
ufsd:Catalog : 0x00000100 [0x00001403 + 0x100)
ufsd:Attributes : 0x00000100 [0x00000903 + 0x100)
ufsd:AltHdrOffset : 0x7fffc00
ufsd:===========================
ufsd:VolumeHeader is accepted as HFS+ 4.0 of size 0.12 Gb
ufsd:Journal info:
ufsd: flags: 1
ufsd: offset: 3000 (18)
ufsd: size: 800000 (4000)
ufsd:Journal header:
ufsd: magic: 4a4e4c78 (JNLx)
ufsd: endian: 12345678
ufsd: start: 25000
ufsd: end: 33000
ufsd: size: 800000
ufsd: blhdr: 1000
ufsd: chksum: 82f2d6a
ufsd: jhdr: 1000
ufsd:HFS journal: sector size 200 does not match journal header size 1000
ufsd: seq: d65406,d55568
ufsd:[25 - 33) sz=800, blhdr=1000, jhdr=1, 0
ufsd:Reinit volume for new sector size
ufsd:
ufsd:=== HfsVolumeHeader->le =========
ufsd:Signature : H+
ufsd:Version : 4
ufsd:Attributes : 0x80002100
ufsd:LastMounted : HFSJ
ufsd:BytesPerBlock : 0x1000
ufsd:RWBlocks : 0x8000 x 0x1000, sde3, rw
ufsd:TotalSectors : 0x8000
ufsd:TotalBlocks : 0x8000
ufsd:FilesCount : 3
ufsd:FoldersCount : 2
ufsd:Serial number : b05f6397-6f5545a8
ufsd:ModifyDate : 0xd0002841
ufsd:FreeBlocks : 0x74fb
ufsd:NextCatalogId : 0x1a
ufsd:WriteCount : 0x1
ufsd:Allocation : 0x00000001 [0x00000001 + 0x1)
ufsd:Extens : 0x00000100 [0x00000803 + 0x100)
ufsd:Catalog : 0x00000100 [0x00001403 + 0x100)
ufsd:Attributes : 0x00000100 [0x00000903 + 0x100)
ufsd:AltHdrOffset : 0x7fffc00
ufsd:===========================
ufsd:VolumeHeader is accepted as HFS+ 4.0 of size 0.12 Gb
ufsd:Journal info:
ufsd: flags: 1
ufsd: offset: 3000 (3)
ufsd: size: 800000 (800)
ufsd:Journal header:
ufsd: magic: 4a4e4c78 (JNLx)
ufsd: endian: 12345678
ufsd: start: 25000
ufsd: end: 33000
ufsd: size: 800000
ufsd: blhdr: 1000
ufsd: chksum: 82f2d6a
ufsd: jhdr: 1000
ufsd: seq: d65406,d55568
ufsd:[25 - 33) sz=800, blhdr=1000, jhdr=1, 0
ufsd:HFS journal is not empty!
ufsd:Replay: from: 25 to: 33 (joffset 3)
ufsd:Sequence number: d55568, 1 blocks
ufsd:Replay: adding block 26, 1 => 1404
ufsd:Sequence number: d55569, 4 blocks
ufsd:Replay: replacing block 26, by 28, 1 => 1404
ufsd:Replay: adding block 29, 1 => 1403
ufsd:Replay: adding block 2a, 1 => 0
ufsd:Replay: adding block 2b, 1 => 1
ufsd:Sequence number: d5556a, 4 blocks
ufsd:Replay: replacing block 28, by 2d, 1 => 1404
ufsd:Replay: replacing block 29, by 2e, 1 => 1403
ufsd:Replay: replacing block 2a, by 2f, 1 => 0
ufsd:Replay: replacing block 2b, by 30, 1 => 1
ufsd:Sequence number: d5556b, 1 blocks
ufsd:Replay: replacing block 2d, by 32, 1 => 1404
ufsd:Replay: replaying 4 blocks
ufsd:Replay: replaying block 32, 1 => 1404
ufsd:Replay: replaying block 2e, 1 => 1403
ufsd:Replay: replaying block 2f, 1 => 0
ufsd:Replay: replaying block 30, 1 => 1
ufsd:Total replayed 4
ufsd:Journal replay done.
ufsd:Journal is deactivated
ufsd:Reinit volume after replaying
ufsd:
ufsd:=== HfsVolumeHeader->le =========
ufsd:Signature : H+
ufsd:Version : 4
ufsd:Attributes : 0x80002100
ufsd:LastMounted : HFSJ
ufsd:BytesPerBlock : 0x1000
ufsd:RWBlocks : 0x8000 x 0x1000, sde3, rw
ufsd:TotalSectors : 0x8000
ufsd:TotalBlocks : 0x8000
ufsd:FilesCount : 3
ufsd:FoldersCount : 2
ufsd:Serial number : b05f6397-6f5545a8
ufsd:ModifyDate : 0xd0002841
ufsd:FreeBlocks : 0x74fb
ufsd:NextCatalogId : 0x1a
ufsd:WriteCount : 0x1
ufsd:Allocation : 0x00000001 [0x00000001 + 0x1)
ufsd:Extens : 0x00000100 [0x00000803 + 0x100)
ufsd:Catalog : 0x00000100 [0x00001403 + 0x100)
ufsd:Attributes : 0x00000100 [0x00000903 + 0x100)
ufsd:AltHdrOffset : 0x7fffc00
ufsd:===========================
ufsd:VolumeHeader is accepted as HFS+ 4.0 of size 0.12 Gb
ufsd:Journal info:
ufsd: flags: 1
ufsd: offset: 3000 (3)
ufsd: size: 800000 (800)
ufsd:Journal header:
ufsd: magic: 4a4e4c78 (JNLx)
ufsd: endian: 12345678
ufsd: start: 33000
ufsd: end: 33000
ufsd: size: 800000
ufsd: blhdr: 1000
ufsd: chksum: 8cd2c89
ufsd: jhdr: 1000
ufsd: seq: d752a4,d65406
ufsd:[33 - 33) sz=800, blhdr=1000, jhdr=1, 0
ufsd:jnl_op.load(d0ac6e00, 3000)
ufsd:Journal is activated
ufsd:Reinit volume after replaying
ufsd:ExtTree nodes: total 100, free ff, size 1000
ufsd:CatTree nodes: total 100, free fe, size 1000
ufsd:Detected case-insensitive catalog
ufsd:AttTree nodes: total 80, free 7e, size 2000
ufsd:Loading Bitmap...
ufsd:Bitmap: Bits 8000, frames 1 x 1000, free 74fb
ufsd:Zone: [1503,2503) - 1000 clusters
ufsd:sizeof(CFileSystemHfs) = 3896
ufsd: "mount" (sde3): force nocase=1
ufsd:Label : Boot OS X
ufsd:FileLinkFolderId 12, DirLinkFolderId 13
ufsd: "mount" (sde3): is mounted as HFSJ (journal replayed)
ufsd:ioctl:OnGetVolumeInfo
ufsd:GetVolumeInfo: Free = 0, State = clean

All the four disks are recognized but only the first one is accessible. That is why ufsd only mounts the partitions located in the sde device (first HDDs installed on the enclosure).

Well, have you tried mounting the other three yourself using the mount command?

Yes, I did. Actually, I also tried to write anything to the device (using dd, low level blocking device i/o) and it does not seems to work.

Well, I guess then, that is your answer.

Though if one is intrepid enough, they’d look at the firmware source code to see what or rather how exactly are the USB disks mounted at start time. I had looked into it a while ago (for my EX2, I don’t own an EX4) but don’t remember much of it anymore.

I don’t understand what you mean with “that is your answer”. I did tried to mount the filesystem manually and it didn’t work. Also, I tried to write anything to the block devices and only got I/O error messages from that.

Though if one is intrepid enough, they'd look at the firmware source code to see what or rather how exactly are the USB disks mounted at start time. I had looked into it a while ago (for my EX2, I don't own an EX4) but don't remember much of it anymore.

 I have no problems looking into the source code, change it, and sharing with the community, but clearly, it is not the case here. If I can’t mount the filesystem manually is because they are not available. BTW, there is a daemon which actually mounts removable the filesystem.

By “that is your answer”, I simply meant, your result from your attempt to mount it gave you the answer you were trying to find.

As for the source code idea, I’m not sure what you meant by “not the case here”…and “they are not available”.

The whole point is:

  • USB devices are recognized by the USB kernel driver (as shown in the dmesg log);

  • filesystems are not available because I can’t read/write anything to the devices, except for the first one of them.

It does not make any sense for me because:

  1. if the hardware does not support multiple USB devices on the same port it would not recognize the four HDDs.

  2. the hadware does support multiple USB devices on the same port, I’ve tested it using a USB hub.

  3. the kernel does recognize the USB devices on the 4-bay enclosure, however…

  4. …when I try to read/write to those devices I get an I/O error.

The point I’m trying to make is: why?

Why the kernel does recognize the HDDs but I can’t read/write to them?

Why can I read/write to the first one of them but not to the other three?

I believe the answer to that why lies in the USB mount part of the code, which if you are determined enough will try to dig into and figure out. My best guess is WD’s engineers just didn’t write the code with the possibility in mind of someone attaching multi-disk USB device…as most folks are going to attach just one drive per port. So sometimes when what’s available is not to one’s satisfaction, one sometimes needs to change that themselves. I needed non-root access to EX2 for my friends via SFTP…so I went and built my own custom firmware code (using their source code) to allow that.

I think that it is not the case of changing the code to make it work. This case is very simple:

  1. if a device is connected (USB or not) it becomes a “block device” on any Linux (and most Unix) system.

  2. when the block device is available, you can read and write data to it (notice read/write are low level, block device level).

  3. if you can’t read/write to a block device you can’t even read the partitions table! So, there is no way to know which filesystem exist inside the block device.

Have that said, I don’t really care about mounting or not mounting the filesystem automatically or manually. The important question is “why I can’t read/write to a block device if it was recognized by the lower level driver (USB in this case)”?

You might want to read the first answer here because you are confused thinking detection should imply mountable → http://askubuntu.com/questions/285539/detect-and-mount-devices (esp. this line “Whether a usb storage device mounts, or is detected, are separate issues.”)

I see several error messages in your dmesg output…like Invalid HFS+ signature…failed to mount “sde2”. Why are you ignoring these clues? There is your answer to why.

Cybernut1, I don’t think I’m confused… anyway, all the tests I found on this page I’ve already done. So, to summarize:

  1. the devices appear (are recgonized) on the dmesg logging

  2. the devices appear (are recognized) on the lsusb command

  3. the devices appear (are recognized) on the /dev/ as block devices

Even so, I can’t read/write anything to the device using “dd” ( http://en.wikipedia.org/wiki/Dd_(Unix))) for example. So, mounting it is out of question (basically because if the you can’t read the device it is impossible to read the partitions table, right?).

The only exception is the first HDDs on the enclosure. I can read/write to this device. The “errors” you saw on the dmesg are not really errors. This is the ufsd detecting the partition type. First it tries FAT and fails, then NTFS and fails… finally it mounts using HFS+ (Mac OSx format).

So, I’m not confused about recognizing/mounting… my only point is: if it is recognized it should be accessible.