USB Hard Drive not recognized by Sheevaplug

Ask questions about Arch Linux ARM. Please search before making a new topic.

USB Hard Drive not recognized by Sheevaplug

Postby MrBurns » Mon Jun 06, 2011 3:56 pm

Relatively new, but I've already spent about 12 hours trying to find the solution on my own to no avail, so I thought I'd try my first ever forum post.

I've recently installed Arch Linux ARM install on a Sheevaplug and it seems to be running well for the most part. Arch Linux ARM install is based on Arch, but has been modified to run on ARM architecture, which is used by the Sheevaplug. The plug boots from an SD card. Prior to installing Arch Linux ARM install, I had been running Ubuntu on the plug with a USB hard drive without issues for about a year and a half. On to the problem ...

So far, I have been unable to get Arch to recognize my USB hard drive. This is more than just a simple mounting issue; there is no /dev/sda* created after plugging in the USB hard drive. I have done a bit of testing to help try and pin down the problem. I don't think this is a problem with the drive because it was working fine until I changed the OS. Further, this isn't an issue with the Sheevaplug USB plug, as it recognizes the thumb drive I used to install the OS.

After searching various forums for some time and reviewing some of my log files, I have a couple of ideas as to what may be cause. First, I have found that there may be an issue with my USB modules. lsusb returns the following:
$this->bbcode_second_pass_quote('', 'd')vader ~ $ lsusb
unable to initialize libusb: -99

I have also noted that udev was throwing off a ton of log errors. My daemon.log, errors.log, and everything.log grew to the size of about 7GB in total simply by repeatedly spewing the following log error. (I have since turned off logging for these three files.)
$this->bbcode_second_pass_quote('', 'l')ocalhost udevd[563]: unable to receive ctrl connection: Function not implemented

At this point, I'm at a bit of a loss and am trying to avoid staying up until 1am tinkering with little success. Any help, advice, or leads on what may be causing this issue would be greatly appreciated!

Thanks.
MrBurns
 
Posts: 7
Joined: Mon Jun 06, 2011 3:51 pm

Re: USB Hard Drive not recognized by Sheevaplug

Postby kmihelich » Mon Jun 06, 2011 5:29 pm

Have you done a full system upgrade (pacman -Syuf) and reboot afterward?
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: USB Hard Drive not recognized by Sheevaplug

Postby MrBurns » Mon Jun 06, 2011 5:38 pm

I have done a full system upgrade and rebooted. No effect.
MrBurns
 
Posts: 7
Joined: Mon Jun 06, 2011 3:51 pm

Re: USB Hard Drive not recognized by Sheevaplug

Postby jd1 » Tue Jun 07, 2011 11:42 am

lsusb is working for me, but i have huge logs with $this->bbcode_second_pass_quote('', 'a')larm udevd[362]: unable to receive ctrl connection: Function not implemented

my system is at the moment on a 4gb usb-stick. i don't have space for huge log files.

has anyone an idea how i can stop this?
jd1
 
Posts: 2
Joined: Tue Jun 07, 2011 11:30 am
Top

Re: USB Hard Drive not recognized by Sheevaplug

Postby MrBurns » Tue Jun 07, 2011 1:02 pm

jd1 - you can (ideally) fix the offending errors, which will eliminate the log messages. If you just want to turn off or filter the log messages you can install Syslog-ng and edit /etc/syslog-ng/syslog-ng.conf. The .conf file allows you to either filter log messages or turn them off all together.

You may also choose to edit /etc/logrotate.conf and have it rotate your logs more frequently or archive/delete logs over a specified size. I updated my logrotate.conf file to rotate my logs daily and rotate any log larger than 20MB.

After editting your logrotate.conf, you'll need to run:
$this->bbcode_second_pass_quote('', 's')udo logrotate -f /etc/logrotate.conf


I hope this helps.

Now, if anyone has any idea how I can get my usb hard drive to register, I'm all ears :)
MrBurns
 
Posts: 7
Joined: Mon Jun 06, 2011 3:51 pm
Top

Re: USB Hard Drive not recognized by Sheevaplug

Postby slycat » Tue Jun 07, 2011 6:08 pm

$this->bbcode_second_pass_quote('jd1', 'l')susb is working for me, but i have huge logs with $this->bbcode_second_pass_quote('', 'a')larm udevd[362]: unable to receive ctrl connection: Function not implemented

my system is at the moment on a 4gb usb-stick. i don't have space for huge log files.

has anyone an idea how i can stop this?


