rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
557 stars 138 forks source link

Disk miss-attribution to ROOT pool #2749

Closed ubenmackin closed 7 months ago

ubenmackin commented 1 year ago

Hello again!

I was going to make a forum post, but for some reason was having issues loading the forum.

At any rate, I have a strange issue. My system has a lot of disks (currently 35) spread across a number of pools. This has caused my drive disk labels to cycle from sda to sdz, and then to sdaa, sdab, sdac, etc.

Recently I noticed that my ROOT pool, which consists of a single disk was showing with two disks in the Pool viewer. Also, when looking at the Disks page, the ROOT pool shows with two disks, which is incorrect.

image

Not only is the pool listed wrong, but so is the Capacity. This is a 10 TB disk, but it is being show on the disk page as only 109 GB, the size of my ROOT disk.

Logging into the shell, and doing a

btrfs fi show

Shows everything correctly. So it seems to be just a display issue in Rockstor.

I am guessing the issue is due to the drive lettering. Here is my ROOT pool:

rocknas:~ # btrfs fi show /
Label: 'ROOT'  uuid: 4ac51b0f-afeb-4946-aad1-975a2a26c941
    Total devices 1 FS bytes used 19.03GiB
    devid    1 size 109.72GiB used 37.60GiB path /dev/sdag4

And here is the pool that is having a disk mislabeled:

rocknas:~ # btrfs fi show /mnt2/JBOD
Label: 'JBOD'  uuid: b86538f8-e447-48e5-84ec-b72a25c65282
    Total devices 10 FS bytes used 32.06TiB
    devid    1 size 7.28TiB used 6.32TiB path /dev/sdl
    devid    2 size 9.10TiB used 6.98TiB path /dev/sda
    devid    3 size 7.28TiB used 6.93TiB path /dev/sdb
    devid    4 size 7.28TiB used 6.93TiB path /dev/sde
    devid    5 size 7.28TiB used 6.89TiB path /dev/sdn
    devid    6 size 7.28TiB used 6.89TiB path /dev/sdm
    devid    7 size 7.28TiB used 6.89TiB path /dev/sdo
    devid    8 size 7.28TiB used 6.89TiB path /dev/sdk
    devid    9 size 7.28TiB used 6.89TiB path /dev/sdp
    devid   10 size 7.28TiB used 6.89TiB path /dev/sdj

devid 2 from JBOD is the disk showing incorrectly Rockstor.

What I am left wondering is if somehow the code for the root disk lookup is parsing the root disk string, and assuming only three characters? Or maybe there is a regex someplace, and it is finding sda in sdag, and thus labeling it as a ROOT drive when it is not?

I tried digging through btrfs.py and osi.py, and found a couple of places where some parsing is happening from /proc/mounts or lsblk, but I didn't see anything that stood out that might be causing this. Figured I'd post this here, in case anyone else has come across this.

phillxnet commented 1 year ago

@ubenmackin Hello again. And thanks for the detailed report.

Re:

What I am left wondering is if somehow the code for the root disk lookup is parsing the root disk string,

We have a little bit of a legacy arrangement with the root pool, it's rather special-cased here and there as it was coded before we had btrfs in partition capability, and so there is definitely work to be done in transitioning the ROOT pool code over to our data pool arrangements. This is work that has waited too long unfortunately.

Could you confirm if you are using a data drive as a system drive also? I.e. the expectation, and the only arrangement understood by the Web-UI is that the two cannot be mixed. I.e. ROOT must be a dedicated device. What leads me to this question is:

Not only is the pool listed wrong, but so is the Capacity. This is a 10 TB disk, but it is being show on the disk page as only 109 GB, the size of my ROOT disk.

Part of the special case-ness of the system pool (btrfs in partition) is that we only show the "/" mount point size, and not the host drive size. Not normally that far out for a dedicated device. But your reported sizes are way out.

Could you paste the output of the following command for us here if you can, note that serial numbers will be included, and it's important not to obscure them as that is our canonical guide on drive identification (but you could modify them consistently if that is something you would rather now share):

https://forum.rockstor.com/t/device-management-in-rockstor/1768

Ideally what we need here is a local reproducer, to help with that could you paste the output of the following commands:

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

Which is used in this key low level bit of code: https://github.com/rockstor/rockstor-core/blob/23a8df915857269f8662e8cf16a5d485baa34f87/src/rockstor/system/osi.py#L267-L280

and

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

as we use by-id names extensively - but serial is king.

The above osi.py link is where we end up mixing our old and new btrfs in partition identification mechanism. Unfortunatly the ROOT pool (system drive) code is, as stated, full of special cases that really need to be cleaned up. But we also have to honour continuity of function: however we have quite a few tests to help with this, see: https://github.com/rockstor/rockstor-core/blob/testing/src/rockstor/system/tests/test_osi.py

Curiously enough we have an existing test involving 36 disks that was created a few years ago when we had some high disk number issues: https://github.com/rockstor/rockstor-core/blob/23a8df915857269f8662e8cf16a5d485baa34f87/src/rockstor/system/tests/test_osi.py#L602-L616

and another that was for 27+ disk counts: https://github.com/rockstor/rockstor-core/blob/23a8df915857269f8662e8cf16a5d485baa34f87/src/rockstor/system/tests/test_osi.py#L916-L931

But for the time being lets see if we can create a local test to reproduce what you have there, again assuming:

devid    1 size 109.72GiB used 37.60GiB path /dev/sdag4

is not also used in a data pool somewhere. If it is then your setup is definitely out-of-scope for what we can currently handle: the system disk can't also be part of any data pool. Which is a pain especially with big drives. But this limitation will continue to be the case as we like to enforce separation of concerns. So the answer is usually to use a smaller dedicated device for the system disk, or absorb the 'space waste' of course.

