[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Too many levels of symbolic links



Le 22-01-2021, à 13:21:53 -0600, David Wright a écrit :

On Fri 22 Jan 2021 at 08:06:37 (+0100), steve wrote:
Le 21-01-2021, à 20:41:05 -0600, David Wright a écrit :

> I always archive the output of udevadm for my disks (actually
> I just copy the /run/udev/data/b8\:* files).

I don't understand.

I keep a log for each of my hard drives, its acquisition, SMART
history, partitioning, filesystems, usage, problems, etc.
At the end of my opinions come the facts, the output of
udevadm info --query=all --name=/dev/sdX    and
udevadm info --query=all --name=/dev/sdXN   for all N.
By that means, I have information available for a drive even
when its host is powered off, or the drive is in storage.

When I edit said log file on the system that it attaches to,
I could update all the udevadm information by removing the
old version and then appending it again by running udevadm
several times. But instead I usually copy in the appropriate
subset of files /run/udev/data/b8\:* that contain almost all
the same information, just for convenience as I'm already in
an editor. Here's a small sample (pruned with grep) of that
information being obtained from each of those sources:

$ for j in '' 1 2 3 4 5 6 ; do udevadm info --query=all --name=/dev/sda$j ; done | grep -e 'ID_FS_UUID='
E: ID_FS_UUID=9a3fa215-a749-47f4-a33e-5708097634b2
E: ID_FS_UUID=10358228-7f4b-49ec-8864-2547e27bccdb
E: ID_FS_UUID=33c3cbeb-ee4b-4a21-9899-49e546f024de
E: ID_FS_UUID=98f15f4c-e3fc-45f3-aa15-3774e012e996
$

$ grep -e 'ID_FS_UUID=' /run/udev/data/b8\:?
/run/udev/data/b8:3:E:ID_FS_UUID=9a3fa215-a749-47f4-a33e-5708097634b2
/run/udev/data/b8:4:E:ID_FS_UUID=10358228-7f4b-49ec-8864-2547e27bccdb
/run/udev/data/b8:5:E:ID_FS_UUID=33c3cbeb-ee4b-4a21-9899-49e546f024de
/run/udev/data/b8:6:E:ID_FS_UUID=98f15f4c-e3fc-45f3-aa15-3774e012e996
$

Ok I got it, thanks for the explanation. As a matter of fact, I never user 'udevadm' before today, never needed
it I guess.


Reply to: