re-syncing the partition table with "blockdev"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  for some time now, i've gotten used to having to reboot after creating
a new partition since (at least in some cases) the kernel is no longer
in sync with the actual partition table on the hard drive.

  from memory, someone once mentioned that this is only necessary
for logical(?) partitions, but i never really tried to remember the specific
conditions -- i just assumed, new partition ==> reboot.

  however, recently, as i was reading the LVM howto, i noticed the 
recipe for formatting a physical volume using "pvcreate" if you need
to get rid of the partition table:

  # dd if=/dev/zero of=/dev/diskname bs=1k count=1   #fair enough
  # blockdev --rereadpt /dev/diskname       # hey, what's this?

now *that's* interesting, i thought -- i'd never heard of the "blockdev"
command, and the argument of "--rereadpt" sure looks promising.
as i don't have a machine around that i can arbitrarily create a new
partition on at the moment, can anyone discuss the logistics of this
command, and whether it would really force a reread of the disk
partition table to prevent a reboot?

rday







[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux