Hi all, On Tue, Oct 20, 2009 at 12:10:30AM +0200, Karel Zak wrote: > On Mon, Oct 19, 2009 at 02:29:36PM -0600, Curtis Gedak wrote: > > > > I assume (and I could be wrong here) that the kernel _can_ re-read the > > partition table because I am able to format and mount the newly created > > partition without a reboot. This leads me to believe that the return > > You can't successfully call the BLKRRPAR ioclt if there is any open > (used partition) -- see fs/partitions/check.c in Linux kernel. Try: > > # blockdev --rereadpt /dev/sda > BLKRRPART: Device or resource busy > > but you can use BLKPG_ADD_PARTITION or BLKPG_DEL_PARTITION (it means > explicitly add / remove the partition).
Yes, but this exactly the functionality that commit [1d8f9bece138e4d8e58f7b059b4195aff6f39deb linux-commit: remove the use of the BLKPG ioctl] removed from parted. > See libparted/arch/linux.c. It seems that BLKPG ioctls are preferred > method and BLKRRPAR is fallback solution only. That's no longer true (due to that commit). I agree that issuing a warning when modifying partition table on disk where some of the partitions are mounted is a good idea, however, exactly as Curtis pointed out, parted lost the ability to e.g. add new partition to the end of disk without a reboot, which I consider a regression. Just an idea: perhaps parted could selectively call BLKPG ioctls after each operation instead of deleting/adding all partitions at once as before. This could be also done only if there are some partitions mounted and thus BLKRRPART is not an option. What do you think? -- Best regards / s pozdravem Petr Uzel, openSUSE Boosters Team ----------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: [email protected] Lihovarská 1060/12 http://www.suse.cz 190 00 Prague 9, CR
pgpuB4Ebjdoj2.pgp
Description: PGP signature
_______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