Thanks again for the report, all good for rooting out issues in this low level stuff. However we have not had to touch any of this for a few years now. But I've been itching to re-do the system drive btrfs-in-partition to bring it in line with the far newer code of that for data drives. Our current testing phase is concerned primarily with addressing technical dept, but that is now more than half way thought so hopefully we can chip away at your observed failing as we go along. I'll probably thow out the mdraid special case for system pool also as that further complicates things and we should soon benefit from grub improvements re btrfs and boot devices.

Hope that helps, at least with some context. And again the report is much appreciated. Take a look at those tests and see if you can create one that reproduces what you have there; if so then that would be a major step towards us seeing exactly what is going wrong here: again assuming the system drive plays no part in any data pool.

phillxnet commented 1 year ago

@ubenmackin I forgot to ask, what version of Rockstor are you seeing this issue one.

zypper info rockstor

Thanks.

ubenmackin commented 1 year ago

@phillxnet Thanks for your assistance!

The good news is this seems to just be a display issue, as I haven't noticed any problems with any of my NFS shares, or doing any of the normal scheduled tasks (like snapshots and scrubs). I've tried to get you the information you have requested. Let me know if there is more I can do to help.

Could you confirm if you are using a data drive as a system drive also? I.e. the expectation, and the only arrangement understood by the Web-UI is that the two cannot be mixed. I.e. ROOT must be a dedicated device.

I am using a dedicated SSD for the system drive. The drive is not shared with any other pool or drive. It is a single drive, partitioned by the installer.

Could you paste the output of the following command

