Gnome Disks Rescan Partition Tables

Sometimes gnome-disk-utility will does not update partition info after re-partitioning a disk. For example, attach a blank usb drive to a vm and then run an installation. The installation will re-partition the disk but gnome-disk still shows the drive as blank (which should probably be reported as a bug).

blockdev --rereadpt /dev/sdX

These following commands do update the kernel, but do not solve the issue with gnome-disk-utility. Seems like the kernel is not notifying the d-bus layer or something…

# partprobe /dev/sdX
# hdparm -z /dev/sdX
# sfdisk -R /dev/sdX


How can I stop Gnome Shell’s drive pop up notifications?

Disable the disk-mount notification popup…


Navigate to org > gnome > desktop > media-handling and then check the “autorun-never” box.

command line:

gsettings set autorun-never true