莱因电博

Li-e.cn

Li Internet Electronic Blog
@rss

Using udev to bind my disk(SATA) link in Linux

————————————————————

Note: This method is suitable for situations where there is only one no-system disk.

Firstly, I need to know if my hard drive is working in ATA or SCSI.

Using the udevam command, I know that my hard drive works on scsi :

udevadm info -a -n /dev/<name>

Now, I can create a unique device symbol for it. I plan to use udev rules.

KERNEL=="sd*", SUBSYSTEMS=="scsi", ACTION=="add", ATTRS{vendor}=="ATA*", MODE="0660", SYMLINK+="mySATA"

In this way, I will be able to access it permanently using mySATA.

Why do you do that? Sometimes USB drives always use system symbols incorrectly, and I have to do that.

(C) 2019 - 2024 Li-e.cn莱因电博(立网电子博客) | Powered by Vercel , based on Hugo with Gists theme.