Issue with 2 disks usb bay

167 views
Skip to first unread message

mike7

unread,
Apr 8, 2015, 10:49:08 AM4/8/15
to al...@googlegroups.com
João,
I'm very happy with Alt-F, usb disks are now in use for RAID.

I have issue with system reboot, usb disk is on ejected mode after reboot and I can't load it.
I'm using two disks usb box based on JMB352 from JMicron.
First disk is WDC WD10EVCS-63E0B0 and the second is ST3500630NS Q
WD disk is on ejected mode, Segate is working fine.
To workaround I need to power-off the system, start DNS-323 and then start usb box.
I attached 2 system logs, first with the issue (sdc disk not loaded) and second with my workaround.

Also I have 2 enhancement request:
1) JMicron is not supported by default by smartctl, could you please allow customization of smartctl options for ability to add -d option in web interface?
In my case I need to add -d usbjmicron,x,<port>

2) Could you please increase rsize for nfsd, in stock firmware I've got best results with allowed max 65536?
SystemLog.log
SystemLog(1).log

Curso Palma

unread,
Apr 8, 2015, 3:57:17 PM4/8/15
to al...@googlegroups.com
Tested with a similar box (on label it says wlxkj-876) - same JMB352U chip - with two Seagate barracuda 1.5gb hdd.

Connected directly the box to the 323, disks are seen correctly by Alt-F.
On reboot, none is seen.

Connected the box with a USB hub plugged on the 323, disk1 is seen correctly on the disk utility, disk2 is not seen on the disk utility however both are mounted correctly (weird?).
On reboot, disk 1 is seen correctly, disk2 is absent.

I have not modified the smartctl options.

Poweroff and again-On solves the problem as a workaround.

Curso Palma

unread,
Apr 8, 2015, 4:42:37 PM4/8/15
to al...@googlegroups.com
One note: i have modded the JMB352U box with a relay that switch ON the unit when the USB power is connected, so when the 323 does the reboot it does poweroff and on the USB box as well. Spindown and up again of the two disks can be a issue.


mike7

unread,
Apr 9, 2015, 2:27:00 AM4/9/15
to al...@googlegroups.com
Looks like busybox's hdparm doesn't support JMicron :(

João Cardoso

unread,
Apr 9, 2015, 8:26:54 PM4/9/15
to al...@googlegroups.com


On Wednesday, April 8, 2015 at 3:49:08 PM UTC+1, mike7 wrote:
João,
I'm very happy with Alt-F, usb disks are now in use for RAID.

I have issue with system reboot, usb disk is on ejected mode after reboot and I can't load it.
I'm using two disks usb box based on JMB352 from JMicron.
First disk is WDC WD10EVCS-63E0B0 and the second is ST3500630NS Q
WD disk is on ejected mode, Segate is working fine.
To workaround I need to power-off the system, start DNS-323 and then start usb box.

If it works that way for you, keep doing it. I can't do nothing regarding that. It can be related to the particular USB hub you use -- I tested two of them without issues, but it's out of my control.
You are using RAID5 with a USB disk *plus* a second USB disk through a USB hub? I think that is not very wise to do...

The Disk Wizard, e.g., refuses to work when two USB disks are detected -- the limited USB bandwidth will be shared between the two USB disks. Also swap is disabled by default on USB disks, for the same reason.

There is a well know issue regarding disk device naming when USB disks are involved. Some time the disk device names gets scrambled, the disk which uses to be called sda is now called sdc, etc.
This issue has already been discussed here and is related with which disk is "faster" to spin up at powe up or reboot -- the first disk to be discovered will be called sda, the second sdb, etc. The presence or absence of a USB disk can mangle the usual device name. And I can't do nothing regarding that (and I tried hard!)

The above is usualy not an issue for normal disks, just provide a LABEL for a filesystems and the disk will be mounted and available usong that label and not its device name.
For RAID5, it might be more complex -- device names ordering shouldn't matter as long as all disks are ready and available before actual data starts being read or written to the filesystem. If it not, a lengthy full rebuild can start. That's why I recommend to first power up the USB disk, then power up the box -- this way device names should be consistent across reboots. If done in the reverse order, it can even happens that the USB disk to try to power up as soon as USB power exists, and that can stress the limited power from the box USB.
But that doesn''t works for you -- is your USB hub self powered?


 
I attached 2 system logs, first with the issue (sdc disk not loaded) and second with my workaround.

The System Configuration log is better.
 

Also I have 2 enhancement request:

Please use the right place for that, read the appropriate top posted topic.

João Cardoso

unread,
Apr 9, 2015, 8:31:31 PM4/9/15
to al...@googlegroups.com


On Wednesday, April 8, 2015 at 8:57:17 PM UTC+1, Curso Palma wrote:
Tested with a similar box (on label it says wlxkj-876) - same JMB352U chip - with two Seagate barracuda 1.5gb hdd.

Connected directly the box to the 323, disks are seen correctly by Alt-F.
On reboot, none is seen.

Connected the box with a USB hub plugged on the 323, disk1 is seen correctly on the disk utility, disk2 is not seen on the disk utility however both are mounted correctly (weird?).

I think that all *detected* filesystems are correctly mounted, but not all attached USB disks can be handled/managed by the Alt-F webUI. I think to remember that I have abandoned to fully implement that feature, as it is too complex to do and most people will only have one USB disk.
 
On reboot, disk 1 is seen correctly, disk2 is absent.

I have not modified the smartctl options.

not related. Detected disks are described in the /etc/bay file.

Curso Palma

unread,
Apr 10, 2015, 2:58:23 AM4/10/15
to al...@googlegroups.com
Hi João,

from the description Mike7 isn't using any USB hub; the two external disks are docked in such a thing (that's what i have), or something similar based on the same JMicron chipset