rocknas:~ # lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID
NAME="sda" MODEL="WDC WD101EMAZ-11G7DA0" SERIAL="VCGRX3EN" SIZE="9.1T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:1:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdb" MODEL="WDC WD80EDAZ-11TA3A0" SERIAL="VDKN848K" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:3:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdc" MODEL="HUS72302CLAR2000" SERIAL="YGKU60YK" SIZE="1.8T" TRAN="sas" VENDOR="HITACHI " HCTL="0:0:0:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sdd" MODEL="WDC WD60EZRX-00MVLB1" SERIAL="WD-WX31D847K0HJ" SIZE="5.5T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:2:0" TYPE="disk" FSTYPE="" LABEL="" UUID=""
NAME="sde" MODEL="WDC WD80EDAZ-11TA3A0" SERIAL="VDKN5U2K" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:4:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdf" MODEL="WDC WD40EZRZ-00GXCB0" SERIAL="WD-WCC7K4LZHN8U" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:5:0" TYPE="disk" FSTYPE="btrfs" LABEL="ExternalBackup" UUID="8c1423ff-78ec-4267-9d1c-e05268a60517"
NAME="sdg" MODEL="ST4000VN008-2DR166" SERIAL="ZGY03QJ9" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:6:0" TYPE="disk" FSTYPE="btrfs" LABEL="ExternalBackup" UUID="8c1423ff-78ec-4267-9d1c-e05268a60517"
NAME="sdh" MODEL="ST4000VN008-2DR166" SERIAL="ZGY03Q9C" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:7:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdi" MODEL="WDC WD40EZRZ-00GXCB0" SERIAL="WD-WCC7K4HJ726U" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:8:0" TYPE="disk" FSTYPE="btrfs" LABEL="ExternalBackup" UUID="8c1423ff-78ec-4267-9d1c-e05268a60517"
NAME="sdj" MODEL="WDC WD80EZZX-11CSGA0" SERIAL="VK0TZU1Y" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:9:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdk" MODEL="WDC WD80EZAZ-11TDBA0" SERIAL="1EKB60VZ" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:10:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdl" MODEL="WDC WD80EDAZ-11TA3A0" SERIAL="VGH41NAG" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:11:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdm" MODEL="WDC WD80EFAX-68LHPN0" SERIAL="7SGL9JSC" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:12:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdn" MODEL="WDC WD80EFAX-68LHPN0" SERIAL="7SGJWGTC" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:13:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdo" MODEL="WDC WD80EMAZ-00WJTA0" SERIAL="2TJ0YATD" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:14:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sdp" MODEL="WDC WD80EZZX-11CSGA0" SERIAL="VK0RGYTY" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:15:0" TYPE="disk" FSTYPE="btrfs" LABEL="JBOD" UUID="b86538f8-e447-48e5-84ec-b72a25c65282"
NAME="sr0" MODEL="CD-ROM Drive" SERIAL="CAFEBABE" SIZE="1024M" TRAN="usb" VENDOR="PiKVM   " HCTL="13:0:0:0" TYPE="rom" FSTYPE="" LABEL="" UUID=""
NAME="sdq" MODEL="ST10000NM0226" SERIAL="ZA22Q7W00000C8115CNQ" SIZE="9T" TRAN="sas" VENDOR="SEAGATE " HCTL="0:0:17:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sdr" MODEL="HUS72302CLAR2000" SERIAL="YGKWMWKK" SIZE="1.8T" TRAN="sas" VENDOR="HITACHI " HCTL="0:0:18:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sds" MODEL="HUS72302CLAR2000" SERIAL="YFKVTMNK" SIZE="1.8T" TRAN="sas" VENDOR="HITACHI " HCTL="0:0:19:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sdt" MODEL="HGST HUH721008ALE604" SERIAL="7SH27T6C" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:20:0" TYPE="disk" FSTYPE="btrfs" LABEL="NasBackup" UUID="03c59913-ceb6-4b2a-9a27-62707a9dd73d"
NAME="sdu" MODEL="ST4000NM0043 E" SERIAL="Z1ZAY35T0000C643119P" SIZE="3.6T" TRAN="sas" VENDOR="IBM-ESXS" HCTL="0:0:21:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdv" MODEL="ST4000DM000-1F2168" SERIAL="Z300WT54" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:22:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdw" MODEL="HUS72302CLAR2000" SERIAL="YFKY4LKK" SIZE="1.8T" TRAN="sas" VENDOR="HITACHI " HCTL="0:0:23:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sdx" MODEL="WDC WD40EURX-64WRWY0" SERIAL="WD-WCC4E1746586" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:24:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdy" MODEL="HGST HDS5C4040ALE630" SERIAL="PL2331LAGGUHRJ" SIZE="3.6T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:25:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdz" MODEL="ST10000NM0226" SERIAL="ZA22YJMW0000C8022Q3X" SIZE="9T" TRAN="sas" VENDOR="SEAGATE " HCTL="0:0:26:0" TYPE="disk" FSTYPE="btrfs" LABEL="SASPool" UUID="b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8"
NAME="sdaa" MODEL="ST4000NM0043 E" SERIAL="Z1ZANJ6J0000R631JFMH" SIZE="3.6T" TRAN="sas" VENDOR="IBM-ESXS" HCTL="0:0:27:0" TYPE="disk" FSTYPE="btrfs" LABEL="NAS" UUID="dac090f1-48b8-40a7-b333-a9813541f09b"
NAME="sdab" MODEL="HGST HUH721008ALE604" SERIAL="7SGHEMVC" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:29:0" TYPE="disk" FSTYPE="btrfs" LABEL="NasBackup" UUID="03c59913-ceb6-4b2a-9a27-62707a9dd73d"
NAME="sdac" MODEL="HGST HUH721008ALE604" SERIAL="7SH26E3C" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:28:0" TYPE="disk" FSTYPE="btrfs" LABEL="ChiaPool" UUID="3effcc72-05a2-4394-b229-71042ac46956"
NAME="sdad" MODEL="HGST HUH721008ALE604" SERIAL="7SGZJV0C" SIZE="7.3T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:30:0" TYPE="disk" FSTYPE="btrfs" LABEL="NasBackup" UUID="03c59913-ceb6-4b2a-9a27-62707a9dd73d"
NAME="sdae" MODEL="WDC WD140EDGZ-11B2DA2" SERIAL="2CGLYKDN" SIZE="12.7T" TRAN="sas" VENDOR="ATA     " HCTL="0:0:31:0" TYPE="disk" FSTYPE="btrfs" LABEL="StorjPool" UUID="b8e4bea0-285d-460c-a8a3-816e00b596a8"
NAME="sdaf" MODEL="CT500MX500SSD1" SERIAL="1906E1E91E57" SIZE="465.8G" TRAN="sata" VENDOR="ATA     " HCTL="3:0:0:0" TYPE="disk" FSTYPE="btrfs" LABEL="SSDPool" UUID="badb1a86-f340-406d-8ee0-162e3ec71140"
NAME="sdag" MODEL="PNY CS900 120GB SSD" SERIAL="PNY0520228055010CFE7" SIZE="111.8G" TRAN="sata" VENDOR="ATA     " HCTL="6:0:0:0" TYPE="disk" FSTYPE="" LABEL="" UUID=""
NAME="sdag1" MODEL="" SERIAL="" SIZE="2M" TRAN="" VENDOR="" HCTL="" TYPE="part" FSTYPE="" LABEL="" UUID=""
NAME="sdag2" MODEL="" SERIAL="" SIZE="64M" TRAN="" VENDOR="" HCTL="" TYPE="part" FSTYPE="vfat" LABEL="EFI" UUID="A48E-EDBF"
NAME="sdag3" MODEL="" SERIAL="" SIZE="2G" TRAN="" VENDOR="" HCTL="" TYPE="part" FSTYPE="swap" LABEL="SWAP" UUID="42d2c6da-102d-49f2-948e-817a10e61370"
NAME="sdag4" MODEL="" SERIAL="" SIZE="109.7G" TRAN="" VENDOR="" HCTL="" TYPE="part" FSTYPE="btrfs" LABEL="ROOT" UUID="4ac51b0f-afeb-4946-aad1-975a2a26c941"
NAME="sdah" MODEL="CT500MX500SSD1" SERIAL="1906E1E92271" SIZE="465.8G" TRAN="sata" VENDOR="ATA     " HCTL="10:0:0:0" TYPE="disk" FSTYPE="btrfs" LABEL="SSDPool" UUID="badb1a86-f340-406d-8ee0-162e3ec71140"
NAME="nvme0n1" MODEL="SHGP31-1000GM-2" SERIAL="AS0BN60301030BE2O" SIZE="931.5G" TRAN="nvme" VENDOR="" HCTL="" TYPE="disk" FSTYPE="btrfs" LABEL="AppPool" UUID="2beebfa1-5ac3-4d2b-85ea-56225e0704ca"
rocknas:~ # 
rocknas:~ # 
rocknas:~ # ls -la /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 3280 Nov 16 17:47 .
drwxr-xr-x 8 root root  160 Nov 13 17:02 ..
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-CT500MX500SSD1_1906E1E91E57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-CT500MX500SSD1_1906E1E92271 -> ../../sdah
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-HGST_HDS5C4040ALE630_PL2331LAGGUHRJ -> ../../sdy
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-HGST_HUH721008ALE604_7SGHEMVC -> ../../sdab
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-HGST_HUH721008ALE604_7SGZJV0C -> ../../sdad
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-HGST_HUH721008ALE604_7SH26E3C -> ../../sdac
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-HGST_HUH721008ALE604_7SH27T6C -> ../../sdt
lrwxrwxrwx 1 root root   10 Nov 13 17:19 ata-PNY_CS900_120GB_SSD_PNY0520228055010CFE7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 ata-PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 ata-PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 ata-PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 ata-PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part4 -> ../../sdag4
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-ST4000DM000-1F2168_Z300WT54 -> ../../sdv
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-ST4000VN008-2DR166_ZGY03Q9C -> ../../sdh
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-ST4000VN008-2DR166_ZGY03QJ9 -> ../../sdg
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD101EMAZ-11G7DA0_VCGRX3EN -> ../../sda
lrwxrwxrwx 1 root root   10 Nov 16 17:47 ata-WDC_WD140EDGZ-11B2DA2_2CGLYKDN -> ../../sdae
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD40EURX-64WRWY0_WD-WCC4E1746586 -> ../../sdx
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K4HJ726U -> ../../sdi
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K4LZHN8U -> ../../sdf
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD60EZRX-00MVLB1_WD-WX31D847K0HJ -> ../../sdd
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EDAZ-11TA3A0_VDKN5U2K -> ../../sde
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EDAZ-11TA3A0_VDKN848K -> ../../sdb
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EDAZ-11TA3A0_VGH41NAG -> ../../sdl
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EFAX-68LHPN0_7SGJWGTC -> ../../sdn
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EFAX-68LHPN0_7SGL9JSC -> ../../sdm
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EMAZ-00WJTA0_2TJ0YATD -> ../../sdo
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EZAZ-11TDBA0_1EKB60VZ -> ../../sdk
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EZZX-11CSGA0_VK0RGYTY -> ../../sdp
lrwxrwxrwx 1 root root    9 Nov 13 17:19 ata-WDC_WD80EZZX-11CSGA0_VK0TZU1Y -> ../../sdj
lrwxrwxrwx 1 root root   13 Nov 13 17:19 nvme-nvme.1c5c-415330424e36303330313033304245324f-5348475033312d31303030474d2d32-00000001 -> ../../nvme0n1
lrwxrwxrwx 1 root root   13 Nov 13 17:19 nvme-SHGP31-1000GM-2_AS0BN60301030BE2O -> ../../nvme0n1
lrwxrwxrwx 1 root root   13 Nov 13 17:19 nvme-SHGP31-1000GM-2_AS0BN60301030BE2O_1 -> ../../nvme0n1
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-0ATA_CT500MX500SSD1_1906E1E91E57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-0ATA_CT500MX500SSD1_1906E1E92271 -> ../../sdah
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-0ATA_PNY_CS900_120GB_PNY0520228055010CFE7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-0ATA_PNY_CS900_120GB_PNY0520228055010CFE7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-0ATA_PNY_CS900_120GB_PNY0520228055010CFE7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-0ATA_PNY_CS900_120GB_PNY0520228055010CFE7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-0ATA_PNY_CS900_120GB_PNY0520228055010CFE7-part4 -> ../../sdag4
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-1ATA_CT500MX500SSD1_1906E1E91E57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-1ATA_CT500MX500SSD1_1906E1E92271 -> ../../sdah
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-1ATA_PNY_CS900_120GB_SSD_PNY0520228055010CFE7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-1ATA_PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-1ATA_PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-1ATA_PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-1ATA_PNY_CS900_120GB_SSD_PNY0520228055010CFE7-part4 -> ../../sdag4
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c50064e63b2c -> ../../sdv
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-35000c50085209f3b -> ../../sdaa
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c500856ad427 -> ../../sdu
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c50094b2ad73 -> ../../sdq
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c50094b2d687 -> ../../sdz
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c500a3070020 -> ../../sdh
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000c500a30710c0 -> ../../sdg
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca01bd9d288 -> ../../sds
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca01bde1a24 -> ../../sdw
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca01cd6e9b4 -> ../../sdc
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca01cdb5cc4 -> ../../sdr
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca0b0ca69b0 -> ../../sda
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca0bbf373bd -> ../../sde
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca0bbf37c7b -> ../../sdb
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca0becfef34 -> ../../sdl
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca22ec6bcf2 -> ../../sdy
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-35000cca252c704c5 -> ../../sdab
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca252c7ad15 -> ../../sdn
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca252c8527e -> ../../sdm
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-35000cca252cde258 -> ../../sdad
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-35000cca252cf185b -> ../../sdac
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca252cf1d74 -> ../../sdt
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca26adc9d2d -> ../../sdo
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca27eef5d38 -> ../../sdk
lrwxrwxrwx 1 root root   10 Nov 16 17:47 scsi-35000cca2a1c89da6 -> ../../sdae
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca3b7ca3853 -> ../../sdp
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-35000cca3b7cb5c8e -> ../../sdj
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-350014ee25f80befe -> ../../sdx
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-350014ee2605de685 -> ../../sdd
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-350014ee263f3ab5e -> ../../sdf
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-350014ee26401728a -> ../../sdi
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-3500a0751e1e91e57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-3500a0751e1e92271 -> ../../sdah
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-35f8db4c05200cfe7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-35f8db4c05200cfe7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-35f8db4c05200cfe7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-35f8db4c05200cfe7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-35f8db4c05200cfe7-part4 -> ../../sdag4
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_CT500MX500SSD1_1906E1E91E57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_CT500MX500SSD1_1906E1E92271 -> ../../sdah
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_HGST_HDS5C4040AL_PL2331LAGGUHRJ -> ../../sdy
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_HGST_HUH721008AL_7SGHEMVC -> ../../sdab
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_HGST_HUH721008AL_7SGZJV0C -> ../../sdad
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_HGST_HUH721008AL_7SH26E3C -> ../../sdac
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_HGST_HUH721008AL_7SH27T6C -> ../../sdt
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SATA_PNY_CS900_120GB_PNY0520228055010CFE7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-SATA_PNY_CS900_120GB_PNY0520228055010CFE7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-SATA_PNY_CS900_120GB_PNY0520228055010CFE7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-SATA_PNY_CS900_120GB_PNY0520228055010CFE7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 scsi-SATA_PNY_CS900_120GB_PNY0520228055010CFE7-part4 -> ../../sdag4
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_ST4000DM000-1F21_Z300WT54 -> ../../sdv
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_ST4000VN008-2DR1_ZGY03Q9C -> ../../sdh
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_ST4000VN008-2DR1_ZGY03QJ9 -> ../../sdg
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD101EMAZ-11_VCGRX3EN -> ../../sda
lrwxrwxrwx 1 root root   10 Nov 16 17:47 scsi-SATA_WDC_WD140EDGZ-11_2CGLYKDN -> ../../sdae
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD40EURX-64W_WD-WCC4E1746586 -> ../../sdx
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD40EZRZ-00G_WD-WCC7K4HJ726U -> ../../sdi
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD40EZRZ-00G_WD-WCC7K4LZHN8U -> ../../sdf
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD60EZRX-00M_WD-WX31D847K0HJ -> ../../sdd
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EDAZ-11T_VDKN5U2K -> ../../sde
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EDAZ-11T_VDKN848K -> ../../sdb
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EDAZ-11T_VGH41NAG -> ../../sdl
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EFAX-68L_7SGJWGTC -> ../../sdn
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EFAX-68L_7SGL9JSC -> ../../sdm
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EMAZ-00W_2TJ0YATD -> ../../sdo
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EZAZ-11T_1EKB60VZ -> ../../sdk
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EZZX-11C_VK0RGYTY -> ../../sdp
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SATA_WDC_WD80EZZX-11C_VK0TZU1Y -> ../../sdj
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SHITACHI_HUS72302CLAR2000_YFKVTMNK -> ../../sds
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SHITACHI_HUS72302CLAR2000_YFKY4LKK -> ../../sdw
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SHITACHI_HUS72302CLAR2000_YGKU60YK -> ../../sdc
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SHITACHI_HUS72302CLAR2000_YGKWMWKK -> ../../sdr
lrwxrwxrwx 1 root root   10 Nov 13 17:19 scsi-SIBM-ESXS_ST4000NM0043_E_Z1ZANJ6J0000R631JFMH -> ../../sdaa
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SIBM-ESXS_ST4000NM0043_E_Z1ZAY35T0000C643119P -> ../../sdu
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SSEAGATE_ST10000NM0226_ZA22Q7W00000C8115CNQ -> ../../sdq
lrwxrwxrwx 1 root root    9 Nov 13 17:19 scsi-SSEAGATE_ST10000NM0226_ZA22YJMW0000C8022Q3X -> ../../sdz
lrwxrwxrwx 1 root root    9 Nov 14 21:46 usb-PiKVM_CD-ROM_Drive_CAFEBABE-0:0 -> ../../sr0
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c50064e63b2c -> ../../sdv
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x5000c50085209f3b -> ../../sdaa
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c500856ad427 -> ../../sdu
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c50094b2ad73 -> ../../sdq
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c50094b2d687 -> ../../sdz
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c500a3070020 -> ../../sdh
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000c500a30710c0 -> ../../sdg
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca01bd9d288 -> ../../sds
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca01bde1a24 -> ../../sdw
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca01cd6e9b4 -> ../../sdc
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca01cdb5cc4 -> ../../sdr
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca0b0ca69b0 -> ../../sda
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca0bbf373bd -> ../../sde
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca0bbf37c7b -> ../../sdb
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca0becfef34 -> ../../sdl
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca22ec6bcf2 -> ../../sdy
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x5000cca252c704c5 -> ../../sdab
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca252c7ad15 -> ../../sdn
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca252c8527e -> ../../sdm
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x5000cca252cde258 -> ../../sdad
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x5000cca252cf185b -> ../../sdac
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca252cf1d74 -> ../../sdt
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca26adc9d2d -> ../../sdo
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca27eef5d38 -> ../../sdk
lrwxrwxrwx 1 root root   10 Nov 16 17:47 wwn-0x5000cca2a1c89da6 -> ../../sdae
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca3b7ca3853 -> ../../sdp
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x5000cca3b7cb5c8e -> ../../sdj
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x50014ee25f80befe -> ../../sdx
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x50014ee2605de685 -> ../../sdd
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x50014ee263f3ab5e -> ../../sdf
lrwxrwxrwx 1 root root    9 Nov 13 17:19 wwn-0x50014ee26401728a -> ../../sdi
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x500a0751e1e91e57 -> ../../sdaf
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x500a0751e1e92271 -> ../../sdah
lrwxrwxrwx 1 root root   10 Nov 13 17:19 wwn-0x5f8db4c05200cfe7 -> ../../sdag
lrwxrwxrwx 1 root root   11 Nov 13 17:19 wwn-0x5f8db4c05200cfe7-part1 -> ../../sdag1
lrwxrwxrwx 1 root root   11 Nov 13 17:19 wwn-0x5f8db4c05200cfe7-part2 -> ../../sdag2
lrwxrwxrwx 1 root root   11 Nov 13 17:19 wwn-0x5f8db4c05200cfe7-part3 -> ../../sdag3
lrwxrwxrwx 1 root root   11 Nov 13 17:19 wwn-0x5f8db4c05200cfe7-part4 -> ../../sdag4

