Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

How to DETECT NEW HARD DISKS without rebooting?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
27 posts
  • 1
  • 2
  • Next
Author
Message
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

How to DETECT NEW HARD DISKS without rebooting?

  • Quote

Post by l8bit » Tue Apr 10, 2007 4:34 pm

Hi guys,

does anyone know how to force the system to scan for new hard disks? I have my case open and sometimes I add (internal) sata disks on the fly.
On windows I go to device manager and ask for the system to scan for any new devices and my hard disk is recognised without having to reboot.

Is it possible to do the same with gentoo? 8O

I tried sudo fdisk -l but it didn't show the newly added disk.. and the only way to detect the disk is to reboot.

Any help is greatly appreciated. :)

PS: I have hald and udev installed and started. Also my system is compiled with the hal flag.
PS: just to emphasize I'm not talking about external USB disks. I'm talking about internal (either SCSI or SATA) disks.
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Tue Apr 10, 2007 5:21 pm

Hmmm. So you want to hotplug a sata drive... I think a quick search might help. Looks to me like it will depend on your SATA controller.
Top
sonicbhoc
Veteran
Veteran
User avatar
Posts: 1805
Joined: Mon Oct 24, 2005 7:52 pm
Location: In front of the computer screen
Contact:
Contact sonicbhoc
Website

  • Quote

Post by sonicbhoc » Tue Apr 10, 2007 6:11 pm

I have NO clue. Try restarting hotplug and udev?
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Top
kernelOfTruth
Watchman
Watchman
User avatar
Posts: 6111
Joined: Tue Dec 20, 2005 10:34 pm
Location: Vienna, Austria; Germany; hello world :)
Contact:
Contact kernelOfTruth
Website

  • Quote

Post by kernelOfTruth » Tue Apr 10, 2007 8:16 pm

sonicbhoc wrote:I have NO clue. Try restarting hotplug and udev?
perhaps in addition to that restarting dbus & hald, that should help

http://lkml.org/lkml/2006/6/25/14
http://linux-ata.org/software-status.html
https://github.com/kernelOfTruth/ZFS-fo ... scCD-4.9.0
https://github.com/kernelOfTruth/pulsea ... zer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Top
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

  • Quote

Post by l8bit » Tue Apr 10, 2007 9:28 pm

sonicbhoc wrote:I have NO clue. Try restarting hotplug and udev?
I'll try that and report the results
Top
martin20450
Tux's lil' helper
Tux's lil' helper
Posts: 91
Joined: Fri Sep 30, 2005 7:18 pm

  • Quote

Post by martin20450 » Tue Apr 10, 2007 9:36 pm

Also check the output of dmesg when you plug it in, you might also need to cd /dev and MAKEDEV sd{b,c,d,e,whatever shows in dmesg}
Top
Bullet Dodger
Apprentice
Apprentice
Posts: 230
Joined: Sat Jul 16, 2005 12:56 pm

  • Quote

Post by Bullet Dodger » Wed Apr 11, 2007 1:29 am

I'd be interested in the answer to this?
I heard linux was big on hot pluggable devices, but when i set up a raid array and unplud 1 hd and tried to reconnect it and add it to the array again i couldn't.
I posted here and was told it depends on your hardware controlers, if the HD gets re-detected.
I don't know anything about my HD controler, so i just left it at that.
Thats more into the motherboard than i know, but now i'm interested to know.
Can any1 point me in the direction of some info on HD controles and what is/isn't hotplugable.

Cheers
Top
kernelOfTruth
Watchman
Watchman
User avatar
Posts: 6111
Joined: Tue Dec 20, 2005 10:34 pm
Location: Vienna, Austria; Germany; hello world :)
Contact:
Contact kernelOfTruth
Website

  • Quote

Post by kernelOfTruth » Wed Apr 11, 2007 9:35 am

