LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-05-2008, 08:07 AM   #1
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Rep: Reputation: 16
Unhappy Hot plug for onboard SATA? How to enable?


Hi all,

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.

TIA,

LaughingBoy.
 
Old 07-05-2008, 08:43 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Does your system recognize USB devices that are plugged in after Linux is running?

Last edited by stress_junkie; 07-05-2008 at 08:49 AM.
 
Old 07-05-2008, 09:25 AM   #3
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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.
 
Old 07-06-2008, 06:25 PM   #4
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
Arrow

Quote:
Originally Posted by stress_junkie View Post
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.
 
Old 07-06-2008, 07:53 PM   #5
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
Arrow

Quote:
Originally Posted by forum1793 View Post
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 View Post
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 View Post
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.
 
Old 07-06-2008, 11:52 PM   #6
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
Quote:
USB devices don't automount
Does that agree with your earlier post?

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.

Last edited by forum1793; 07-07-2008 at 10:47 AM.
 
Old 07-08-2008, 12:30 AM   #7
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
Arrow Nice ... but...

Quote:
Originally Posted by forum1793 View Post
Does that agree with your earlier post?
Nope.

Quote:
Originally Posted by forum1793 View Post
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:
Code:
$ /sbin/lsmod | grep ata
sata_sil               11721  1 
pata_acpi               8641  0 
ata_generic             9285  0 
ata_piix               20549  6 
libata                126545  4 sata_sil,pata_acpi,ata_generic,ata_piix
scsi_mod              121837  5 sr_mod,sg,usb_storage,libata,sd_mod
The other machine (Fedora 7) has these ata-based modules loaded:
Code:
$ /sbin/lsmod | grep ata
pata_amd               20165  0 
sata_nv                25157  12 
ata_generic            14405  0 
libata                114417  3 pata_amd,sata_nv,ata_generic
scsi_mod              145657  5 sr_mod,sg,usb_storage,libata,sd_mod
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).

Any idea how to turn this ability on?
 
Old 07-09-2008, 06:01 AM   #8
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
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.

Code:
bash-3.1$ lsmod | grep ata
bash-3.1$ lsmod | grep scsi
bash-3.1$ lsmod | grep sg
sg                     29876  0
bash-3.1$ dmesg | grep scsi
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
scsi 0:0:0:0: Direct-Access     ATA      ST3250410AS...
scsi4 : pata_atiixp
scsi5 : pata_atiixp
scsi 5:0:0:0: CD-ROM            LITE-ON  DVDRW LH-20A1L...
sr0: scsi3-mmc drive: 47x/94x writer dvd-ram cd/rw xa/form2 cdda tray
sr 5:0:0:0: Attached scsi CD-ROM sr0
sd 0:0:0:0: Attached scsi generic sg0 type 0
sr 5:0:0:0: Attached scsi generic sg1 type 5
Hope this is of some help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SATA Hot Plug and Abit IP35 Pro mobo? asincero Linux - Hardware 0 03-04-2008 09:49 PM
mvSATA does not support Hot Plug on 2.6.19 PhillipHuang Linux - Hardware 0 01-16-2007 03:43 AM
Hot plug sata causes error in 2.6.18 (FC6) ocgltd Linux - Hardware 3 11-16-2006 04:53 PM
How to turn off hot plug?? msulik1 Linux - Laptop and Netbook 1 02-07-2006 01:42 PM
USB Hot Plug Problems... reply2vinay Linux - Hardware 1 07-22-2005 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:54 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
Open Source Consulting | Domain Registration