But for the time being lets see if we can create a local test to reproduce what you have there, again assuming:

devid    1 size 109.72GiB used 37.60GiB path /dev/sdag4

is not also used in a data pool somewhere. If it is then your setup is definitely out-of-scope for what we can currently handle: the system disk can't also be part of any data pool.

Yes, this is a dedicated drive, so it is not shared. Here is output of fdisk /dev/sdag (which is my root disk)

Disk /dev/sdag: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: PNY CS900 120GB 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8153E902-98F9-48D7-A3AC-4FE49680F98E

Device       Start       End   Sectors   Size Type
/dev/sdag1    2048      6143      4096     2M BIOS boot
/dev/sdag2    6144    137215    131072    64M EFI System
/dev/sdag3  137216   4331519   4194304     2G Linux swap
/dev/sdag4 4331520 234441614 230110095 109.7G Linux filesystem

I forgot to ask, what version of Rockstor are you seeing this issue one.

Information for package rockstor:
---------------------------------
Repository     : Rockstor-Stable
Name           : rockstor
Version        : 4.6.1-0
Arch           : x86_64
Vendor         : YewTreeApps
Installed Size : 9.6 MiB
Installed      : No
Status         : not installed
Source package : rockstor-4.6.1-0.src
Upstream URL   : https://rockstor.com/
Summary        : Btrfs Network Attached Storage (NAS) Appliance.
Description    : 
    Software raid, snapshot capable NAS solution with built-in file integrity protection.
    Allows for file sharing between network attached devices.