Bullet Dodger wrote:I'd be interested in the answer to this?
I heard linux was big on hot pluggable devices, but when i set up a raid array and unplud 1 hd and tried to reconnect it and add it to the array again i couldn't.
I posted here and was told it depends on your hardware controlers, if the HD gets re-detected.
I don't know anything about my HD controler, so i just left it at that.
Thats more into the motherboard than i know, but now i'm interested to know.
Can any1 point me in the direction of some info on HD controles and what is/isn't hotplugable.

Cheers
see the links I posted + search for additional on google for newer kernel-patches above 2.6.17

http://linuxmafia.com/faq/Hardware/sata.html

http://linux-ata.org/driver-status.html
This status report applies to the latest SATA driver release, found in kernels >= 2.6.18-git5 (i.e. what will be 2.6.19).
https://github.com/kernelOfTruth/ZFS-fo ... scCD-4.9.0
https://github.com/kernelOfTruth/pulsea ... zer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Top
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

  • Quote

Post by l8bit » Wed Apr 11, 2007 10:37 am

Ok I tried plugging in a SATA hard disk on the fly with my case open and then restarted hald and hotplug services but nothing happened.

Also dmesg |tail showed nothing at all.

cat /var/log/messages | tail showed nothing new either.

I'm not sure why new internal disks are not identified on the fly. Is there a command to force rescanning of the disks?
As I mentioned earlied, in windows this can be done via the device manager. I'm not sure it's a hotplugging issue as an internal sata disk is not a device with hot plug support. However it's the fact that the controller was forced to rescan for new hard disks that made Windows see the new disk. Surely there must be an equivalent linux command ?

EDIT: http://linux-ata.org/driver-status.html#nvidia says that sata_nv (my controller) has full SATA control including hotplug and PM so the disk should be recognized then?
Top
Chris W
l33t
l33t
User avatar
Posts: 972
Joined: Tue Jun 25, 2002 11:38 am
Location: Brisbane, Australia

  • Quote

Post by Chris W » Wed Apr 11, 2007 9:56 pm

You could try the udevstart command.
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Thu Apr 12, 2007 1:00 pm

i believe you need to rescan the bus. "man hdparm"

cheers
Neddyseagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
banned from #gentoo since sept 2017
Top
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

  • Quote

Post by l8bit » Thu Apr 12, 2007 1:14 pm

bunder wrote:i believe you need to rescan the bus. "man hdparm"

cheers
I checked the man (8) pages and I couldn't find a parameter for hdparm to rescan the bus?

Perhaps I'm wrong?
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Thu Apr 12, 2007 3:08 pm

i believe the options are -U and -R... but the man page says they are dangerous. ps: hotswapping can blow up your bus.

cheers
Neddyseagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
banned from #gentoo since sept 2017
Top
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

  • Quote

Post by l8bit » Thu Apr 12, 2007 3:16 pm

bunder wrote:i believe the options are -U and -R... but the man page says they are dangerous. ps: hotswapping can blow up your bus.

cheers
Well I've read that already but since it's dangerous and may even damage (let alone hang) the system, it's not really a solution and I'm not willing to try it :)
Top
kernelOfTruth
Watchman
Watchman
User avatar
Posts: 6111
Joined: Tue Dec 20, 2005 10:34 pm
Location: Vienna, Austria; Germany; hello world :)
Contact:
Contact kernelOfTruth
Website

  • Quote

Post by kernelOfTruth » Thu Apr 12, 2007 7:32 pm

l8bit wrote:
bunder wrote:i believe the options are -U and -R... but the man page says they are dangerous. ps: hotswapping can blow up your bus.

cheers
Well I've read that already but since it's dangerous and may even damage (let alone hang) the system, it's not really a solution and I'm not willing to try it :)
how about sdparm? since you're using an ata-drive a ata-utility should do it ...

there has just been announced a new version:

http://lkml.org/lkml/2007/4/9/426
https://github.com/kernelOfTruth/ZFS-fo ... scCD-4.9.0
https://github.com/kernelOfTruth/pulsea ... zer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Thu Apr 12, 2007 8:24 pm

