The officially official Devuan Forum!

You are not logged in.

#1 2021-06-09 19:39:34

Altoid
Member
Registered: 2017-05-07
Posts: 785  

UUID and drive letter assignments

Hello:

My Devuan box has four SAS drive slots, an on-board USB socket and room to comfortably install an additional two or three 2.5" drives.

I use UUID to keep the installation behaving properly (so to speak) but although this works, drive letters move around between UUIDs if I add a drive.

This affects my conky output by mean of which I monitor drive temperatures.

/dev/sda: +${execi 60 hddtemp /dev/disk/by-uuid/d6841f29-e39b-4c87-9c52-3a9c3bafe2d3 | cut -c 81-84}
/dev/sdb: +${execi 60 hddtemp /dev/disk/by-uuid/49d1369c-ed70-4543-b0ee-ef65327e101b | cut -c 83-86}
/dev/sdc: +${execi 60 hddtemp /dev/disk/by-uuid/bdf33361-5929-433e-ac7f-1a626aa6e844 | cut -c 78-81}
/dev/sdd: +${execi 60 hddtemp /dev/disk/by-uuid/7a33fda5-abda-451b-b6ef-c17553c78810 | cut -c 83-86}
/dev/sde: +${execi 60 hddtemp /dev/disk/by-uuid/ca8dbded-819d-4e2b-b017-0981a75ea718 | cut -c 101-104}

           

When I added an old SATA drive for testing purposes, drive letters got shuffled down, the new drive became /dev/sda and the one that was /dev/sda became /dev/sdb.
So, while I am still monitoring a specific drive's temperature, I sort of lost as to which drive it is.

It's just a labelling but it is what I use to ID the drives and their temperatures via conky.

Maybe I should skip the /dev/sdx system and just go with something like Drive N?

Comments welcome.

Thanks in advance,

A.

Last edited by Altoid (2021-06-09 21:06:02)

Offline

#2 2021-06-09 19:43:34

Dutch_Master
Member
Registered: 2018-05-31
Posts: 192  

Re: UUID and drive letter assignments

Never tried it myself, but at least in theory you should be able to assign letters to specific UUID's using (e)udev rules.

I think.... roll

Offline

#3 2021-06-09 23:43:51

GlennW
Member
Registered: 2019-07-18
Posts: 126  

Re: UUID and drive letter assignments

I have a similar problem with harddrives and conky, but for me it's monitoring disk space.

The last thing I remember changing was installing a test drive of kali to a spare drive,

but repartitioning that hd caused a re-organisation of drive letters.

I formatted all the swap partitions, just to start clean, and reparted sdg for a kali test drive. (nero, new kde next)

I manage to stay on top of it, but it's a bit of a pain...

just now while reading your post I realised the diskspace for / and /home were accounting for sdc, not sda (kali on sdg).

I'll keep tabs on this to see what happens. And I'll post back if I find a solution. I love my conky.

Offline

#4 2021-06-10 00:32:23

Altoid
Member
Registered: 2017-05-07
Posts: 785  

Re: UUID and drive letter assignments

Hello:

Dutch_Master wrote:

... should be able to assign letters to specific UUID's using (e)udev rules.

I think it may be easier to just assign labels instead of saying /dev/sdx.

eg:

SATA1: +${execi 60 hddtemp /dev/disk/by-uuid/d6841f29-e39b-4c87-9c52-3a9c3bafe2d3 | cut -c 81-86} 

Thanks for your input.

Best,

A.

Offline

#5 2021-06-10 00:35:54

Altoid
Member
Registered: 2017-05-07
Posts: 785  

Re: UUID and drive letter assignments

Hello:

GlennW wrote:

... for me it's monitoring disk space.

I monitor disk space like this:

 DISKS
 ${hr 2}
 / $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
 ${fs_bar /}
 /home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
 ${fs_bar /home}
 /media/backups $alignc ${fs_used /media/backups} / ${fs_size /media/backups} $alignr ${fs_used_perc /media/backups}%
 ${fs_bar /media/backups}
 /var/log $alignc ${fs_used /var/log} / ${fs_size /var/log} $alignr ${fs_used_perc /var/log}%
 ${fs_bar /var/log}

Not my doing but cannot recall the source.
Thanks for your input.

Best,

A.

Offline

#6 2021-06-10 17:41:36

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,615  
Website

Re: UUID and drive letter assignments

Dutch_Master wrote:

you should be able to assign letters to specific UUID's using (e)udev rules

^ This: https://wiki.debian.org/Persistent_disk … e_solution

Doesn't work with systemd-udev but eudev might be more compliant.


Black Lives Matter

Online

Board footer