007revad / Synology_HDD_db

Add your HDD, SSD and NVMe drives to your Synology's compatible drive database
MIT License
2.21k stars 154 forks source link

"Invalid json format" syslog output #270

Open paulirish opened 3 months ago

paulirish commented 3 months ago

While running sudo journalctl -xef --no-pager during a HDD_db script update (after a DSM update).. i see these logs:

synostgdisk[13736]: disk/disk_sb_firm_status_get.cpp:141 Invalid json format: {"compatibility_interval":[{"barebone_installable":true,"compatibility":"support","fw_dsm_update_status_notify":false,"not_yet_rolling_status":"support","smart_attr_ignore":false,"smart_test_ignore":false}]}

image

The logged string is valid JSON as far as I can tell... So I'm not sure what thats about. Thoughts?

(About to reboot so we'll see if anything persists on the other side)

This was after an update from DSM 7.2.0-XXXXX Update 3 to DSM 7.2.1-69057 Update 4

paulirish commented 3 months ago

Some logs from right after the restart as bootup was finishing: image

everything looks fine otherwise.

but perhaps there's a rogue hdd db entry that's missing something key?

007revad commented 3 months ago

I get those log entries as well. I couldn't find anything invalid with the string.

You're the first person to notice and mention it.

007revad commented 3 months ago

Which version of the script did you use?

Which Synology NAS do you have? And does it have a M2D20, M2D18 or E10M20-T1 with NVMe drives installed?

I just checked all my DS1821+ .db files and ds1821+_e10m20-t1_v7.db contains an extra } on the 3rd last line (when the file is formatted).

It has this:

        }
    }
}, "nas_model": "ds1821+"
}

when it should have this:

        }
    }, "nas_model": "ds1821+"
}

Before editing the M2D20, M2D18 and E10M20-T1 db files are what I call empty db7 files:

{
    "disk_compatbility_info": {},
    "nas_model": "ds1821+"
}
007revad commented 3 months ago

I've released a new version that fixes the invalid json string issue. https://github.com/007revad/Synology_HDD_db/releases/tag/v3.4.87

It won't replace the existing invalid ]}}}}, in your db file(s) with the correct ]}}},

To fix them you can run the script with the --restore option, then run it with your preferred options.

007revad commented 3 months ago

I'm still getting those log entries after I run synostgdisk --check-all-disks-compatibility

What is strange is that none of the files in /var/lib/disk-compatibility contain the string in the log, which has the key value pairs sorted:

{
    "compatibility_interval": [{
            "barebone_installable": true,
            "compatibility": "support",
            "fw_dsm_update_status_notify": false,
            "not_yet_rolling_status": "support",
            "smart_attr_ignore": false,
            "smart_test_ignore": false
        }
    ]
}

All of the .db files in my /var/lib/disk-compatibility contain the string with key value pairs in the following order:

{
    "compatibility_interval": [{
            "compatibility": "support",
            "not_yet_rolling_status": "support",
            "fw_dsm_update_status_notify": false,
            "barebone_installable": true,
            "smart_test_ignore": false,
            "smart_attr_ignore": false
        }
    ]
}

I get one of those log entries for each drive around 5:30am every day, and then 2 more time about 13 minutes apart.

It looks like DSM checks drive compatibility every morning, as well as a boot and when a new drive is installed.