dak180 / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS/TrueNAS
GNU General Public License v3.0
43 stars 9 forks source link

lun_list[${drive_lun_id}]: bad array subscript #34

Closed HomebrewDotNET closed 6 months ago

HomebrewDotNET commented 6 months ago

I recently changed my setup so my truenas is now in a proxmox vm.

I updated the script to v1.8.1 but I've noticed it doesn't include details about the drives anymore. I have the full HBA passed through.

This is the output I get in truenas when executing:

/mnt/Data/System/backup_truenas.sh: line 2299: lun_list: bad array subscript
/mnt/Data/System/backup_truenas.sh: line 2300: lun_list[${drive_lun_id}]: bad array subscript
Executed CronTask - /mnt/Data/System/backup_truenas.sh -c /mnt/Data/System/mail_config.cfg > /dev/null: /mnt/Data/System/backup_truenas.sh: line 2299: lun_list: bad array subscript
/mnt/Data/System/backup_truenas.sh: line 2300: lun_list[${drive_lun_id}]: bad array subscript
dak180 commented 6 months ago

@HomebrewDotNET are you running core or scale (and did that change when you went to a vm)?

HomebrewDotNET commented 6 months ago

Right forgot to mention. I'm running SCALE Dragonfish-24.04.0

dak180 commented 6 months ago

@HomebrewDotNET what is the output of ls -l "/sys/block" | grep -v 'devices/virtual' | sed -e 's:[[:blank:]]\{1,\}: :g' | cut -d ' ' -f "9" | sed -e 's:n[0-9]\{1,\}$::g' | uniq | sort -V

HomebrewDotNET commented 6 months ago

Sure. Here's the output:


sda
sdb
sdc
sdd
sde
sdf
sdg
sdh
sdi
sdj
sdk
sr0
dak180 commented 6 months ago

@HomebrewDotNET how about: smartctl -x "/dev/sr0"?

HomebrewDotNET commented 6 months ago

In the meantime I had to make some changes to my setup due to smb in Dragonfish not being stable. I'm currently back on TrueNAS-SCALE Cobia 23.10.2.

I also made some changes to my disks so the output is now:


nvme0
sda
sdb
sdc
sdd
sde
sdf
sdg
sdh
sdi
sdj

I think the sr0 disk was the nvme that truenas identified as QEMU HARDISK. Output of the script is still the same through.

Here is the output for /dev/nvme0 though:

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.74-production+truenas] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       PCIe3 3.2TB NVMe Flash Adapter II x8
Serial Number:                      S3RWNA0K300082
Firmware Version:                   MN12MN12
PCI Vendor ID:                      0x144d
PCI Vendor Subsystem ID:            0x1014
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 3,200,631,791,616 [3.20 TB]
Unallocated NVM Capacity:           631,791,616 [631 MB]
Controller ID:                      33
NVMe Version:                       1.2.1
Number of Namespaces:               32
Local Time is:                      Tue May  7 14:56:28 2024 CEST
Firmware Updates (0x16):            3 Slots, no Reset required
Optional Admin Commands (0x000e):   Format Frmw_DL NS_Mngmt
Optional NVM Commands (0x003e):     Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Resv
Log Page Attributes (0x02):         Cmd_Eff_Lg
Maximum Data Transfer Size:         256 Pages
Warning  Comp. Temp. Threshold:     80 Celsius
Critical Comp. Temp. Threshold:     87 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +    25.00W       -        -    0  0  0  0      100     100

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        47 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    9,239,074 [4.73 TB]
Data Units Written:                 11,516,657 [5.89 TB]
Host Read Commands:                 56,145,146
Host Write Commands:                49,661,982
Controller Busy Time:               123
Power Cycles:                       16
Power On Hours:                     101
Unsafe Shutdowns:                   0
Media and Data Integrity Errors:    0
Error Information Log Entries:      5
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               47 Celsius
Temperature Sensor 2:               45 Celsius
Temperature Sensor 3:               45 Celsius

Error Information (NVMe Log 0x01, 16 of 256 entries)
Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS  Message
  0          5     0  0x3001  0x422a  0x000            0     0     -  Namespace Insufficient Capacity
  1          4     0  0x2003  0x422a  0x000            0     0     -  Namespace Insufficient Capacity
  2          3     0  0x3012  0x422a  0x000            0     0     -  Namespace Insufficient Capacity
  3          2     0  0xb015  0x422a  0x000            0     0     -  Namespace Insufficient Capacity
  4          1     0  0x1009  0x422a  0x000            0     0     -  Namespace Insufficient Capacity

Self-tests not supported
dak180 commented 6 months ago

@HomebrewDotNET try d85027b and let me know if that works.

HomebrewDotNET commented 6 months ago

That seemed to have worked :)

I see the details again.

I now get these errors though:

(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 22: syntax error
(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 22: syntax error
(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 2: illegal character: :
(standard_in) 2: syntax error
(standard_in) 3: illegal character: :
(standard_in) 4: illegal character: :
(standard_in) 5: illegal character: :
(standard_in) 6: illegal character: :
(standard_in) 7: illegal character: :
(standard_in) 8: illegal character: :
(standard_in) 9: illegal character: :
(standard_in) 9: syntax error
(standard_in) 10: illegal character: :
(standard_in) 11: illegal character: :
(standard_in) 12: illegal character: :
(standard_in) 13: illegal character: :
(standard_in) 14: illegal character: :
(standard_in) 15: illegal character: :
(standard_in) 16: illegal character: :
(standard_in) 17: syntax error
(standard_in) 18: illegal character: :
(standard_in) 19: illegal character: :
(standard_in) 19: syntax error
(standard_in) 20: illegal character: :
(standard_in) 22: syntax error
(standard_in) 22: syntax error

Just copied the raw git file so could be on my end

dak180 commented 6 months ago

@HomebrewDotNET the only way to know for sure would be to run it with set -x and look through the output; also a dump file would be useful (add -d to the script invocation).

dak180 commented 6 months ago

@HomebrewDotNET or instead of editing the script you could invoke it with bash -x <path to script and options>.

KitterFox commented 6 months ago

These new lines get everything working fabulously for me (on Truenas SCALE Bluefin 23). Thank you for the update.

dak180 commented 6 months ago

Fixed in d85027b.