Disk Scan errors expected string or buffer

@kingwavy Welcome to the Rockstor community and thanks for your report.

We have seen this before (rarely) but have yet to track it down. Looks like you have a reproducer system so hopefully we can make some headway.

Do I assume that you have had this exact same hardware working successfully on a previous install?

Also could you report the version of Rockstor you are using, and upgrade to the latest if possible:

yum update rockstor

Essentially, as per:

our do.serial (disk object serial component) is not being set correctly, which is strange; and is required for proper Rockstor function.

Could you also post the output of the following commands:

btrfs fi show

and

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

and

lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID

and when the above command has a serial entry such as:

SERIAL=""

we resource udev via:

get_disk_serial location:

which in turn parses the following command. If you could execute this command on one of the drives that is showing the above empty serial (if any) it may help track this bug down:

udevadm info --name=devname-here

Also if you could remove the “#” and following space in front of the following line on your installed version located here:

/opt/rockstor/src/rockstor/system/osi.py

and then enable debug logging via:

/opt/rockstor/bin/debug-mode on

Then either reboot or restart the rockstor service via:

systemctl restart rockstor

We should then be able to see in your logs what scan_disks() is passing to _update_disk_state() that is throwing it. Look in the main rockstor log for debug stuff, either via the UI component in System - Log Manager, or in:

/opt/rockstor/var/log/rockstor.log

We haven’t had an issue this this code for quite some time now so it would be good to get this one sorted.

A picture of your existing Disks page may also be helpful, just to see what this code has managed to pick up on.

Thanks for your assistance in this matter and lets hope we can track this one down.