* disk Partition label changes and reflecting them in /dev/disks-by-label/
@ 2009-07-19 15:01 Linda Walsh
2009-07-19 16:22 ` Alan Jenkins
0 siblings, 1 reply; 3+ messages in thread
From: Linda Walsh @ 2009-07-19 15:01 UTC (permalink / raw)
To: LKML
If I have a disk with no mounted partitions and I change the partition
order,
the OS will re-read the new partition and life goes on.
However, if I create or change a new disk label, it seems label programs
(and users) should have an option to reread the labels after the
modification.
Ideally any prog that changes a Label or UUID would trigger an update
of what's in /dev/disks to reflect the new 'reality'.
Currently, I go through through a seemingly bizarre ritual of invoking
unmounting all other partitions on the same disk, then becoming root,
running fdisk on the disk, then just exiting with "w". This triggers
a reread of not only the partition table, but also the new labels.
However, I find this far less than ideal. Is there a better way, or could
there be a better way to update new Labels and UUID's that are actually
on a disk -- perhaps even as an ordinary user command (since it would be
a read-only operation on the disk that simply updates /dev/disk to reflect
what's really there -- Especially being able to change only the label (or
UUID), only on one partition w/o having to actually unmount other file
systems
on the disk....?
Already implemented? Or doable? Or bad idea?
Thanks,
-linda
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: disk Partition label changes and reflecting them in /dev/disks-by-label/
2009-07-19 15:01 disk Partition label changes and reflecting them in /dev/disks-by-label/ Linda Walsh
@ 2009-07-19 16:22 ` Alan Jenkins
2009-07-19 18:19 ` Mark Lord
0 siblings, 1 reply; 3+ messages in thread
From: Alan Jenkins @ 2009-07-19 16:22 UTC (permalink / raw)
To: Linda Walsh; +Cc: LKML
On 7/19/09, Linda Walsh <lkml@tlinx.org> wrote:
>
>
> If I have a disk with no mounted partitions and I change the partition
> order,
> the OS will re-read the new partition and life goes on.
>
> However, if I create or change a new disk label, it seems label programs
> (and users) should have an option to reread the labels after the
> modification.
>
> Ideally any prog that changes a Label or UUID would trigger an update
> of what's in /dev/disks to reflect the new 'reality'.
>
> Currently, I go through through a seemingly bizarre ritual of invoking
> unmounting all other partitions on the same disk, then becoming root,
> running fdisk on the disk, then just exiting with "w". This triggers
> a reread of not only the partition table, but also the new labels.
>
> However, I find this far less than ideal. Is there a better way, or could
> there be a better way to update new Labels and UUID's that are actually
> on a disk -- perhaps even as an ordinary user command (since it would be
> a read-only operation on the disk that simply updates /dev/disk to reflect
> what's really there -- Especially being able to change only the label (or
> UUID), only on one partition w/o having to actually unmount other file
> systems
> on the disk....?
>
> Already implemented? Or doable? Or bad idea?
>
> Thanks,
> -linda
Already implemented :-).
The latest version of udev listens for inotify events on block
devices. When a utility writes to the block device (or rather, when
it closes it after opening it for writing), Udev will synthesize a
"change" event. The standard udev rules will re-check the device, and
update the links under /dev/disk to reflect changes in labels etc.
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: disk Partition label changes and reflecting them in /dev/disks-by-label/
2009-07-19 16:22 ` Alan Jenkins
@ 2009-07-19 18:19 ` Mark Lord
0 siblings, 0 replies; 3+ messages in thread
From: Mark Lord @ 2009-07-19 18:19 UTC (permalink / raw)
To: Alan Jenkins; +Cc: Linda Walsh, LKML
Alan Jenkins wrote:
>
> The latest version of udev listens for inotify events on block
> devices. When a utility writes to the block device (or rather, when
> it closes it after opening it for writing), Udev will synthesize a
> "change" event. The standard udev rules will re-check the device, and
> update the links under /dev/disk to reflect changes in labels etc.
..
Yes, it seems to catch LABEL changes just fine.
On a related note:
But not UUID changes for some reason (?).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-19 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-19 15:01 disk Partition label changes and reflecting them in /dev/disks-by-label/ Linda Walsh
2009-07-19 16:22 ` Alan Jenkins
2009-07-19 18:19 ` Mark Lord
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.