http://ecx.images-amazon.com/images/I/31KbIYKRb7L.jpg

which use only 1 usb port for both.
I have tried yesterday to connect every drive to the 323 with a USB hub, but the JMicron docking has usb issue that make the whole system very unstable; exchanging the JMicron-based docking with two single-hdd usb ones, the system seems to be stable - it is up and running by nearly a day  while the other solution lasted for less than an hour.
The connected disks, all NTFS unless noted, so far are:
Internal bays: 1 3Tb hdd + 1 1.5Tb hdd
USB Hub: 8gb flash disk (ext4 with ALT-F stuff), 4 x 1.5Tb hdd each on a single usb-sata card.

notoneofmy

unread,
Apr 10, 2015, 5:35:38 PM4/10/15
to al...@googlegroups.com
On 15-04-10 2:26 AM, João Cardoso wrote:
> There is a well know issue regarding disk device naming when USB disks are
> involved. Some time the disk device names gets scrambled, the disk which
> uses to be called sda is now called sdc, etc.
> This issue has already been discussed here and is related with which disk
> is "faster" to spin up at powe up or reboot -- the first disk to be
> discovered will be called sda, the second sdb, etc. The presence or absence
> of a USB disk can mangle the usual device name. And I can't do nothing
> regarding that (and I tried hard!)
I've learned a lot from this comment. A lot. And I will say this issue
is NOT an Alt-F issue, and this is why I find this useful. It's a common
Linux issue. If you'd fixed it, João, well, you'd have been swooped up
by Ubuntu.

João Cardoso

unread,
Apr 11, 2015, 10:07:15 AM4/11/15
to al...@googlegroups.com, notoneo...@gmx.de
Well, as a matter of fact the issue is solvable by using udev's persistent rules.

The issue first plagued computers users with several network interfaces, where the wired interface would be called eth0 and the wireless interface called eth1 some times and other times the other way around, messing up the network setup of such users. For normal PC users this issue is not apparent for disks, as the BIOS takes a role at boot time.

But Alt-F don't use udev, it uses mdev, because it is simpler and not bloated as udev is (see this).
I was able to add persistent rules to mdev, and yet keep it simple, but only for the simplest cases: RAID, LVM and other situations were not trivial, so I give up.


mike7

unread,
Apr 11, 2015, 12:39:49 PM4/11/15
to al...@googlegroups.com, notoneo...@gmx.de
João,

different dev's names is not an issue for my setup. I should describe a bit, there are two 2TB WD disks in the DNS323.
First partition of each disk is in use for RAID1.
Additionally I have 0.5TB Segate and 1TB WD disk inserted to usb bay. (based on JMicron chipset, it's not a usb hub, it's a bridge. JMB352 can simulate RAID 0,1, JBOD or present 2 separate disks).
So I created 2 additional RAID5 with usb disks, each RAID is using only one usb disk. I hope it should solve performance issue.
As result I have 3 RAIDs, one RAID0 and two RAID5.