kernelOfTruth wrote:
l8bit wrote:
bunder wrote:i believe the options are -U and -R... but the man page says they are dangerous. ps: hotswapping can blow up your bus.

cheers
Well I've read that already but since it's dangerous and may even damage (let alone hang) the system, it's not really a solution and I'm not willing to try it :)
how about sdparm? since you're using an ata-drive a ata-utility should do it ...

there has just been announced a new version:

http://lkml.org/lkml/2007/4/9/426
interesting... i never knew they made a scsi equivalent to hdparm. :lol:
Neddyseagoon wrote:The problem with leaving is that you can only do it once and it reduces your influence.
banned from #gentoo since sept 2017
Top
halfgaar
l33t
l33t
User avatar
Posts: 781
Joined: Sun Feb 22, 2004 1:50 pm
Location: Netherlands
Contact:
Contact halfgaar
Website

  • Quote

Post by halfgaar » Thu Apr 12, 2007 9:12 pm

bunder wrote:i believe the options are -U and -R... but the man page says they are dangerous. ps: hotswapping can blow up your bus.

cheers
SATA should support hotswapping, right? IDE hotswapping is indeed a bad idea.

BTW, I heard that the 3.3V wire must be present on the power connector for hotplugging to work. Converters which you connect to ordinary molex connectors don't have that 3.3V wire, only dedicated SATA plugs do.
Linux backups the right way.
Get surround sound working.
Top
beatryder
Veteran
Veteran
User avatar
Posts: 1138
Joined: Fri Apr 08, 2005 12:27 am
Contact:
Contact beatryder
Website

  • Quote

Post by beatryder » Fri Apr 13, 2007 5:23 am

make sure you have AHCI turned on in your kernel, and it *should* work
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Top
l8bit
n00b
n00b
Posts: 35
Joined: Sun Feb 12, 2006 9:06 pm

  • Quote

Post by l8bit » Thu Apr 26, 2007 7:59 pm

beatryder wrote:make sure you have AHCI turned on in your kernel, and it *should* work

Code: Select all