Hooverdan96 commented 12 months ago

It probably has nothing to do with anything of the above, but I am surprised to see that your Rockstor package status shows as not installed rather than 'up-to-date' or installed.

phillxnet commented 12 months ago

@ubenmackin Thanks for all the info, that should be just the job to create a test so we can reproduce what you are seeing and provide a basis, and proof, to get this fixed. It will likely be a little while before any of us can get to creating this test, and if you fancy having a go yourself feel free to assign this issue to yourself and update it accordingly. But hopefully I can have a look at this soon enough. And as you say it's essentially cosmetic - but still entirely unwanted all around. I'm quite curious exactly what's going sideways actually.

If I, or whoever takes on this issue, does need more details/command-outputs it would be great if you could step in with them as this is usually critical to ensure we have an exact reproducer in the test.

Also; what a lot of disk !

@Hooverdan96 Re:

... that your Rockstor package status shows as not installed rather than 'up-to-date' or installed.

I wonder if this is an artifact of us pre-installing during the installer build process - I've not noticed this before but should be harmless. I think there was something about the package db not carrying over at one time from the installer build process, to the instantiated install. We should break this out into an dedicated issue once we have confirmed a reproducer. But we will be building new installer towards the end of the current testing cycle so we can look again at this.

But agreed that this is very likely unrelated to @ubenmackin report which I suspect is a plain old fashion bug.

