
On 21/03/2021 10.19, Dave Howorth wrote:
On Sun, 21 Mar 2021 01:07:09 -0400 David T-G <davidtg-robot@justpickone.org> wrote:
Felix, et al --
...and then Felix Miata said... % % David T-G composed on 2021-03-21 00:48 (UTC-0400): % % > How does a swap partition (swap volume?) have a volume label, though?!? % % mkswap -L swapperlabel /dev/sd....
Well. Um. That was simple :-) Thanks!
Now ... How can I *change* a swap label? <poke> Ahhhh... Thank you, man(1) with the -k flag!
diskfarm:~ # swaplabel -L diskfarm-swap /dev/sda1 diskfarm:~ # swaplabel /dev/sda1 LABEL: diskfarm-swap UUID: 3982f3a2-3e59-4658-b18d-5a036572c6c7
Ta-daaaaa!
Indeed, and for those curious about spaces in names:
# swaplabel /dev/sda7 UUID: 964c2f38-5789-4fe6-b6e5-65c0b486ee7c # swaplabel -L 'swap partition' /dev/sda7 # swaplabel /dev/sda7 LABEL: swap partition UUID: 964c2f38-5789-4fe6-b6e5-65c0b486ee7c # ls -goh /dev/disk/by-label/ | grep swap lrwxrwxrwx 1 10 Mar 21 09:11 swap\x20partition -> ../../sda7 #
So I think it is possible to have spaces in volume labels and the /dev/disk/by-label/ hierarchy encodes them.
Ok, so a bug report is missing: YaST must handle the situation, in whatever direction. David, it's on you to write it ;-) Like... "somehow (unknown how) a partition was labelled with a space and yast did not handle it. No error printed, no correct handling when writing grub" etc etc. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)