Bug 1212323
| Summary: | parted creates extended/logical partitions that are rejected by the kernel | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Marius Vollmer <mvollmer> | ||||
| Component: | parted | Assignee: | Brian Lane <bcl> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.1 | CC: | jstodola, mkovarik | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | parted-3.1-21.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause:
parted previously generated an error about notifying the kernel if a logical partition started 1 sector past the start of the extended partition.
Consequence:
Fix:
parted allows the logical partition to start 1 sector past the extended partition.
Result:
logical partitions can now start 1 sector after the extended partition and no errors are generated.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-11-19 11:34:33 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Marius Vollmer
2015-04-16 07:36:26 UTC
Forgot to add: Changing the sequence to this makes it work: # parted -s /dev/loop0 mktable msdos # parted -s /dev/loop0 mkpart extended 1 50 # parted -s /dev/loop0 mkpart logical 2 24 # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 9G 0 disk ├─vda1 252:1 0 500M 0 part /boot └─vda2 252:2 0 8.5G 0 part ├─rhel-swap 253:0 0 924M 0 lvm [SWAP] └─rhel-root 253:1 0 7.6G 0 lvm / loop0 7:0 0 50M 0 loop ├─loop0p1 259:1 0 1K 0 loop └─loop0p5 259:2 0 21M 0 loop Note that the logical partition now starts at 2, not 1. The EBUSY reported by the kernel might mean that there was an attempt to register overlapping partitions, not that some other process has the block device open. commit f503870153eda from upstream needs to be backported. Created attachment 1015370 [details]
patch
(In reply to bcl from comment #3) > commit f503870153eda from upstream needs to be backported. If this is fixed in 7.2 only, I'll be perfectly happy. The logical partition is usable now:
[root@localhost ~]# dd if=/dev/zero of=/disk1.img bs=1M count=50
50+0 records in
50+0 records out
52428800 bytes (52 MB) copied, 0.0384391 s, 1.4 GB/s
[root@localhost ~]# losetup --show -f /disk1.img
/dev/loop0
[root@localhost ~]# parted -s /dev/loop0 mktable msdos
[root@localhost ~]# parted -s /dev/loop0 mkpart extended 1 50
[root@localhost ~]# parted -s /dev/loop0 mkpart logical 1 24
Warning: The resulting partition is not properly aligned for best performance.
[root@localhost ~]# mkfs.xfs /dev/loop0p5
meta-data=/dev/loop0p5 isize=256 agcount=1, agsize=5603 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=5603, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=853, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 9G 0 disk
├─vda1 252:1 0 500M 0 part /boot
└─vda2 252:2 0 8.5G 0 part
├─rhel-root 253:0 0 7.6G 0 lvm /
└─rhel-swap 253:1 0 924M 0 lvm [SWAP]
loop0 7:0 0 50M 0 loop
├─loop0p1 259:1 0 512B 0 loop
└─loop0p5 259:2 0 21.9M 0 loop
[root@localhost ~]# parted /dev/loop0 print
Model: Loopback device (loopback)
Disk /dev/loop0: 52.4MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 50.3MB 49.3MB extended lba
5 1049kB 24.0MB 23.0MB logical xfs
[root@localhost ~]# rpm -q parted
parted-3.1-22.el7.x86_64
[root@localhost ~]#
Moving to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2309.html |