May 25, 201511 yr Hello, For a plugin I am working on: Does anyone know (definitely) when the device name (sda, adb, ...) given to HDD/CD-DVD ROMs devices change? is it only when connecting it to a different SATA port? Or can it change for other reasons? Thanks
May 25, 201511 yr Once a device is connected it will hold that alias. If a a new device is connected it will get the next alias. However you cannot guarantee it will be the same alias each time obviously. Also if a drive drops and comes up it may get a new alias. sd* is not a good way to address things far better to look at more modern alternatives such as UUID etc
May 25, 201511 yr Author Once a device is connected it will hold that alias. If a a new device is connected it will get the next alias. However you cannot guarantee it will be the same alias each time obviously. Also if a drive drops and comes up it may get a new alias. sd* is not a good way to address things far better to look at more modern alternatives such as UUID etc For my plugin I need to know when a drive has physically been connected to a different SATA port - is this possible? Edit: I will try use lsscsi. /dev/disk/by-path does not show all devices for some reason.
May 25, 201511 yr Once a device is connected it will hold that alias. If a a new device is connected it will get the next alias. However you cannot guarantee it will be the same alias each time obviously. Also if a drive drops and comes up it may get a new alias. sd* is not a good way to address things far better to look at more modern alternatives such as UUID etc For my plugin I need to know when a drive has physically been connected to a different SATA port - is this possible? Edit: I will try use lsscsi. /dev/disk/by-path does not show all devices for some reason. Good tip sparky. Curious about by-path though wonder why that is not defitnitve. Also udev can be your friend it is super powerful
Archived
This topic is now archived and is closed to further replies.