WD drives showing as unknown

@cferra Welcome to the Rockstor community, and thanks for helping to support Rockstor development via a stable subscription.

I’m assuming here you are referring to the drives “Power Status” column entry. It’s the only “unknown” Web-UI column entry on the Disks page that comes to mind, ie:

unknown-power-status

If so this is simply a default state if a certain hdparm command returns an error or a result which is not ‘understood’. The code in question is the following:

Clicking on the “show original” will give the entire rather short code snippet that deals with the “Power State” column entry text.

This is not really a concern as it just means the output of the following command, as executed with your drives by-id name, was interpreted as ‘unknown’:

hdparm -C -q device-by-id-name-with-path

An example for a virtio drive with serial = “serial-6”:

hdparm -C -q /dev/disk/by-id/virtio-serial-6 
 drive state is:  unknown

It would also be helpful to see what the return code was from that command: ie directly after executing the hdparm command if you could then execute the following command:

echo $?
25

We see here that a return code of 25 was recorded from the hdparm command on a virtio device. The indicated source code classes any error output “len(err) !=1” as an unknown state, this error text is normally part of the command output if I remember correctly.

We may have an opportunity to improve this columns scope here (ie for your drives through LSI controller ‘unknown’ issue); or it may just be that hdparm can’t handle this scenario. We do have a related issue open for the scenario where we also use hdparm which is known not to be able to set drive power down settings (the related use of hdparm) when the drive is behind a raid controller:

Your drives by-id names can be listed via:

ls -la /dev/disk/by-id/

and are the names displayed in the Name column of the Disks page, remember to supply the path.

This is a currently not a directly related issue, ie hdparm is used for the Power Status and APM columns where as smartctl is used to establish if we can gain smart info for use in the pages that appear when you click on a drives names: as shown in our S.M.A.R.T doc section. If the smart column doesn’t show as “Not supported” and the smart pages show up ok then it would seem you don’t need custom smart options.

We have had a recent improvement on drive name validation which may affect your chosen custom smart options; see issue:

which has been initially addressed by pull request:

which was merged as part of Rockstor version 3.9.2-30 so fairly recently.

Looks like this may have impact on our parsing of LSI dev names also. The original forum member reporter of the megaraid dev parsing issue, @coreybrett, has yet to confirm the effectiveness or otherwise of these recent changes to the dev name parsing in our custom smart options re the megaraid option:

Hope that helps and lets see what your hdparm command is returning for those unknown / active drives, ie you could test the hdparm command for the drives while they are either unknown or active (if I have understood your description correctly).