ubenmackin commented 12 months ago

if you fancy having a go yourself feel free to assign this issue to yourself and update it accordingly

No promises, but I might take a stab at this over my Christmas holiday.

If I, or whoever takes on this issue, does need more details/command-outputs it would be great if you could step in with them as this is usually critical to ensure we have an exact reproducer in the test.

Absolutely. I'll try and do whatever I can to assist.

Also; what a lot of disk !

Haha, yes. Collection over time mostly. I think a lot of them are 5-6 years old of varying sizes (2 TB - 10 TB). I also got lucky and came into some old enterprise SAS drives. I need to really start consolidating to few larger disks!

ubenmackin commented 11 months ago

I think I may have found the culprit! I am still doing some testing, but it looks like this line here is at fault

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L405

In my case, right now /dev/sdad is my root drive, with /dev/sdad4 specifically is the root btrfs partition. The disk getting mislabeled as root is /dev/sda.

So in this re.match function, dname = "/dev/sda" and dmap["NAME"] = "/dev/sdad4". Then the match function runs and is not None, so the if statement passes as True. As the code continues in the if statement:

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L406-L416

Here is is now saying the /dev/sda has a partition, which is not correct. /dev/sda has no parittions, it is /dev/sdad which has partitions.

Going further down the code in this if statement:

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L496

right before the dnames array gets populated:

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L617-L632

If I add this at line 617:

print(dnames["/dev/sda"])

The output is:

['/dev/sda', 'ST10000NM0226', 'ZA22Q7W00000C8115CNQ', 9663676416, 'sas', 'SEAGATE', '0:0:0:0', 'disk', 'btrfs', 'SASPool', 'b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8', False, False, {}]

But if I add the same print statement at line 634, right above the for loop:

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L634-L636

I then see this output for the same disk:

['/dev/sda', 'ST10000NM0226', 'ZA22Q7W00000C8115CNQ', 9663676416, 'sas', 'SEAGATE', '0:0:0:0', 'disk', 'btrfs', 'SASPool', 'b3fa44e0-0a6f-4193-a1cf-2d0f248a64a8', True, False, {'/dev/sdad4': 'btrfs'}]

So it seems like, as it goes through and finds the ROOT partition on /dev/sdad4, it is updating the /dev/sda disk entry in the array incorrectly.

ubenmackin commented 11 months ago

So I can confirm that this was it. I made the following (hacky) change. I checked if the last character of the dmap["NAME"] is a number (i.e a partition) and if so, strip it off to get the drive name. Then I do a straight compare of dname to the new partition name (minus the number) and only if they are equal then proceed.

Changing this one IF statement:

https://github.com/rockstor/rockstor-core/blob/4d60a2c683140aaa10a8e5b201157163cc9a898b/src/rockstor/system/osi.py#L405

with the following:

if re.search(r'\d+$', dmap["NAME"]) is not None:
    disk_no_part = dmap["NAME"][:-1]
if dname == disk_no_part:

So in my example, dmap["NAME"] is /dev/sdad4. So once I strip the number, disk_no_part = /dev/sdad. I then compare that to dname, which is /dev/sda, and they are not equal, so it doesn't try and assign a partition to a drive that doesn't have one.

I just made the change to the code inplace on my install, refreshed things, and then went and did a Rescan onto disk page. Sure enough, that cleared things up, and now all disks show up correctly!

This needs to be cleaned up to a better method to check if the partition being tested actually belongs to the disk in question, rather than replying on parsing or regex, but this is where I am a bit out of my depth. I'll maybe try poking around some more and see if there is a method or some other function that can be used, but thought I'd share my findings.

ubenmackin commented 11 months ago

@phillxnet Realized I didn't tag you, so not sure if you'll get my updates.

phillxnet commented 11 months ago

@ubenmackin This is an excellent exposition and a really nice find. I almost understood it on the first read :).

