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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s