To my knowledge this problem only occurs on the OXNAS boards, not the sheeva. But its real simple to overcome it:
Make sure to get udev-compat
$this->bbcode_second_pass_code('', '##If starting fresh or don't need to downgrade run
#pacman -Scc
#pacman -Syy
##This will free up space if you're 4gb is getting full
pacman -Sy udev-compat')
This fixes udevd from running high.

Run top, find the PID number for syslog-ng, and then kill it
$this->bbcode_second_pass_code('', 'kill "PID" #without quotes')
This stops all logging and allows you to edit the .conf.

NOW you can edit the syslog-ng.conf to your leisure, but be warned: should anything else be going wrong with daemons they won't be logged. I personally have thrown caution into the wind and edited my rc.conf file to disable syslog-ng all together. I only call syslog-ng when installing updates where problems may spring up.

ALSO: you can remove the huge log files (if you're positive you don't need them) and remake them before syslog-ng starts again
$this->bbcode_second_pass_code('', 'rm /var/log/daemon.log
touch /var/log/daemon.log
##And so on for every large log
##Though daemons & everything.log are the only ones to get heavy with udevd errors')

Hope that clears it up.
__________________________________________________________________________________________________

MrBurns,
Though this may seem like a silly question: when running fdisk -l, nothing shows up?
It may just be that the udev rules.d is automounting the harddrive somewhere else. I had to disable automounting to have my seagate USB HDD to work.

Can you check on another machine that the drive is working/not corrupted? Or maybe a different hdd? Just to rule some things out.
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL
Top

Re: USB Hard Drive not recognized by Sheevaplug

Postby MrBurns » Tue Jun 07, 2011 7:24 pm

Slycat,

Thanks for the response. To confirm, fdisk -l returns the following:
$this->bbcode_second_pass_quote('', 'D')isk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 16 7871 3928 83 Linux
/dev/mmcblk0p2 7872 15523839 7757984 83 Linux


I believe this is my SD card. However, my USD drive is also plugged in but does not show up in fdisk.

I am, admittedly, unfamiliar with udev rules, but I don't think I made any changes from the defaults. I'm including my 11-media-by-label-auto-mount.rules here.

$this->bbcode_second_pass_code('', 'KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
PROGRAM="/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="media_by_label_auto_mo$

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="hd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="noatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"
')

I also have a "11-sd-cards-auto-mount.rules" but I assume that this would not affect a USB hard drive.

Finally, I am very confident that the USB drive is working properly, but will double check when I get home tonight and edit this post with confirmation.
MrBurns
 
Posts: 7
Joined: Mon Jun 06, 2011 3:51 pm
Top

Re: USB Hard Drive not recognized by Sheevaplug

Postby slycat » Tue Jun 07, 2011 9:36 pm

The udev rule you posted allows udev to automount drives when they are connected (as per the rules you have, standard to the Arch Linux ARM, would mount in /media/). But you're fdisk yields no other drive besides the SD.

I reread that you had an issue with lsusb. I guess there may be some issue with how your sheeva handles the usb port. So i believe you when you say the drive works, but wouldn't hurt to check. If that isn't it, then try this page
https://bbs.archlinux.org/viewtopic.php?id=113163
They had a similar problem with error 99 from libusb. I couldn't recreate the error on my pro so if this doesn't help, I'm not sure what it may be.

Heaven forbid its nothing hardware.
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL

Re: USB Hard Drive not recognized by Sheevaplug

Postby kmihelich » Tue Jun 07, 2011 9:42 pm

It may be a power issue with the Sheeva. Thumb drives require a relatively low amount of power compared to a hard drive, which self-powered needs most of what USB is spec'd to provide. Components, including those in plugs, do tend to fail mysteriously. My guess is an externally-powered USB hard drive would get enumerated.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: USB Hard Drive not recognized by Sheevaplug

Postby MrBurns » Wed Jun 08, 2011 1:33 am

I think I may have good news. Slycat, after I saw your post, I nearly concluded I would need to switch to Debian, which is something I'd rather not have to do. I had seen that post in my research and it did not provide a solution for me. Further, Kmihelich, my USB hard drive is externally powered, so I didn't think it could be an issue of under-powering by the Sheevaplug.

So the good news? Well, I unplugged the hard drive from the Sheevaplug, so that I could bring it across the room to test it by plugging it into my desktop. As I suspected, it worked flawlessly and automounted in Ubuntu without issue. So, I went back to plug it into the Sheevaplug. I thought I'd do one last test before giving up entirely. I FIRST plugged the USB plug into the Sheevaplug and SECOND plugged the powercord for the hard drive into the socket. Holy smokes it worked! The Sheevaplug automounted the external hard drive and fdisk -l now shows:
$this->bbcode_second_pass_code('', 'Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 16 7871 3928 83 Linux
/dev/mmcblk0p2 7872 15523839 7757984 83 Linux

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x68366a93

Device Boot Start End Blocks Id System
/dev/sda1 63 976768064 488384001 83 Linux
')

I've tried rebooting and the drive continues to fail to be recognized.

My hypothesis is that the failure to recognize is due to a timing issue. Perhaps hard drive doesn't spin-up fast enough to be recognized by the Sheevaplug when the USB cord is plugged in, but plugging in the powercord second gives the hard drive a bit more time to spin up and be recognized by the Sheevaplug.

I would still like to fix this issue. Does anyone know how I can manipulate the timing of the Sheevaplug to give my hard drive more time to spin up? Alternatively, am I headed down the right path? Does my hypothesis hold water?

I have hope again!
MrBurns
 
Posts: 7
Joined: Mon Jun 06, 2011 3:51 pm

Next

Return to User Questions

Who is online

Users browsing this forum: No registered users and 15 guests