refresh partition table
dhenderson at digital-pipe.com
Mon May 16 15:09:12 UTC 2011
On 05/16/2011 10:52 AM, David Henderson wrote:
> On 05/15/2011 04:27 PM, Sergey Naumov wrote:
>> blockdev --rereadpt
>> Sergey Naumov.
> I've run into an interesting problem by using the above syntax.
> Apparently when I issue that command "blockdev --rereadpt /dev/sde",
> it removes all the device's partition files (e.g. /dev/sde1) and
> leaves the one for the drive itself (e.g. /dev/sde). If I unplug the
> device and plug it back in, the correct device files populate again.
> So it appears that mdev is working right, but the blockdev is not.
> Any ideas why blockdev would be doing this?
Just to add a few more details. I have a card reader that occupies
/dev/sda through /dev/sdd. If I insert an SD card with 2 partitions and
wait for mdev to populate the device files, wait a few seconds, then
issue the blockdev command, it wipes out those partition files too (e.g.
/dev/sdb1). If I issue the blockdev command on the device files for the
card reader that don't have any inserted media, I get the error message
"blockdev: can't open '/dev/sda': No medium found". This tells me that
blockdev can actually see if a device is present and that the devices
files are populated correctly. I just have no idea why it wouldn't be
working correctly. I've also tried:
# hdparm -z /dev/sde
So you can see that it's failing too. I think, however, hdparm isn't
the best choice to use for USB attached devices. Thoughts anyone?
More information about the busybox