Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently tried to plug a removable SATA drive caddy into my Fedora 8 system and found that when I removed the drive, the device point (/dev/sdb) disappeared, but didn't re-appear when I plugged in a new drive.
I think that particular onboard SATA chip doesn't support hot plug from memory (not at the PC to give specs, but will update on Monday when I am). Again from memory, it was using the PIIX driver.
Soo.... I searched for a chipset that did support hot plug / hot swap and found that the Silicon Image 3112 / 3114 chipset should (IIRC). So, I went and bought an SI3112 PCI card and booted up with two removable drives plugged in. Both detected (/dev/sdb and /dev/sdc) but removing one drive and plugging in a new one, it's no longer detected.
Does anyone know how I get hot plug / hot swap for a SATA chip to be supported? Kernel parameter? modprobe.conf option?
I even tried on my MSI K9N SLI Platinum (NVidia 570 SATA controller), but it doesn't recognise new devices once the system is running. Rebooting and the drives are there, but not while it's running.
A Gigabyte GA-N650SLI-DS4L even comes with an eSATA cable to encourage hot swap of SATA devices, but that didn't work under Linux.
Would gladly try out any pointers to get hot swap of SATA drives working under Linux.
Both my current 780G mboard and a previous Asus with NForce4 do hotswapping of SATA disks. In KDE, just like with the USB thumbdrives, I think I have to right-click and choose to unmount and/or safely remove (just like in windows). Before automounting worked I had to unmount drive before powering down drives. You've probably already tried that.
I think for this to work the sata ports cannot be set to ide-mode in bios.
I have never gotten IDE drives to work with hotswapping and I don't try anymore.
Does your system recognize USB devices that are plugged in after Linux is running?
Yes. The automounting daemon does it's job there.
BUT... it doesn't appear to work for SATA drives. I can't even list the new SATA device's partition table (fdisk -l), and nothing is reported in /var/log/messages during subsequent plug in attempts.
Both my current 780G mboard and a previous Asus with NForce4 do hotswapping of SATA disks. In KDE, just like with the USB thumbdrives, I think I have to right-click and choose to unmount and/or safely remove (just like in windows). Before automounting worked I had to unmount drive before powering down drives. You've probably already tried that.
I'm trying this on various headless servers, and a workstation with local default (Gnome) login. I hope not to have to run the systems in runlevel 5 to get hot-swap of SATA devices to work!
USB devices don't automount, but can at least be mounted manually if desired. These SATA drives don't even get a mention in /var/log/messages, or show up in a list-partitions-on-all-drives query.
Quote:
Originally Posted by forum1793
I think for this to work the sata ports cannot be set to ide-mode in bios.
I don't recall seeing that option in any of the BIOSs, but I'll try to have a gander to confirm this.
Quote:
Originally Posted by forum1793
I have never gotten IDE drives to work with hotswapping and I don't try anymore.
IDE doesn't support hot-swap in it's spec, IIRC. This was one of the main advantages to go to SATA - incorporating some SCSI technologies into the (P)ATA spec.
To try the sata hotswap, I inserted a seagate sata 250 gb hd on a removable tray, and powered it up on a running system.
dmesg shows it loading as /dev/sdb with the proper partitions
In x, in system:/media, I right click on each partition of /dev/sdb and unmount (safely remove does not show up as option). Then turn power off of hd tray. Wait a few minutes and turn hd tray power back on. The drive again shows up as /dev/sdb and each partition again shows up and is accessible.
Maybe difference between our systems is hardware. I'm using gigabyte 780g motherboard, forget model but its the microatx 2sh model. I have custom kernel with ide, sata, pata in kernel but with scsi as module. Sata dvd shows up as /dev/sr0.
I don't understand that. If I load HUGE kernel (everything compiled in) sata dvd shows up as /dev/hdc. I'm living with it being sr0 but this difference, or perhaps hardware/bios/kernel, may explain why my non-boot sata drives are hotswappable. In this bios I am able to set sata ports to ide, ahci, or raid. It even lets me set one or two of the ports differently so dvd is supposedly in ide mode (still doesn't work with freebsd though). I'm using 2.6.25.7 kernel but this worked even with whatever came with slackware 12 (2.6.24.17?). I wouldn't swear to it but I think, except for automounting, this sata-hotswapping even worked with the 2.4 kernels which I am using on an nvidia nforce 4 motherboard.
To try the sata hotswap, I inserted a seagate sata 250 gb hd on a removable tray, and powered it up on a running system.
dmesg shows it loading as /dev/sdb with the proper partitions
In x, in system:/media, I right click on each partition of /dev/sdb and unmount (safely remove does not show up as option). Then turn power off of hd tray. Wait a few minutes and turn hd tray power back on. The drive again shows up as /dev/sdb and each partition again shows up and is accessible.
Maybe difference between our systems is hardware. I'm using gigabyte 780g motherboard, forget model but its the microatx 2sh model. I have custom kernel with ide, sata, pata in kernel but with scsi as module. Sata dvd shows up as /dev/sr0.
I don't understand that. If I load HUGE kernel (everything compiled in) sata dvd shows up as /dev/hdc. I'm living with it being sr0 but this difference, or perhaps hardware/bios/kernel, may explain why my non-boot sata drives are hotswappable. In this bios I am able to set sata ports to ide, ahci, or raid. It even lets me set one or two of the ports differently so dvd is supposedly in ide mode (still doesn't work with freebsd though). I'm using 2.6.25.7 kernel but this worked even with whatever came with slackware 12 (2.6.24.17?). I wouldn't swear to it but I think, except for automounting, this sata-hotswapping even worked with the 2.4 kernels which I am using on an nvidia nforce 4 motherboard.
IDE drives... Yes I got a bit off topic.
Good luck.
I've tried these kernels:
2.6.23.17-88.fc7
2.6.25.6-27.fc8
One machine (Fedora 8) has these ata-based modules loaded:
I was able to find a script to "rescan the scsi bus" and under Fedora 7 (NVidia SATA controller) it worked to find the drive that was plugged in. No such luck under the Fedora 8 system (attached to the Silicon Image SATA card).
I don't have any ata in lsmod or any *ata* in /lib/modules so I must have that compiled in kernel. I think the only scsi related module that loaded was sg. This seems odd as I'm pretty sure I compiled kernel with generic scsi driver as module. I'll have to go back and look.
Regardless, my system which is able to hotswap sata hd has ahci running with scsi. Maybe you need this. It loads the pata_atiixp as I have the 780g chipset.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.