Again excellent run-down here. And very much appreciated. Well done. I'm quite chuffed/relieved that this is now better understood. I've already added this issue to our next stable Milestone in GitHub and we can hopefully get a test in place to prove the category of failure here and prove/maintain against regression what ever fix/work-around we pop in here for the next stable. With a rewrite planed for the following testing phase that will follow.

This needs to be cleaned up to a better method to check if the partition being tested actually belongs to the disk in question, rather than replying on parsing or regex

Agreed, and likely once we un-special-case our ROOT pool treatment re partitions we should be in a far better position. But for now the direction you have taken looks well workable as a fix/work-around until we properly normalise on our existing btrfs-in-partition capability for data drives, to apply also to the system drive.

Again many thanks for sharing your exploration and findings here, and a great help all around. It would be great if, once we have a proposed fix in place for this, if you could test on your know reproducer system via an rpm upgrade?

Thanks again for your efforts here, a definite help towards getting this sorted ready for our next stable release. And keep an eye out for attribution in our changelog :). Assuming you don't beat one of us to the unittest and fix PR submission :).

ubenmackin commented 11 months ago

@phillxnet

Again many thanks for sharing your exploration and findings here, and a great help all around. It would be great if, once we have a proposed fix in place for this, if you could test on your know reproducer system via an rpm upgrade?

Absolutely.

Thanks again for your efforts here, a definite help towards getting this sorted ready for our next stable release. And keep an eye out for attribution in our changelog :). Assuming you don't beat one of us to the unittest and fix PR submission :).

I'll see if I get any time in the next few weeks. But no promises :-)

Hooverdan96 commented 7 months ago

@ubenmackin, have you been able to get some more time on this to think about a different way for addressing this scenario? Or does a more elegant approach remain elusive? It certainly would be a good thing to address this before the next stable release to support scenarios like yours (as rare as they might be).

phillxnet commented 7 months ago

I'm now taking a look at this issue: and we have a dormant/remarked out test for our root_disk() procedure in osi.py. It looks like this is awaiting a migration from our Py2.7 days - so I'll start there. Once working again (in our new Py3.11 env), we can then expand it's test data to include @ubenmackin reported root disk: the current root_disk() function looks to have a TODO entry identifying this current limitation re sdag3 entries and the like. We can then use this newly revived test_root_disk() to address this limitation and see if scan_disks() then fall in line.

Hooverdan96 commented 7 months ago

@phillxnet I saw the comment about using lsblk in the osi.py file. Wouldn't be something like:

findmnt -n -o SOURCE,FSTYPE,UUID / (or some variation of output columns) be even simpler "(since it's, like lsblk, part of the util-linux package? Or does that not work on LUKS or other specific file systems?

Also, I noticed that lsblk also has a --json output option (as does findmnt apparently), but one still would have to map it into a dictionary and process, so maybe that doesn't help with anything ...

phillxnet commented 7 months ago

@Hooverdan96 Re:

I saw the comment about using lsblk in the osi.py file.

Which are you referencing here? I'm super reluctant to change what has served us now, with only a few bugs, for several years. But yes, we do have some improvements to be made for sure. And things like json output would be much preferred. Lets issue individual improvement proposals, as atomically as possible, and hopefully asses them as and when we can. But we already have this and the serial issue open still on during RC testing phase - so we have to tread verycarefully. Also note all the tests we have for how we do it currently. They would all have to be replaced for all the installs they cover when the time comes for us to change the very lowest of our functions. Plus all this test data is taken, in the vast majority of cases, directly from real hardware. That is not easy to reproduce when changing the base command we do.

I'm a little anxious already with this and our serial issue (from 2015 !!). But again, we do have improvements to make. And one is to non special case our root partition treatment - I'll create an issue for that soon. But that is for the next testing hopefully - however our front end is also starved of attention and earmarked for next testing phase focus so yes: resources to an extend :) .

Re:

