Find the answer to your Linux question:
Results 1 to 10 of 10
I have a system built out of four SATA drives -- two main drives, and two backups. One of the backup drives is permanently mounted, and I backup my system ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414

    How hot-pluggable are SATA drives?


    I have a system built out of four SATA drives -- two main drives, and two backups. One of the backup drives is permanently mounted, and I backup my system to it every night. The other backup drive is on a neat little removable 5.25inch caddy, that allows me to copy the backup to it, switch it off and slide it out, in order to take it into work to protect me against the possibility of my house burning down. My computer will be destroyed, but my family photos will still exist!!

    My question is about hot-plugging this drive. I am able to mount it and write to it if I boot the computer with the drive connected. I then unmount it and physically remove it. However, if I re-insert it I am not able to mount it again. I just get a complaint that "special drive /dev/sdd1 doesn't exist". To get the system to recognise that the drive is there I have to reboot.

    Can anyone tell me if SATA drives are hotpluggable in linux, and, if so, how? Do I need a kernel upgrade??
    Code:
    smolloy@linux:~> uname -a
    Linux linux 2.6.16.21-0.25-smp #1 SMP Tue Sep 19 07:26:15 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Does anyone know anything about doing this? I.e. how to have my system recognise there is a new device present when I hot-plug the SATA drive, and allow me to mount it without rebooting?
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Linux User
    Join Date
    Aug 2005
    Posts
    408
    I certainly don't know how to do it, but I was curious, and I found this site:
    http://linux-ata.org/software-status.html#hotplug


    It had the following note:

    Hotplug support
    libata supports both controller hotplug ("yank the card") and device hotplug ("yank the drive").

    Most SATA controllers are hotplug-capable, if your system bus (PCI, etc.) is also hotplug-capable. All SATA devices are hotplug-capable.

    The following SATA controllers will never support hotplug: Intel ICH5-8 (non-AHCI), Pacific Digital Talon (ADMA), Promise SATA SX4.

    These controllers do not export enough information about the SATA phy to make it possible to support hotplug. In some cases, such as Intel ICH5-8 (non-AHCI), it is possible to support "coldplug" operation: the user informs the OS driver he wishes to disconnect his SATA device, rather than simply disconnecting it.

  4. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Thanks for that eraker. Looks like SATA hotplug support will be in the 2.6.19 version of the kernel, so I'll just have to be patient

    Thanks for finding that for me.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  5. #5
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Looks like 2.6.19 has been released!

    I might try it out and see how well the hotplugging is handled.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  6. #6
    Just Joined!
    Join Date
    Nov 2006
    Posts
    3
    I had the same problem like you just last week. I have a marvell Sata Controller, chipset 88SX6081. My Linux distro is Centos 4.4.

    It turns out that the Sata driver that comes with Centos 4.4 does not work 100% with my card. Thus although the hotplug event was fired, the driver does not export enough information in order for the kernel to do the work.

    When i get the driver from Marvell and recompile it, everything magically works out. Driver is a big piece in the hotplug chain so you may want to take a look.

  7. #7
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Thanks for the tip apoc123.

    I found this page that told me that I needed libata's sata_sil24 driver. Then I checked to see if it was loaded, and it looks like it is,
    Code:
    smolloy@linux:~> lsmod | grep -i sata_sil24
    sata_sil24             28676  0 
    libata                 90904  2 sata_sil24,sata_nv
    scsi_mod              163760  6 st,sr_mod,sata_sil24,sg,libata,sd_mod
    When I find the time, I'll try compiling a 2.6.19 kernel to see if it works.

    I'll let you know how successful I am.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  8. #8
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    I didn't realise this thread was going on. I have two Western Digital 320GB drives, and I have yanked both of them for various reasons, and reattached without problems. I use the sil driver too, but I'm not sure if it's the sil24.

  9. #9
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Quote Originally Posted by bigtomrodney
    I didn't realise this thread was going on. I have two Western Digital 320GB drives, and I have yanked both of them for various reasons, and reattached without problems. I use the sil driver too, but I'm not sure if it's the sil24.
    What kernel are you using?

    There might be something else going on with my system that is preventing it from hotplugging. Would hotplug events be registered in the dmesg output?
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  10. #10
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    They should be visible as events through dmesg. When I was doing this I would have been using SUSE 10.0 and Mandriva 2005 LE.

    I'm using SUSE 10.2 now, and haven't done it recently.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •