How to Update /dev/disk/by-uuid.

Asked by Ralph Corderoy on 2008-04-26

Hi, after copying partitions with gparted I had multiple partitions with the same UUID. Having now ensured there's no duplicates, `tune2fs -U random' followed by checking they're all unique with `vol_id', I find that `mount /mnt/point' still mounts the wrong partition, presumably because /etc/fstab specifies a UUID and /dev/disk/by-uuid/$UUID points to a block device that now has a different UUID. How does one get /dev/disk/by-uuid to be up to date? It seems potentially dangerous that it can be out of date, e.g. `mount /mnt/point' followed by removing data will be modifying a different partition than intended.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu udev Edit question
Assignee:
No assignee Edit question
Solved by:
Ralph Corderoy
Solved:
2008-04-26
Last query:
2008-04-26
Last reply:

I've found `sudo /etc/init.d/udev restart' does the trick. If this isn't the preferred way, please say so here for others that come Googleling later.

Michael B. Trausch (mtrausch) said : #2

sudo partprobe should do the trick, as well, without having to restart udev.

Tom Hansen (tomh-uwm) said : #3

I just added a new hard drive to a Hardy (8.04) system, and once the drive was partitioned and the ext3 partition created, `sudo partprobe' did not work. Restarting udev did work, just as noted by Mr. Corderoy above, and it did not disrupt the system. It just printed "* Loading additional hardware drivers... ", paused a few seconds, and that was it.