(since it's, like lsblk

we use lsblk to find our block devices, the filesystems (mounted or otherwise), btrfs predominantly, we discover via btrfs-progs.

I think this all looks way more complicated due to our root drive special casing: which predates our btrfs-in-partition work associated with our data drives. Backporting our newer partition awareness to the system drive will simplify a load of stuff and open up way more flexibility. All in good time.

phillxnet commented 7 months ago

https://sleeplessbeastie.eu/2021/06/25/how-to-export-block-devices-list-as-json/

The json output move would be great: and with care we could hopefully by-hand (fragility there) migrate our real-hardware test data. This output mode likely didn't exist at the time we first adopted lsblk - we are getting quite old now you know :) .

phillxnet commented 7 months ago

@ubenmackin Could you provide the output from the following command:

cat /proc/mounts

Thanks. This way we can ensure exact test entries. I'm reviving a prior remarked out unittest to ensure our root_disk() reporter is functioning as expected.

phillxnet commented 7 months ago

From the ongoing draft PR our existing root_disk() is now proven as functioning as-expected in this case. Pressing on from there, as what we ideally need is a test to prove any fix provided here, and to guard against future regressions. I am currently working on such a test using @ubenmackin provided command output from the current reproducer system.

phillxnet commented 7 months ago

But for the time being lets see if we can create a local test to reproduce what you have there ...:

======================================================================
FAIL: test_scan_disks_root_miss_attribution (rockstor.system.tests.test_osi.OSITests.test_scan_disks_root_miss_attribution)
Miss-attribution of a data drive to the ROOT pool.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/system/tests/test_osi.py", line 3219, in test_scan_disks_root_miss_attribution
    self.assertEqual(
AssertionError: Lists differ: [Disk[482 chars]rted=True, root=False, partitions={'sdag4': 'b[8738 chars]={})] != [Disk[482 chars]rted=False, root=False, partitions={}), Disk(n[8707 chars]={})]

First differing element 1:
Disk([206 chars]65282', parted=True, root=False, partitions={'sdag4': 'btrfs'})
Disk([206 chars]65282', parted=False, root=False, partitions={})

With this first element showing our data drive miss-configuration. I.e. it's association with the ROOT partition.

And from the currently very long output we have:

sdag (ROOT)

returned

expected

sda (whole disk data pool member)

Findings in test as per @ubenmackin report:

returned

Disk(name='sda', model='WDC WD101EMAZ-11G7DA0', serial='VCGRX3EN', size=9771050598, transport='sas', vendor='ATA', hctl='0:0:1:0', type='disk', fstype='btrfs', label='JBOD', uuid='b86538f8-e447-48e5-84ec-b72a25c65282', parted=True, root=False, partitions={'sdag4': 'btrfs'}) N.B. We have a false partition assigned and parted=True also !!

expected

Disk(name='sda', model='WDC WD101EMAZ-11G7DA0', serial='VCGRX3EN', size=9771050598, transport='sas', vendor='ATA', hctl='0:0:1:0', type='disk', fstype='btrfs', label='JBOD', uuid='b86538f8-e447-48e5-84ec-b72a25c65282', parted=False, root=False, partitions={})

Hooverdan96 commented 7 months ago

Which are you referencing here?

I was looking at this TODO: https://github.com/rockstor/rockstor-core/blob/dd286079d0d60e098c97dd09cae4671ef4d28c18/src/rockstor/system/osi.py#L1106-L1118

and you're right, it seems that the json option was not introduced until 2015 or so (at least that's the first reference I had seen).

phillxnet commented 7 months ago

With a minimum of 2 disks for test data we now have a minimum reproducer, with some improved test output:

lbuildvm:/opt/rockstor/src/rockstor/system/tests # /opt/rockstor/.venv/bin/python -m unittest test_osi.OSITests.test_scan_disks_root_miss_attribution_min_reproducer
F
======================================================================
FAIL: test_scan_disks_root_miss_attribution_min_reproducer (test_osi.OSITests.test_scan_disks_root_miss_attribution_min_reproducer)
Miss-attribution of a data drive to the ROOT pool.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/system/tests/test_osi.py", line 3308, in test_scan_disks_root_miss_attribution_min_reproducer
    self.assertEqual(
AssertionError: Lists differ: [Disk[217 chars]rted=True, root=False, partitions={'sdag4': 'b[290 chars]s'})] != [Disk[217 chars]rted=False, root=False, partitions={}), Disk(n[259 chars]={})]

First differing element 0:
Disk([206 chars]65282', parted=True, root=False, partitions={'sdag4': 'btrfs'})
Disk([206 chars]65282', parted=False, root=False, partitions={})

- [Disk(name='sda', model='WDC WD101EMAZ-11G7DA0', serial='VCGRX3EN', size=9771050598, transport='sas', vendor='ATA', hctl='0:0:1:0', type='disk', fstype='btrfs', label='JBOD', uuid='b86538f8-e447-48e5-84ec-b72a25c65282', parted=True, root=False, partitions={'sdag4': 'btrfs'}),
?                                                                                                                                                                                                                                   -----------                    ----------------

+ [Disk(name='sda', model='WDC WD101EMAZ-11G7DA0', serial='VCGRX3EN', size=9771050598, transport='sas', vendor='ATA', hctl='0:0:1:0', type='disk', fstype='btrfs', label='JBOD', uuid='b86538f8-e447-48e5-84ec-b72a25c65282', parted=False, root=False, partitions={}),
?                                                                                                                                                                                                                                           ++++++++++++

-  Disk(name='sdag', model='PNY CS900 120GB SSD', serial='PNY0520228055010CFE7', size=115028787, transport='sata', vendor='ATA', hctl='6:0:0:0', type='disk', fstype='btrfs', label='ROOT', uuid='4ac51b0f-afeb-4946-aad1-975a2a26c941', parted=True, root=False, partitions={'sdag4': 'btrfs'})]
?                 ^^                                                                                                                                                                                                                                       ^^^^^^             ----------------

+  Disk(name='sdag3', model='PNY CS900 120GB SSD', serial='PNY0520228055010CFE7', size=115028787, transport='sata', vendor='ATA', hctl='6:0:0:0', type='disk', fstype='btrfs', label='ROOT', uuid='4ac51b0f-afeb-4946-aad1-975a2a26c941', parted=True, root=True, partitions={})]
?                 ^^^                                                                                                                                                                                                                                       ^^^^^
 : sda data member & sdag4 ROOT member confusion regression:

----------------------------------------------------------------------
Ran 1 test in 0.007s

FAILED (failures=1)
phillxnet commented 7 months ago

But again, we do have improvements to make. And one is to non special case our root partition treatment - I'll create an issue for that soon.

"Un special-case system drive btrfs-in-partition treatment" #2824

Given scan_disks() current state re 'ease of intervention', i.e. lack there of, I'll have a quick look at this new spin-off issue as it may prove to significantly assist us re addressing this current bug: which to me look to stem from our inconsistent treatment/representation of system vs data pool members.

phillxnet commented 7 months ago

Closing as initially reproduced by the new testes derived by this issues interaction (Thanks @ubenmackin) and added by way of:

"Unit test improvements re Disk miss-attribution to ROOT pool #2828" #2829

And finally fixed by the low-level improvements made by way of:

"Un special-case system drive btrfs-in-partition treatment #2824" #2835

Depends upon #2829 and Fixed by #2835

phillxnet commented 6 months ago

@ubenmackin Hello again, just to let you know that Rockstor 5.0.9-0 in testing channel updates, our 4th Stable Release Candidate (RC4), contains the fixes referenced in my prior comment here.

forum announcement of 5.0.9-0: https://forum.rockstor.com/t/v5-0-testing-channel-changelog/8898/18