Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1879046

Summary: parted $disk mklabel fails on newly created scsi_debug empty disk
Product: [Fedora] Fedora Reporter: Katerina Koukiou <kkoukiou>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: bcl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-15 15:43:00 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:

Description Katerina Koukiou 2020-09-15 10:20:23 UTC
Description of problem:
mklabel fails on newly created empty disk with scsi_debug with latest image update.

Version-Release number of selected component (if applicable):

parted-3.3-3.fc32.src.rpm
util-linux-2.35.2-1.fc32.src.rpm

# uname -r
5.8.8-200.fc32.x86_64

How reproducible:
Always


Steps to Reproduce:
1.
#  modprobe scsi_debug dev_size_mb=50

2. Get the created disk name:

# ls /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block
/dev/sda

3.
#  parted /dev/sda mklabel --script msdos
 

Actual results:

Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes

Additional info:

#  blkid -p /dev/sda

Has not output, so it's empty.

#  dd if=/dev/sda count=1024 | od -x
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
2000000
1024+0 records in
1024+0 records out
524288 bytes (524 kB, 512 KiB) copied, 0.0453846 s, 11.6 MB/s

Comment 1 Katerina Koukiou 2020-09-15 10:22:36 UTC
Note the blkid command I pasted in additional info section is before the parted /dev/sda mklabel.

Afterward it looks as expected:

blkid -p /dev/sda 
/dev/sda: PTUUID="118df054" PTTYPE="dos"

Comment 2 Brian Lane 2020-09-15 15:43:00 UTC
This was a kernel bug, try one of the new kernels in testing (see bug#1878858)

*** This bug has been marked as a duplicate of bug 1878858 ***