UUID anomaly

Nils Kassube kassube at gmx.net
Sat Jul 10 05:03:07 UTC 2010


Florian Diesch wrote:
> Nils Kassube <kassube at gmx.net> writes:
> > Nowadays I avoid the blkid command and
> > use
> > 
> > ls -l /dev/disk/by-*/
> > 
> > instead. I'm quite confident that the output of this command is
> > real and not from a cache file.
> 
> I'm not sure if that reflects a UUID change by e.g. tune2fs in real
> time as that may not fire an udev event (I didn't check this).

Good point. I just tried what happens if I create / change / remove a 
disk label of one partition and afterwards check the links in 
/dev/disk/by-label/. I used the commands

sudo tune2fs -L NEWLABEL /dev/sda1;ls -l /dev/disk/by-label/

where I changed NEWLABEL each time. Sometimes the new label was shown 
immediately but usually it was still the old label. However if I 
inserted a

sleep 1

between the commands, it always showed the new label. So your assumption 
was right, it is not updated in real time. But in real life the update 
seems to be fast enough.


Nils




More information about the ubuntu-users mailing list