Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nvme smart bug #750

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ITJamie
Copy link
Contributor

@ITJamie ITJamie commented Aug 19, 2024

General information

some nvme disks are missing from monitoring

tested on: debian bookworm

Proposed changes

added an override to assume that any device name containing "nvme" is an nvme disk.

@martinhv
Copy link
Member

Hey @ITJamie
Thanks for your PR.
Could you please share the output of
cat /sys/block/$N/device/device/vendor

I assume in your system, the file is empty?
If so, can you just do a on ls -l /dev/disk/by-id

We need to have this as deterministic as possible. While one might assume that no one would ever call their ATA disks nvme, it would be helpful for us to get some more insights into that specific case.

@ITJamie
Copy link
Contributor Author

ITJamie commented Sep 17, 2024

ls output:

 ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Aug 19 21:11 ata-DELLBOSS_VD_39674b31f52c0010 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 19 21:11 ata-DELLBOSS_VD_39674b31f52c0010-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 19 21:11 ata-DELLBOSS_VD_39674b31f52c0010-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 19 21:11 ata-DELLBOSS_VD_39674b31f52c0010-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--134bacad--8a4f--4193--958b--e4871717c0cd-osd--block--d7387b42--59df--4cd5--82c6--0e1359ddad43 -> ../../dm-6
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--29acadf7--bc81--4245--bdbc--de094d61a4b4-osd--block--f6a494b6--7be2--423f--b9f6--2fd8db7bcbf3 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--51e44cd2--20cf--4d7b--b345--85d69e345631-osd--block--a8582b61--62ef--491d--b43b--40cfe0ab8f48 -> ../../dm-4
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--94a83039--57eb--413e--913f--d2233e20acc1-osd--block--cb71118d--c550--45ec--8d2f--63dd72945792 -> ../../dm-5
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--aed767f3--18c7--4f82--a14e--4f88a7c98da0-osd--block--ab90d48c--9832--4617--9cd5--4b9c20a9a811 -> ../../dm-3
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--bbc6faa7--688c--4f3b--95c0--700abf6e6743-osd--block--1c6f0ee6--0199--48dd--b34e--ecd7b193e064 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-name-ceph--d9f2fb3b--5991--483a--b90a--68ad8ba52e98-osd--block--b77dc831--5d40--4da4--8f68--8fb11f9b9d84 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Aug 19 21:11 dm-name-pve-root -> ../../dm-8
lrwxrwxrwx 1 root root 10 Aug 19 21:11 dm-name-pve-swap -> ../../dm-7
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-3dBCCK1Od1T2csVT9r0raUdKiVyUz01aoJKIOFXe87g4T1RbQTA2uU938vUYeQvP -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-cmiCM1UxDFmwOh1EnWhlvfg4hMGFV3Aa1JSbWI61P0FCssF7skWD3rrhGZuetSPF -> ../../dm-2
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-G5ErAGKh3GI9lffhhqMaITELkjW42RwKbY1QQQ7HKX5FDnn53FHBgd8l7aT7nPML -> ../../dm-6
lrwxrwxrwx 1 root root 10 Aug 19 21:11 dm-uuid-LVM-IZnNvumSGIjnuwZ36xiohiuLXfkAMTo63W0zT5a6ZFRBS60UcUsokPX2UG6vULva -> ../../dm-8
lrwxrwxrwx 1 root root 10 Aug 19 21:11 dm-uuid-LVM-IZnNvumSGIjnuwZ36xiohiuLXfkAMTo6YXmhtgOJJEX370negRRoPYyZIEaVgEG0 -> ../../dm-7
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-oY1r1TJ0KYEONIIq4XwxbExLmZ8EkBYalH2IM28vfXAnp4XZYmoxWqmglAHcHU7g -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-pW17GoHNDErqskfLY7orNXn3h6DuXca5rfRqATNBG2mwHGEMLLp0ci5PI0u6GPjp -> ../../dm-5
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-pyj2cxEh2PygJJfkaxVA8iYxbXuJOcGBS6VeVIoLxph7S7DgOcAo6GqvdpSIZ0EB -> ../../dm-3
lrwxrwxrwx 1 root root 10 Aug 19 21:12 dm-uuid-LVM-ZRsuRl3Lf4eHBSdiFnfmSOmLSffriQKUm8PFl20W1ImQQccDpnfd2wDy4WHSqDYs -> ../../dm-4
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-ApHRXx-onwr-YNRE-yRcp-5BHn-2HOG-38j2qB -> ../../nvme1n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-AXUtdm-vewL-TcpD-RqJV-nTV7-w0od-VvhfNt -> ../../nvme3n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-AZXH9z-DpcM-9EMs-s55S-Ajrq-NAR2-1thm3a -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-c55Wgs-0f2q-SyEF-Mdkp-9q62-xTjN-gNL0bo -> ../../nvme4n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-dZWBgY-87dn-gfcW-D0Pk-IAlL-FhrW-ZvFWb3 -> ../../nvme5n1
lrwxrwxrwx 1 root root 10 Aug 19 21:11 lvm-pv-uuid-K35qZ7-6w6b-pe2A-b7Ym-6c5W-q591-6SFjOv -> ../../sda3
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-KbyvEY-kXDQ-LOc8-dqUF-0M3l-hkkq-ypOseZ -> ../../nvme2n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 lvm-pv-uuid-VcsVo0-Q34b-Xrkg-JNKJ-Eo0S-56Vg-Jc9X1R -> ../../nvme6n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803747 -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803747_1 -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803788 -> ../../nvme1n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803788_1 -> ../../nvme1n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803807 -> ../../nvme2n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803807_1 -> ../../nvme2n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803809 -> ../../nvme6n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803809_1 -> ../../nvme6n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803831 -> ../../nvme5n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803831_1 -> ../../nvme5n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803837 -> ../../nvme4n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803837_1 -> ../../nvme4n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803840 -> ../../nvme3n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-Dell_Ent_NVMe_PM1733a_RI_7.68TB_S6V0NE0T803840_1 -> ../../nvme3n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548037470025384500000002 -> ../../nvme0n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548037880025384500000003 -> ../../nvme1n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548038070025384500000002 -> ../../nvme2n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548038090025384500000002 -> ../../nvme6n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548038310025384500000002 -> ../../nvme5n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548038370025384500000002 -> ../../nvme4n1
lrwxrwxrwx 1 root root 13 Aug 19 21:11 nvme-eui.36563030548038400025384500000002 -> ../../nvme3n1

without this fix in the pr none of these disks show up

there is no device subfolder inside the device folder on these:

ls -lah /sys/block/nvme0n1/device
lrwxrwxrwx 1 root root 0 Aug 19 21:11 /sys/block/nvme0n1/device -> ../../nvme-subsys0


cd /sys/block/nvme0n1/device
ls -lah
total 0
drwxr-xr-x 5 root root    0 Aug 19 21:11 .
drwxr-xr-x 9 root root    0 Aug 19 21:11 ..
-r--r--r-- 1 root root 4.0K Aug 19 21:11 firmware_rev
-rw-r--r-- 1 root root 4.0K Sep 17 20:38 iopolicy
-r--r--r-- 1 root root 4.0K Aug 19 21:11 model
drwxr-xr-x 3 root root    0 Aug 19 21:11 ng0n1
lrwxrwxrwx 1 root root    0 Sep 17 20:38 nvme0 -> ../../../pci0000:c0/0000:c0:03.1/0000:c1:00.0/nvme/nvme0
drwxr-xr-x 8 root root    0 Aug 19 21:11 nvme0n1
drwxr-xr-x 2 root root    0 Sep 17 20:38 power
-r--r--r-- 1 root root 4.0K Aug 19 21:11 serial
-r--r--r-- 1 root root 4.0K Sep 17 20:38 subsysnqn
lrwxrwxrwx 1 root root    0 Aug 19 21:11 subsystem -> ../../../../class/nvme-subsystem
-r--r--r-- 1 root root 4.0K Sep 17 20:38 subsystype
-rw-r--r-- 1 root root 4.0K Aug 19 21:11 uevent

os info: debian 12 base but with a more uptodate ubuntu kernel (this is how proxmox is built)

uname -a
Linux px02 6.8.8-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.8-4 (2024-07-26T11:15Z) x86_64 GNU/Linux

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants