Bug 44080

Summary: Device or resource busy when creating logical partition
Product: udisks Reporter: Marcin Szewczyk <freedesktop-bugzilla>
Component: operationsAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium CC: freedesktop-bugzilla
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Method 1: BLKRRPART instead of BLKPG for extended partitions
Method 2: BLKPG_ADD_PARTITION: extended part's size = 1KiB

Description Marcin Szewczyk 2011-12-22 14:29:08 UTC
Created attachment 54723 [details] [review]
Method 1: BLKRRPART instead of BLKPG for extended partitions

Package: udisks
Version: 1.0.4-2 (Debian)

When creating a logical partition right after creating the extended one, udisks
(udisks-helper-create-partition) returns with a "Device or resource busy"
error.

Forcing the kernel to reread the partition table right after extended partition
creation or informing the kernel the extended partition is 1KiB long seems to do the trick.

Here is the thread, which led me to the first method:
http://www.fedoraforum.org/forum/showthread.php?t=267085

And here is the source of the second method:
http://ftp.osuosl.org/pub/linux/utils/util-linux/libblkid-docs/libblkid-Partitions-probing.html#blkid-partition-get-size

And a similar bug in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/666038

This bug has been submitted also as:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652993
Comment 1 Marcin Szewczyk 2011-12-22 14:31:07 UTC
Created attachment 54724 [details] [review]
Method 2: BLKPG_ADD_PARTITION: extended part's size = 1KiB
Comment 2 David Zeuthen (not reading bugmail) 2012-09-28 16:20:49 UTC
Development focus is on udisks 2.0 and I think we do the right thing there otherwise please reopen. Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.