LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > Linux Exploits
User Name
Password

Notices

Conquests of a Linux convert. What I learn, and problems I have solved along the way.
Linux Exploits is the place where I chronicle anything Linux related that I stumble upon that I think might be useful to someone else.
Rate this Entry

Linux Learning and Coolness to be admired with USB3 and eSATA

Posted 10-22-2012 at 01:41 PM by Jaysonfw
Updated 10-22-2012 at 05:55 PM by Jaysonfw

One of the aspects about Linux that I love and sometimes hate, is the ever present opportunity to learn something new. Recently, Linux has seemed to me like a much admired friend, that routinely surprises you with some cool and new thing to be admired I've worked exclusively with Linux as my PC of choice for about 5 years, and am currently running Slackware-14 64 bit. I can honestly say, that from the very beginning, not a month has passed where I haven't learned at least one new facet of Linux. Usually I'm learning something new because something has just broken (more accurately, I've just broken something), or I want to tweak something to fit my own quirkiness. In the beginning of my Linux journey, the types of things I was learning were fairly general, and common knowledge to many. But as I become more experienced, the questions I have, and the knowledge I need to accomplish some esoteric goal has required an increasing level of time and focus to arrive at a solution. In the beginning, practically every answer was a matter of info <issue>, and read. At worst, every answer was a google <issue> away. But now searching for answers takes a lot more effort.

Take my most recent learning experience for instance. I have a very nice laptop that I purchased from System76 (the gazelle). It has two 3.0 USB slots and one 2.0 USB slot. While using the 3.2.28 kernel, the 3.0 USB ports worked fine., But when I switched to the 3.5.4 kernel my USB 3.0 ports all complained when plugging in a 3.0 device, and my USB3 device was not detected. The same device was detected just fine on a USB2 port. What I learned through the process of trying to make my USB3 ports work with my 3.5.4 kernel was the source of some surprise as well as some frustration. Here's what I learned. Firstly, I'm honored to say that Linux supposedly touted USB3 support before any other OS. I also learned that the driver that provides USB3 support is xhci_hcd, and was developed by Sarah Sharp. Now that tidbit may not impress most people, but it wasn't until I started this quest that it really hit me. Much of Linux is developed by individuals. Not major corporations with endorsement deals and other backing. For Sara Sharp to have a working USB3 driver before anyone else, to me is at the pinnacle of awesome! Almost unbelievably cool. Now if I have my facts twisted, feel free to correct me. Otherwise I am very impressed. The frustrating bit is that xhci_hcd has some unresolved issues, which are causing the problems with my system detecting my USB3 device when connected to my USB3 port. Furthermore, there is no alternative driver for USB3 that I'm aware of. After countless hours of reading blog entry after blog entry, and forum post after forum post, I came to the realization that as cool as being first out the gate with USB3 support, the driver was not totally ready for prime time. At least not with the kernel I was using. No single IRC chat, man page hunt or google search yielded that conclusion. It was obtained after countless hours of drudgery, and in the end, I learned a ton. But getting to the end (and I'm not totally sure I'm there) took so much longer than answers use to take to find.

The revelation that my USB3 drive would not be experiencing USB3 speeds with my current configuration set my O.C.D into overdrive, and lead me to some more Linux coolness to be admired. Being a bit obsessive over tweaking my Linux machine, I decided to remove the SATA drive from the USB3 enclosure it was in, and purchase a new eSATA enclosure for it. My thinking was that if I couldn't experience USB3 speed on this drive, I would go for eSATA speeds instead. I found a very nice enclosure by Roswell on Newegg for $25.00. It came with a fan cooled enclosure, USB2 and eSATA ports, and associated cables. I swapped out the enclosures, plugged the eSATA cable into my laptop, and presto! My drive was screaming along at speeds greater than USB3. The only problem was how long it took for this drive to spin up once it had been idle for a while. It was taking over 60 seconds for the drive to respond to an ls command. I use this drive for backups, and the backup script actually burps up a few IO errors before the drive is up to speed, and ready to write. The only way I could think to resolve the issue was to somehow tell the drive to spin up prior to doing any heavy writing to it. After several days of searching an IRC chat actually provided a clue this time. sdparm was the solution. sdparm allows you to send commands to a SCSI device, and allowed me to do sdparm --command=start at the beginning of my script, or anytime I know I'm going to be using that drive. It seems that sdparm was split out of a larger group of tools called sg_utilities. They provide access to features of your device that I never know existed.

Another month, and another thing to admire about Linux. May not be much to some, but it's very reassuring to me that my machine is completely at my disposal.
Posted in Learning Linux
Views 452 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 09:46 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration