How can I get unRAID to recognize a hot added drive?


vizi0n

Recommended Posts

Hi everyone,

 

I'm a total newbie when it gets to unRAID as I am only on my 3rd day using it so please bear with me :)

 

So far it works great but I'm trying to figure out how I can prevent from having to reboot when I add disks?

 

I am running an Adaptec 51245 controller with disks as JBOD in Rosewill 4x3 enclosures. Every device detected at boot work great, but when I add new drives (is that called hot-add?) unRAID doesn't see them in the unassigned section. If I go to Tools / System devices, the "new drives" appear in the SCSI devices list .

 

Is there anything I can do to have unRAID detect those drives without rebooting so I can preclear them, stop the array, add them, and restart the array?

 

The drives are WD10EALX and WD10EARS

 

Thanks!

 

SCSI Devices

[0:0:0:0]    disk    SanDisk  Ultra Fit        1.00  /dev/sda   15.3GB
[1:1:1:0]    disk             ST500DM002-1BD14 KC45  /dev/sdb    499GB
[1:1:2:0]    disk             ST500DM002-1BD14 KC45  /dev/sdc    499GB
[1:1:3:0]    disk             ST3160827AS      3.42  /dev/sdd    159GB
[1:1:5:0]    disk    WDC      WD10EALX-229     15.0  -               -
[1:1:6:0]    disk    WDC      WD10EARS-00Y     80.0  -               -
[1:1:7:0]    disk    Hitachi  HUA722020ALA331  JKAO  /dev/sde   1.99TB
[1:1:8:0]    disk    Hitachi  HUA722020ALA331  JKAO  /dev/sdf   1.99TB
[1:1:9:0]    disk    Hitachi  HUA722020ALA331  JKAO  /dev/sdg   1.99TB
[1:1:10:0]   disk    Hitachi  HUA722020ALA331  JKAO  /dev/sdh   1.99TB
[1:1:11:0]   disk    Hitachi  HUA722020ALA331  JKAO  /dev/sdi   1.99TB
[7:0:0:0]    cd/dvd  HL-DT-ST BD-RE  WH10LS30  1.00  /dev/sr0        -

Link to comment

Underlying Linux supports adding disks on the fly.

 

Once a new disk is added and recognized by Linux, then stop the array and it will be available as a new choice.

 

If the array is already stopped, then refresh the GUI.

 

ps. I assume your hardware supports hot swapping, i.e. using drive cages.

Link to comment

As somebody with a hot swap cage, some work needs be done by the user to properly detect new drives (or removed drives)

echo "- - -" > /sys/class/scsi_host/host0/scan

host0 kinda depends on your system though (its probably host0 or host1)

 

you'll notice that your scsi devices list list the drives without the /dev/sdX names, meaning linux is not aware they exist.

until linux is aware, restarting the array is not going to work.

Link to comment

As somebody with a hot swap cage, some work needs be done by the user to properly detect new drives (or removed drives)

echo "- - -" > /sys/class/scsi_host/host0/scan

host0 kinda depends on your system though (its probably host0 or host1)

 

you'll notice that your scsi devices list list the drives without the /dev/sdX names, meaning linux is not aware they exist.

until linux is aware, restarting the array is not going to work.

Aaaah that's the missing bit! Thanks for your input! Can't try it right now though but I'm keeping note of it
Link to comment
  • 1 month later...

Unfortunately that didn't work. I know, its been a while, but I had to reorganize my drives today, and after swapping bays. I see them in the new order on the system devices page but no /dev/sdx assigned to the swapped drives.

 

When I run echo "- - -" > /sys/class/scsi_host/host7/scan" nothing special happens. They don't obtain a /dev/sdx :(

 

I've had to reboot, and now evertything is back to normal.

Link to comment

Unfortunately that didn't work. I know, its been a while, but I had to reorganize my drives today, and after swapping bays. I see them in the new order on the system devices page but no /dev/sdx assigned to the swapped drives.

 

When I run echo "- - -" > /sys/class/scsi_host/host7/scan" nothing special happens. They don't obtain a /dev/sdx :(

 

I've had to reboot, and now evertything is back to normal.

 

Well judging from lsscsi ouput above, I'd say you should have been scanning against host1, not host7. But yesa a reboot will definite work out the kinks :D

Link to comment
  • 3 years later...
  • 10 months later...
On 8/24/2020 at 10:47 PM, DrLucasMendes said:

Share with us. :D

 

Good idea, because here I am today, looking again for how to do this because I want to upgrade my cache disk! lol

 

** These steps are for my Adaptec 51245 controller **

 

Step 1: arcconf getconfig 1

This prints a list of all drives connected to controller #1

 

Step 2: find your new drive in the list, it will most likely be the only one that doesn't say "JBOD" next to its state. Note the  "Reported Channel,Device(T:L)" (example : 0,11 this is channel 0, device 11)

 

Step 3 : create a JBOD drive out of the new drive : arcconf CREATE 1 JBOD 0 11 (still using the example from above). This create a JBOD drive, on controller 1, channel 0, drive 11)

 

Step 4 : you should now see the new drive in your MAIN section of Unraid. If you dont, stop the array and it should be in the list.

 

============

 

Here's my controller configuration if that can help. You can find that with "arcconf getconfig 1 ad"


Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   Controller Status                        : Optimal
   Channel description                      : SAS/SATA
   Controller Model                         : Adaptec 51245
   Controller Serial Number                 : 1D4211CB859
   Temperature                              : 82 C/ 179 F (Normal)
   Installed memory                         : 512 MB
   Copyback                                 : Disabled
   Background consistency check             : Disabled
   Automatic Failover                       : Disabled
   Global task priority                     : High
   Performance Mode                         : Default/Dynamic
   Stayawake period                         : Disabled
   Spinup limit internal drives             : 0
   Spinup limit external drives             : 0
   Defunct disk drive count                 : 0
   Logical devices/Failed/Degraded          : 0/0/0
   SSDs assigned to MaxCache pool           : 0
   Maximum SSDs allowed in MaxCache pool    : 8
   MaxCache Read Cache Pool Size            : 0.000 GB
   MaxCache flush and fetch rate            : 0
   MaxCache Read, Write Balance Factor      : 3,1
   NCQ status                               : Enabled
   Statistics data collection mode          : Enabled
   --------------------------------------------------------
   Controller Version Information
   --------------------------------------------------------
   BIOS                                     : 5.2-0 (18948)
   Firmware                                 : 5.2-0 (18948)
   Driver                                   : 1.2-1 (50983)
   Boot Flash                               : 5.2-0 (18948)
   --------------------------------------------------------
   Controller Battery Information
   --------------------------------------------------------
   Status                                   : Not Installed

 

 

Also interesting information:  if you want to be able to view the SMART data from the Unraid devices pages, you need to set the "SMART Controller Type" to "SAT" with nothing in the 2 fields on the same row as SAT.

Edited by vizi0n
  • Thanks 1
Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.