Bug 968318

Summary: LBA0 changed unexpectedly after partition removed and recreated in 4TB disk
Product: Red Hat Enterprise Linux 5 Reporter: Caspar Zhang <caspar>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.9CC: caspar, hongmeng
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 13:05:50 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 Caspar Zhang 2013-05-29 13:01:18 UTC
Description of problem:

When trying to install a system on a 4TB disk, we did the following operation:

remove a partition (not the first partition), and recreate it, the first sector (LBA0) of disk got changed unexpectedly, so the system is unbootable.

example:

# confirm it's 4TB disk and using GPT
#parted /dev/sda print

Model: ATA WDC WD4000FYYZ-0 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

# list first 2 sectors (LBA0 & LBA1 used by GPT)
#od -N 1024 /dev/sda
0000000 044353 000220 000000 000000 000000 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
*
0000060 000000 000000 000000 000000 000000 000000 000000 001003
0000100 000377 100000 072044 000006 004000 110372 173220 100302
0000120 001165 100262 054752 000174 030400 107300 107330 136320
0000140 020000 120373 076100 177474 001164 141210 173122 100302
0000160 052164 040664 125273 146525 055023 071122 100511 052773
0000200 072652 120103 076101 140204 002565 160603 072001 063067
0000220 046213 137020 076005 042306 000777 105546 042036 143574
0000240 010004 143400 001104 000001 104546 004134 042307 000006
0000260 063160 140061 042211 063004 042211 132014 146502 071023
0000300 135405 070000 076753 004264 011715 005163 141366 007600
0000320 170204 164400 000215 002676 143174 177504 063000 140061
0000340 170210 063100 042211 030404 104322 140712 001342 164210
0000360 172210 104500 004104 140061 150210 164300 063002 002211
0000400 120546 076104 030546 063322 032367 052210 063012 151061
0000420 173546 002164 052210 104413 006104 042073 076410 105074
0000440 006524 161300 105006 005114 140776 150410 066212 055014
0000460 072212 135413 070000 141616 155461 000670 146402 071023
0000500 106052 107303 044006 060174 134436 000400 155616 173061
0000520 177461 171774 017645 177541 041046 137174 076577 040350
0000540 165400 137016 076604 034350 165400 137006 076616 030350
0000560 137000 076623 025350 165400 043776 052522 020102 043400
0000600 067545 000155 060510 062162 042040 071551 000153 062522
0000620 062141 020000 071105 067562 000162 000673 132000 146416
0000640 126020 000074 172165 000303 000000 000000 000000 000000
0000660 000000 000000 000000 000000 000000 000000 000000 000000
0000700 000001 177356 177777 000001 000000 177777 177777 000000
0000720 000000 000000 000000 000000 000000 000000 000000 000000
*
0000760 000000 000000 000000 000000 000000 000000 000000 125125
0001000 043105 020111 040520 052122 000000 000001 000134 000000
0001020 054735 117655 000000 000000 000001 000000 000000 000000
0001040 137257 150700 000001 000000 000042 000000 000000 000000
0001060 137216 150700 000001 000000 176455 177716 032435 047057
0001100 164215 111333 102104 153156 000002 000000 000000 000000
0001120 000200 000000 000200 000000 174507 146722 000000 000000
0001140 000000 000000 000000 000000 000000 000000 000000 000000
*
0002000

# remove 5th partiton and recreate
#parted /dev/sda rm 5
Information: Don't forget to update /etc/fstab, if necessary.
#parted -s /dev/sda mkpart primary 154GB 100%

# re-check the first 2 sectors, found the content in first sector got changed and become 0000000 in some fields, which led to system un-bootable.
#od -N 1024 /dev/sda
0000000 000000 000000 000000 000000 000000 000000 000000 000000
*
0000700 000001 177356 177777 000001 000000 177777 177777 000000
0000720 000000 000000 000000 000000 000000 000000 000000 000000
*
0000760 000000 000000 000000 000000 000000 000000 000000 125125
0001000 043105 020111 040520 052122 000000 000001 000134 000000
0001020 111572 034327 000000 000000 000001 000000 000000 000000
0001040 137257 150700 000001 000000 000042 000000 000000 000000
0001060 137216 150700 000001 000000 176455 177716 032435 047057
0001100 164215 111333 102104 153156 000002 000000 000000 000000
0001120 000200 000000 000200 000000 065412 107342 000000 000000
0001140 000000 000000 000000 000000 000000 000000 000000 000000
*
0002000


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