My issue - WD disk is not in "loaded" state, /dev/sdc1 is not exist on reboot. To make it operate, I should stop raid with other usb disk and switch off/on the usb box.
I attached System Configuration after reboot, issue with sdc.

Additionally in Syslog I found, only segate disk can be standby, WD can't. Looks like it's a complex issue with WD disk and JMicron bridge.

I played a bit more with hdparm and smartctl, busybox's hdparm doesn't support JMicron and smartctl should use -d switch.

PS. I'll create feature requests soon
SystemConf-reboot.log

João Cardoso

unread,
Apr 17, 2015, 11:07:15 AM4/17/15
to al...@googlegroups.com, notoneo...@gmx.de


On Saturday, April 11, 2015 at 5:39:49 PM UTC+1, mike7 wrote:
João,

different dev's names is not an issue for my setup. I should describe a bit, there are two 2TB WD disks in the DNS323.
First partition of each disk is in use for RAID1.
Additionally I have 0.5TB Segate and 1TB WD disk inserted to usb bay. (based on JMicron chipset, it's not a usb hub, it's a bridge. JMB352 can simulate RAID 0,1, JBOD or present 2 separate disks).
So I created 2 additional RAID5 with usb disks, each RAID is using only one usb disk. I hope it should solve performance issue.
As result I have 3 RAIDs, one RAID0 and two RAID5.

My issue - WD disk is not in "loaded" state, /dev/sdc1 is not exist on reboot. To make it operate, I should stop raid with other usb disk and switch off/on the usb box.
I attached System Configuration after reboot, issue with sdc.

And what happens if you boot the box with the USB box powered of, and power on the USB some ten or twenty seconds latter?

I can only imagine that the issue is due to the usb bridge you are using. Is it configured to present two disks, and not a JBOD or other setup? Probably you have to use a MS-Win programs to set it up that way.

On the kernel log at boot you can see:

Apr 11 18:37:58 dl007 user.warn kernel: not responding...
Apr 11 18:37:58 dl007 user.notice kernel: sd 2:0:0:0: [sdc] READ CAPACITY failed

but latter on it seems to recover, and all your four disks and partition tables show OK (on the DISKs MBR section on the System Configuration log). But that's too late, as the RAID has already been assembled.

The RAID section shows no trace of the sdc disk, and the RAID5 build from sdba/b4 is not assembled, as its a RAID5 and it needs its third component to be safely assembled and started.

Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] 
md2 : inactive sdb4[1](S) sda4[0](S)
      1953515352 blocks super 1.0
       
md1 : active raid5 sdd1[3] sdb3[1] sda3[0]
      976756736 blocks super 1.0 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 2/4 pages [8KB], 65536KB chunk

md0 : active raid1 sdb2[1] sda2[0]
      487884628 blocks super 1.0 [2/2] [UU]
      bitmap: 0/4 pages [0KB], 65536KB chunk

Also, the BLOCKID section shows no trace of sdc.



Additionally in Syslog I found, only segate disk can be standby, WD can't. Looks like it's a complex issue with WD disk and JMicron bridge.

That's probably a different issue.
From syslog you can see that 'sysctrl' doesn't know anything named 'sdc':

Apr 11 18:37:58 dl007 daemon.info sysctrl: sdb left rdwr=0 last=0 spindow=1200 power=1
Apr 11 18:37:58 dl007 daemon.info sysctrl: sda right rdwr=0 last=0 spindow=1200 power=1
Apr 11 18:37:58 dl007 daemon.info sysctrl: sdd usb rdwr=0 last=0 spindow=1200 power=1

sysctrl monitors USB disks (only) for R/W activity, and if they are active after the programmed spindown time it tries to spindown the disk using two different methods. Looks like USB adapters are all different, some of them pass through the normal ATA (hdparam) command, some use SCSI commands, and some just ignore all them and use its own powerdown scheme/timeout.

But anyhow sysctrl is only able to "control" one USB disk this way. That's a know issue that I don't intend to fix, as having more than one disk (on a file server box) sharing a USB link is too restrictive. Even RAID5 performance was a surprise to me (search for a post regarding disk layout performance on 0.1B2). Looks like RAID5 effectiveness overcomes the USB throughput issue.
Reply all
Reply to author
Forward
0 new messages