[parted-devel] Warning message if create partition when a partition is mounted

Petr Uzel petr.uzel at suse.cz
Thu Dec 3 13:43:59 UTC 2009


On Wed, Dec 02, 2009 at 05:06:08PM +0100, Karel Zak wrote:
> On Wed, Dec 02, 2009 at 03:40:09PM +0100, Petr Uzel wrote:
> >
> > Just an idea: perhaps parted could selectively call BLKPG ioctls after
> > each operation instead of deleting/adding all partitions at once as
> 
>  Hmm.. is it good idea to force system to use your partitions when you
>  are still working on the partition table?

Frankly, I don't know :)
 
>  Anyway, Hans' note from the commit 1d8f9bece138e4d8e58f7b059b4195aff6f39deb
>  about parted's vs. kernel's view is still valid:
> 
>     An even bigger problem IMHO is the use of the BLKPG ioctl instead of
>     BLKRRPART at all. What this does is tell the kernel parted's view of
>     the partition table and make it use that, instead of telling the
>     kernel to reread the partition table.  According to the parted sources
>     this is done for the case where the kernel does not know the disklabel
>     type. However as soon as the system is rebooted, the system will be
>     using the kernel's view.

I agree that doing BLKRRPART by default is good decision. However,
parted's ability to change partition table on disk where some of the
partitions were mounted was cool and now it is lost.

 
> > before. This could be also done only if there are some partitions
> > mounted and thus BLKRRPART is not an option. What do you think?
> 
>  From my point of view BLKRRPART-only solution (without BLKPG_* ioctls) 
>  is not so bad idea. Don't forget that we have partx(8), addpart(8) or
>  delpart(8) for advanced users.

Good point. But if kpartx can do it, why parted couldn't? :)
 
>     Karel

-- 
Best regards / s pozdravem

Petr Uzel, openSUSE Boosters Team
-----------------------------------------------------------------
SUSE LINUX, s.r.o.                          e-mail: puzel at suse.cz
Lihovarská 1060/12                          http://www.suse.cz
190 00 Prague 9, CR                             
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20091203/53554f7d/attachment.pgp>


More information about the parted-devel mailing list