How reproducible:
always

Steps to Reproduce:
1.  
2.
3.

Actual results:


Expected results:


Additional info:

for comparison, we built a parted-3.1 from upstream, and it worked:

#parted-3.1 /dev/sda rm 5
Information: You may need to update /etc/fstab.

#parted-3.1 -s /dev/sda mkpart primary 154GB 100%

# still valid LBA0
#od -N 1024 /dev/sda
0000000 044353 000220 000000 000000 000000 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
*
0000060 000000 000000 000000 000000 000000 000000 000000 001003
0000100 000377 100000 076074 000006 004000 110372 173220 100302
0000120 001165 100262 054752 000174 030400 107300 107330 136320
0000140 020000 120373 076100 177474 001164 141210 173122 100302
0000160 052164 040664 125273 146525 055023 071122 100511 052773
0000200 072652 120103 076101 140204 002565 160603 072001 063067
0000220 046213 137020 076005 042306 000777 105546 042036 143574
0000240 010004 143400 001104 000001 104546 004134 042307 000006
0000260 063160 140061 042211 063004 042211 132014 146502 071023
0000300 135405 070000 076753 004264 011715 005163 141366 007600
0000320 170204 164400 000215 002676 143174 177504 063000 140061
0000340 170210 063100 042211 030404 104322 140712 001342 164210
0000360 172210 104500 004104 140061 150210 164300 063002 002211
0000400 120546 076104 030546 063322 032367 052210 063012 151061
0000420 173546 002164 052210 104413 006104 042073 076410 105074
0000440 006524 161300 105006 005114 140776 150410 066212 055014
0000460 072212 135413 070000 141616 155461 000670 146402 071023
0000500 106052 107303 044006 060174 134436 000400 155616 173061
0000520 177461 171774 017645 177541 041046 137174 076577 040350
0000540 165400 137016 076604 034350 165400 137006 076616 030350
0000560 137000 076623 025350 165400 043776 052522 020102 043400
0000600 067545 000155 060510 062162 042040 071551 000153 062522
0000620 062141 020000 071105 067562 000162 000673 132000 146416
0000640 126020 000074 172165 000303 000000 000000 000000 000000
0000660 000000 000000 000000 000000 000000 000000 000000 000000
0000700 000001 177356 177777 000001 000000 177777 177777 000000
0000720 000000 000000 000000 000000 000000 000000 000000 000000
*
0000760 000000 000000 000000 000000 000000 000000 000000 125125
0001000 043105 020111 040520 052122 000000 000001 000134 000000
0001020 054364 063001 000000 000000 000001 000000 000000 000000
0001040 137257 150700 000001 000000 000042 000000 000000 000000
0001060 137216 150700 000001 000000 176455 177716 032435 047057
0001100 164215 111333 102104 153156 000002 000000 000000 000000
0001120 000200 000000 000200 000000 056475 167002 000000 000000
0001140 000000 000000 000000 000000 000000 000000 000000 000000
*
0002000

Comment 1 Brian Lane 2014-02-07 19:18:57 UTC
Upstream parted commit 14a1589194dc0adcebb6cca2ab2c2a87e1d26b38 should fix this. Note that RHEL5 doesn't support 4T disks for booting though.

Comment 2 RHEL Program Management 2014-02-25 00:14:19 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2014-03-07 13:37:33 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 4 RHEL Program Management 2014-06-02 13:05:50 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).

Comment 5 Caspar Zhang 2014-10-14 01:57:49 UTC
(In reply to RHEL Product and Program Management from comment #4)
> Thank you for submitting this request for inclusion in Red Hat Enterprise
> Linux 5. We've carefully evaluated the request, but are unable to include it
> in RHEL5 stream. If the issue is critical for your business, please provide
> additional business justification through the appropriate support channels
> (https://access.redhat.com/site/support).

fine for me. (clearing needinfo to avoid weekly mail reminder....)