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

Identify disk by ID, not system name #73

Open
cluelessperson opened this issue Nov 30, 2018 · 11 comments
Open

Identify disk by ID, not system name #73

cluelessperson opened this issue Nov 30, 2018 · 11 comments

Comments

@cluelessperson
Copy link

Example

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

instead of

/dev/sda

which changes on reboots and such.

@cluelessperson cluelessperson changed the title Identify disk by ID, not system name Identify disk by ID, not system name, /dev/sda -> /dev/disk/by-id/ata-HGST_<MODEL>_<SERIAL> Nov 30, 2018
@cluelessperson cluelessperson changed the title Identify disk by ID, not system name, /dev/sda -> /dev/disk/by-id/ata-HGST_<MODEL>_<SERIAL> Identify disk by ID, not system name Nov 30, 2018
@rkarlsba
Copy link

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
Copy link

I just posted a pull request for this

@bbrendon
Copy link

Great idea.

@rkarlsba
Copy link

rkarlsba commented Jul 1, 2019

See pull request #106

@gabviv73
Copy link

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.

@cluelessperson
Copy link
Author

cluelessperson commented Jul 11, 2019 via email

@rkarlsba
Copy link

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.

@gabviv73
Copy link

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.

@Phlogi
Copy link

Phlogi commented Feb 27, 2020

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.

@cluelessperson
Copy link
Author

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

@rkarlsba
Copy link

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

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

No branches or pull requests

6 participants