Jobst Schmalenbach
2019-Feb-28 03:12 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
Hi I have read instructions for udev, I also found many example on how to do this. I want to lock in the SDA/SDB/SDC for my drives and I came up with a rule like this KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_SERIAL}=="ST500DM002-1BC142_W2A56H8A", NAME="sda", RUN+="/usr/bin/logger ID_SERIAL=$ENV{ID_SERIAL} set to /dev/sda ", GOTO="END_PERSISTENT_DISK" However, it is not clear to me is in what files I need to add my rules. Do I add a random file "99-my-rules.rules" in "/etc/udev/rules.d/"? Do I copy a file from "/usr/lib/udev" to "/etc/udev/rules.d/" and add my rules? Do I need to be careful with the NUMBER, e.g. "60-my-rule.rules"? Jobst -- 186,262 miles/second : Not just a good idea, it's the LAW. | |0| | Jobst Schmalenbach, General Manager | | |0| Barrett & Sales Essentials |0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
Nicolas Kovacs
2019-Feb-28 16:19 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?:> I want to lock in the SDA/SDB/SDC for my drivesIn short : use UUIDs or labels instead of hardcoding /dev/sdX. https://wiki.archlinux.org/index.php/persistent_block_device_naming Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
mark
2019-Feb-28 16:44 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
Nicolas Kovacs wrote:> Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?: > >> I want to lock in the SDA/SDB/SDC for my drives > > In short : use UUIDs or labels instead of hardcoding /dev/sdX. > > https://wiki.archlinux.org/index.php/persistent_block_device_namingYeah - I strongly believe in labels, given the fact that *no* one can remember a UUID.... mark
Jobst Schmalenbach
2019-Mar-01 04:04 UTC
[CentOS] What files to edit when changing the sdX of hard drives?
On Thu, Feb 28, 2019 at 05:19:49PM +0100, Nicolas Kovacs (info at microlinux.fr) wrote:> Le 28/02/2019 ? 04:12, Jobst Schmalenbach a ?crit?: > > I want to lock in the SDA/SDB/SDC for my drives > > In short : use UUIDs or labels instead of hardcoding /dev/sdX.I **KNOW** how to use UUID's ... this is NOT the reason why I am doing this! I *NEED* the order of the disks to be SDA(1st BIOS drive) SDB(2nd BIOS drive) SDC(3rd BIOS drive) and not SDA (1st BIOS drive) SDB(3rd BIOS drive) SDC (2nd BIOS drive). Reason: it stuffs up the use of grub2* utilities leaving behind a bunch of error messages. The SDA (1st BIOS drive) and SDB (2nd BIOS drive) are part of a MDADM raid(1) system. As soon as I plug in the third drive, the OS (or systemD) decides to put it into the SDB spot - I do NOT want that. When I the use any of the grub2 utils I end up with "missing drive" errors. If I leave the drive out NO problem. I have managed twice to have the machine booting with the third drive as SDC, when that happens I I do not get any error messages. Jobst -- Why is the man who invests all your money called a broker? | |0| | Jobst Schmalenbach, General Manager | | |0| Barrett & Sales Essentials |0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
Apparently Analagous Threads
- What files to edit when changing the sdX of hard drives?
- What files to edit when changing the sdX of hard drives?
- Problem with mdadm, raid1 and automatically adds any disk to raid
- sendmail, port 465/587, auth and imap
- Problem with IPTABLES logging message to the screen/console