zbx-smartctl icon indicating copy to clipboard operation
zbx-smartctl copied to clipboard

Identify disk by ID, not system name

Open cluelessperson opened this issue 5 years ago • 11 comments

Example

/dev/disk/by-id/ata-HGST_<MODEL>_<SERIAL>

instead of

/dev/sda

which changes on reboots and such.

cluelessperson avatar Nov 30 '18 09:11 cluelessperson

I would like this change very much. I've seen spurious false positives after device names change. This is possibly a linux issue, so it should be checked if the machine is running linux first. I'll try to fix it myself, perhaps…

rkarlsba avatar Jun 29 '19 13:06 rkarlsba

I just posted a pull request for this

rkarlsba avatar Jun 30 '19 13:06 rkarlsba

Great idea.

bbrendon avatar Jun 30 '19 23:06 bbrendon

See pull request #106

rkarlsba avatar Jul 01 '19 06:07 rkarlsba

I suggest by-path, not by-id, because one can change sata hot swap disk daily to take backups. Same disk path, but different disk id. Path never changes.

gabviv73 avatar Jul 11 '19 16:07 gabviv73

Agreed

On Thu, Jul 11, 2019, 9:04 AM GabrieleV [email protected] wrote:

I suggest by-path, not by-id, because one can change sata hot swap disk daily to take backups. Same disk path, but different disk id. Path never changes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/v-zhuravlev/zbx-smartctl/issues/73?email_source=notifications&email_token=ABK7ZNIUE6ERP4M6DLXCVQLP65K2DA5CNFSM4GHNF3F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZXFZRI#issuecomment-510549189, or mute the thread https://github.com/notifications/unsubscribe-auth/ABK7ZNLTFCG6O5ZTYHCIGB3P65K2DANCNFSM4GHNF3FQ .

cluelessperson avatar Jul 11 '19 17:07 cluelessperson

I still like by-id better, since if you were to accidentially reorder the disks, they stay the same. Also, I would never use hotplugging disks for backup. Backups go over the net.

rkarlsba avatar Jul 12 '19 07:07 rkarlsba

I would be nice to have a config entry to choose from by-id, by-path. We use hotplugging to take backup media offsite manually.

gabviv73 avatar Jul 12 '19 08:07 gabviv73

I fully agree that this pull request is important, as the disk enumeration changes too often between reboots. Also, if there is historic data, e.g. temperature, it's difficult to track a specific device when the identifier changes.

Phlogi avatar Feb 27 '20 13:02 Phlogi

I noticed this is marked as an "enhancement" I suggest it's more of a bug.

cluelessperson avatar Jun 30 '20 07:06 cluelessperson

I don't know why this hasn't been pulled. The code is rather straight-forward.

rkarlsba avatar Jun 30 '20 10:06 rkarlsba