usb hot swap / recognizing a USB hard drive

516 views
Skip to first unread message

shredhead

unread,
Jul 13, 2014, 3:20:08 PM7/13/14
to
Is Alt-F supposed to recognize and automatically mount a usb drive when one is plugged in? much like Windows hot swap works?

my USB drive isn't recognized at all right now. after reboot no change. just upgraded to RC 0.4 although the behavior was the same prior to the upgrade. 

although hot swap would be the holy grail I would be happy to just have it recognize the drive after a reboot so I can copy files from it. 

I've tried ntfs before with the same results but this is an ext4 drive that used to be installed in the DNS-323. I did successfully read from it in the past when I upgraded the hard drives and was able to copy data from it. 

any ideas on what's wrong?


hot log: 
DATE=Sun Jul 13 15:31:20 EDT 2014
USER=root
OLDPWD=/
HOME=/
MDEV=sdc
TERM=vt102
SUBSYSTEM=sdc
PATH=/sbin:/usr/sbin:/bin:/usr/bin
SHELL=/bin/sh
PWD=/dev
No ACTION for sdc, 'mdev -s' is scanning /sys
smartctl 6.2 2013-07-26 r3841 [armv5tel-linux-3.10.32] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/sdc [USB JMicron] failed: No device connected
/usr/sbin/hot.sh: line 1: rcsmart: not found
fdisk: can't open '/dev/sdc'

shredhead

unread,
Jul 14, 2014, 9:25:51 AM7/14/14
to al...@googlegroups.com
ok I did sort of figure out what's going on here.

The usb drive relies on the USB port for power and the DNS probably doesn't have enough juice.

The drive that formerly was in the DNS-323 was a member of a RAID so the partition type was not really ext4, therefore the DNS can't mount it. I did pop it in there and attempt to start the RAID (degraded) but it didn't work. I noticed this because it did mount the other partition on the same disk. So I need to recopy everything to a freshly partitioned drive OR just copy everything over the network.

Hot swap does seem to work now that I've uninstalled nut (since that didn't work anyway). 

João Cardoso

unread,
Jul 16, 2014, 5:13:49 PM7/16/14
to al...@googlegroups.com


On Monday, July 14, 2014 2:25:51 PM UTC+1, shredhead wrote:
ok I did sort of figure out what's going on here.

The usb drive relies on the USB port for power and the DNS probably doesn't have enough juice.

Right.
3.5" drives need and external power supply, 2.5" drives should be OK.

ext2/3/4/vfat/ntfs will automount, ex-fat is not supported, search the forum for the reason.
 

The drive that formerly was in the DNS-323 was a member of a RAID

RAID1?
 
so the partition type was not really ext4, therefore the DNS can't mount it.

Not right.
RAID is a device, like a disk or disk partition; ext4 is a filesystem, built on top of a device.
Alt-F should recognize the RAID device first, assemble it in degraded mode if it is a RAID1 component, then recognize that the RAID has a filesystem and mount it. It doesn't matter if it is a USB or internal bay disk.
 
I did pop it in there and attempt to start the RAID (degraded) but it didn't work.

Using the RAID webUI? Only logs will tell us why it didn't.

I noticed this because it did mount the other partition on the same disk. So I need to recopy everything to a freshly partitioned drive OR just copy everything over the network.

Hot swap does seem to work now that I've uninstalled nut (since that didn't work anyway).

It didn't work until then? Can you please reinstall NUT and verify that usb hot-plugging ceases to work?
 
 

On Sunday, July 13, 2014 3:20:08 PM UTC-4, shredhead wrote:
Is Alt-F supposed to recognize and automatically mount a usb drive when one is plugged in? much like Windows hot swap works?

my USB drive isn't recognized at all right now. after reboot no change. just upgraded to RC 0.4 although the behavior was the same prior to the upgrade. 

although hot swap would be the holy grail I would be happy to just have it recognize the drive after a reboot so I can copy files from it. 

I've tried ntfs before with the same results but this is an ext4 drive that used to be installed in the DNS-323. I did successfully read from it in the past when I upgraded the hard drives and was able to copy data from it. 

any ideas on what's wrong?


hot log: 
DATE=Sun Jul 13 15:31:20 EDT 2014
USER=root
OLDPWD=/
HOME=/
MDEV=sdc
TERM=vt102
SUBSYSTEM=sdc
PATH=/sbin:/usr/sbin:/bin:/usr/bin
SHELL=/bin/sh
PWD=/dev
No ACTION for sdc, 'mdev -s' is scanning /sys
smartctl 6.2 2013-07-26 r3841 [armv5tel-linux-3.10.32] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/sdc [USB JMicron] failed: No device connected
/usr/sbin/hot.sh: line 1: rcsmart: not found

This is odd. Hmmm, OK, if the USB drive is so fast that hot-plugging happens before the rc scripts are setup. Added a FIXME in the code.
 

shredhead

unread,
Jul 18, 2014, 9:38:10 PM7/18/14
to al...@googlegroups.com
 

The drive that formerly was in the DNS-323 was a member of a RAID

RAID1?

YES, it was a mirror. 
 
so the partition type was not really ext4, therefore the DNS can't mount it.

Not right.
RAID is a device, like a disk or disk partition; ext4 is a filesystem, built on top of a device.
Alt-F should recognize the RAID device first, assemble it in degraded mode if it is a RAID1 component, then recognize that the RAID has a filesystem and mount it. It doesn't matter if it is a USB or internal bay disk.

all I know is it would not mount the partition where the data (originally part of the mirror) was. I was able to mount it to a Linux virtual machine on my Windows box running VMware Workstation, which is what I used to copy the data to it, but once it was connected to the DNS323, it could not recognize that partition and would not mount it. maybe something else was wrong. In the end, I started over. I wiped that drive out and made one ext4 partition for the entire drive, copied data over to it, and it's now hooked up to the DNS323 via usb which mounted it immediately / automatically (hot plug). It turned out I had 800GB of data and my old drives were 750GB so I had to put some data on a second drive.
 
 
I did pop it in there and attempt to start the RAID (degraded) but it didn't work.

Using the RAID webUI? Only logs will tell us why it didn't.

YES using the webUI. I didn't take the time to check logs. Honestly I was pressed for time. I wanted to finish all of this prior to leaving for a business trip so I could launch the cp command and leave for the airport. It didn't happen... :) 

I noticed this because it did mount the other partition on the same disk. So I need to recopy everything to a freshly partitioned drive OR just copy everything over the network.

Hot swap does seem to work now that I've uninstalled nut (since that didn't work anyway).

It didn't work until then? Can you please reinstall NUT and verify that usb hot-plugging ceases to work?

I started copying data before reading this but when I'm done copying from the first drive, I'll start nut and see if hot plug works with the second drive. I will post results. 


Reply all
Reply to author
Forward
0 new messages