im-0 / hpsahba

Tool to enable/disable HBA mode on some HP Smart Array controllers
GNU General Public License v2.0
128 stars 45 forks source link

How to make drives unmasked #5

Closed toxuin closed 4 years ago

toxuin commented 4 years ago

Hello,

What is the proper way of making drives visible in the OS?

I've tried to use hpssacli to create a logical volume (the usual process to make drives usable by the OS – before enabling HBA mode that is), but it ends with error, just like the Readme warned :)

Here's the output of hpssacli ctrl all show config:

Smart Array P410i in Slot 0 (Embedded)    (sn: 500???????1F5EF0)

   Port Name: 1I

   Port Name: 2I

   Internal Drive Cage at Port 1I, Box 1, OK

   Internal Drive Cage at Port 2I, Box 1, OK

   unassigned

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)

   unassigned

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 500 GB, OK)

   unassigned

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 500 GB, OK)

   unassigned

      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 500 GB, OK)

   unassigned

      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 500 GB, OK)

   SEP (Vendor ID PMCSIERA, Model  SRC 8x6G) 250  (WWID: 5001???????F)

I have read that other HP controllers that officially support HBA mode need drives formatted to erase the hp-raid configuration off them before they can be passed-through to the OS. I've tried it with one of my drives, but it appears exactly as before, unassigned.

What do I do?

Thanks!

dbartelmus commented 4 years ago

Hello, have you read readme file? It is noticed that you need kernel (Linux) patches in order to make drives properly visible and working. Unfortunately at this time I don’t now how to make it happen and maintain patches across different kernels (PROXMOX for ex.) or kernel updates.

Anyway tool it self done the job, now my p410 is in it mode and I’m using sata’s ssd.

Some kind of auto patch will be nice I think

toxuin commented 4 years ago

I’m sorry, I should’ve mention that I have applied the kernel patches and the hpsa module is loaded. I, however, don’t see any hard drives when I do lsblk. All hard drives are SAS.

After using the tool, I do see that HBA mode is enabled: both in the tool itself and in the error code when trying to create a logical volume in hpssacli

JKJameson commented 4 years ago

What kernel version are you using? Have you added "hpsa.hpsa_use_nvram_hba_flag=1" to your kernel command line?

Post the output of dmesg | grep hpsa

toxuin commented 4 years ago

Upon further investigation, I have noticed that the driver was not being loaded. The only thing that was needed was: dpkg-reconfigure linux-image-`uname -r`

I can now see all the drives doing the lsblk. Thanks for quick responses, people!