% cat /usr/src/linux/.config |grep AHCI
CONFIG_SATA_AHCI=y
as you can see AHCI is enabled and my nvidia sata driver is built in the kernel and says that it supports hot swapping. However, nothing happens when I connect an internal sata drive :( The only way is to reboot for it to be seen.
Any other suggestions?
Surely linux that is so much superior to windows (especially when it comes to uptime since windows needs to reboot all the time) must be able to do this!
Top
beatryder
Veteran
Veteran
User avatar
Posts: 1138
Joined: Fri Apr 08, 2005 12:27 am
Contact:
Contact beatryder
Website

  • Quote

Post by beatryder » Thu Apr 26, 2007 8:22 pm

l8bit wrote:
beatryder wrote:make sure you have AHCI turned on in your kernel, and it *should* work

Code: Select all

% cat /usr/src/linux/.config |grep AHCI
CONFIG_SATA_AHCI=y
as you can see AHCI is enabled and my nvidia sata driver is built in the kernel and says that it supports hot swapping. However, nothing happens when I connect an internal sata drive :( The only way is to reboot for it to be seen.
Any other suggestions?
Surely linux that is so much superior to windows (especially when it comes to uptime since windows needs to reboot all the time) must be able to do this!
Is it enabled in your BIOS?

What does

Code: Select all

 find /sys -name "*ahci*"
print out?
Dont make it idiot proof, make it work.
Neucode.org
<suppressed key>
Top
Sachankara
l33t
l33t
User avatar
Posts: 696
Joined: Fri Jun 11, 2004 5:04 pm
Location: Stockholm, Sweden

  • Quote

Post by Sachankara » Fri Apr 27, 2007 12:57 am

SATA hotswapping is only supported by the new ATA driver, not by the old ones. The new ones can be found in a menu called "Serial ATA (prod) and Parallel ATA (experimental) drivers". Also, you'll have to disable all the old PATA/SATA drivers to get the new ones to work.
Gentoo Hardened Linux 2.6.21 + svorak (Swedish dvorak)
Top
halfgaar
l33t
l33t
User avatar
Posts: 781
Joined: Sun Feb 22, 2004 1:50 pm
Location: Netherlands
Contact:
Contact halfgaar
Website

  • Quote

Post by halfgaar » Fri Apr 27, 2007 10:40 am

Sachankara wrote:SATA hotswapping is only supported by the new ATA driver, not by the old ones. The new ones can be found in a menu called "Serial ATA (prod) and Parallel ATA (experimental) drivers". Also, you'll have to disable all the old PATA/SATA drivers to get the new ones to work.
If you have the old PATA stuff enabled, does that mean it also still uses the old implementation of SATA, even though the new one is selected? I haven't enabled the new PATA stuff yet, because it's still experimental. But does that mean my SATA drives still use the old driver system?

Edit: if I read the section about libata here, they imply there are no new SATA drivers, they only have moved. The PATA drivers have changed, and for SATA hotswapping, that doesn't seem important...
Linux backups the right way.
Get surround sound working.
Top
roadrunner_gs
n00b
n00b
Posts: 21
Joined: Tue Sep 07, 2004 6:05 pm

  • Quote

Post by roadrunner_gs » Sat May 19, 2007 2:11 pm

My problem seems to be in the same line.

I have a Asus P5LD2-VM SE which gives me this:

Code: Select all

roadrunner-04 ~ # lspci
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:0a.0 SCSI storage controller: Adaptec ASC-29320LP U320 (rev 03)
02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
Hot-plugging of my Fujitsu MAU3073NC connected to the Adaptec ASC-29320LP SCSI-controller does not work.
Hot-plugging of my Hitachi HDS728080PLA380 does not work when they are connected to the onboard SATA-controller, which in fact could only be configured as "Standard IDE" via BIOS, so this is okay.
Hot-plugging of my Hitachi HDS728080PLA380 does not work when they are connected to a Adaptec AAR-1210SA SATA-controller, which only is a Silicon Image SIL3112 with Adaptec-BIOS with integrated Software-RAID capability.
Hot-plugging of my Hitachi HDS728080PLA380 does not work when they are connected to a noname SATA-controller with a Silicon Image SIL3112.
Nothing shows up in /var/log/messages or via dmesg
However coldplugging - involving reboot - of harddisks and hotplugging of USB-devices such as iPod, dvd-rom, mouse or keyboard works flawless.

I am almost lost. :cry:

EDIT: Did i mention readout of SMART-parameters only works for the SCSI-harddisks, not for the SATA ones whereas obtaining the drive-temperature could be obtained for all via hddtemp...
Last edited by roadrunner_gs on Sat May 19, 2007 10:09 pm, edited 1 time in total.
Top
halfgaar
l33t
l33t
User avatar
Posts: 781
Joined: Sun Feb 22, 2004 1:50 pm
Location: Netherlands
Contact:
Contact halfgaar
Website

  • Quote

Post by halfgaar » Sat May 19, 2007 3:13 pm

EDIT: Did i mention readout of SMART-parameters only works for the SCSI-harddisks, not for the SATA ones whereas obtaining the drive-temperature could be obtained for all via hddtemp...
To obtain smart data from SATA disks with smartctl, you have to specify "-d ata" as command line option.
Linux backups the right way.
Get surround sound working.
Top
Monkeh
Veteran
Veteran
User avatar
Posts: 1656
Joined: Sat Aug 06, 2005 11:58 am
Location: England

  • Quote

Post by Monkeh » Sat May 19, 2007 4:17 pm

roadrunner_gs wrote:

Code: Select all

00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
The following SATA controllers will never support hotplug: Intel ICH5-8 (non-AHCI), Pacific Digital Talon (ADMA), Promise SATA SX4.
Sorry, but you're out of luck.
Top
Post Reply

27 posts
  • 1
  • 2
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic