Bug 906847 - btrfs support breaks software raid
Summary: btrfs support breaks software raid
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: os-prober
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hedayat Vatankhah
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-01 16:56 UTC by H.J. Lu
Modified: 2013-02-16 01:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-16 00:58:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description H.J. Lu 2013-02-01 16:56:56 UTC
My machine has software raid:

[root@gnu-3 boot]# blkid
/dev/sda: TYPE="promise_fasttrack_raid_member" 
/dev/sdb: TYPE="promise_fasttrack_raid_member" 
/dev/mapper/pdc_biehcghfjcp8: UUID="c45758b7-0d71-4137-97f4-abff9f596457" TYPE="swap" 
/dev/mapper/pdc_biehcghfjcp9: UUID="1b4b961f-7beb-4107-8d3c-ea6fc4a4aada" TYPE="ext4" 
/dev/dm-12: LABEL="/export" UUID="2e53fbaf-1a07-4eb6-82b3-f6c737471593" TYPE="ext3" 
/dev/dm-1: UUID="a1893a01-c609-4dc7-8deb-eeeafc279bff" TYPE="ext4" 
/dev/dm-10: UUID="2889dff3-124c-4314-81af-5dd3e1d7c675" TYPE="ext4" 
/dev/dm-2: UUID="4ac784f2-e01d-423a-ad7f-8f5d2581d14b" TYPE="ext3" 
/dev/dm-3: UUID="0cbe36c6-2206-4bd2-ac13-1cf4672d612b" TYPE="ext4" 
/dev/dm-5: UUID="85f23229-dd96-447e-8d13-d05386434456" TYPE="ext4" 
/dev/dm-6: UUID="5f77b5e3-948c-4527-b2af-1b3757fc28c3" TYPE="ext3" 
/dev/dm-7: UUID="d6634e3d-c7d3-4319-83d0-a36dc5c49f10" TYPE="ext4" 
/dev/dm-9: UUID="1b4b961f-7beb-4107-8d3c-ea6fc4a4aada" TYPE="ext4" 
[root@gnu-3 boot]# dmraid -s -c
ERROR: ddf1: seeking device "/dev/dm-4" to 18446744073709421056
ERROR: hpt37x: seeking device "/dev/dm-4" to 4608
ERROR: hpt45x: seeking device "/dev/dm-4" to 18446744073709547008
ERROR: pdc: seeking device "/dev/dm-4" to 137438913024
ERROR: pdc: seeking device "/dev/dm-4" to 137438920192
ERROR: pdc: seeking device "/dev/dm-4" to 137438927360
ERROR: pdc: seeking device "/dev/dm-4" to 137438934528
ERROR: sil: seeking device "/dev/dm-4" to 18446744073709289984
pdc_bigbhfbaei
pdc_biehcghfjc
[root@gnu-3 boot]# ls /dev/mapper/
control         pdc_biehcghfjcp1   pdc_biehcghfjcp2  pdc_biehcghfjcp4  pdc_biehcghfjcp6  pdc_biehcghfjcp8  pdc_bigbhfbaei
pdc_biehcghfjc  pdc_biehcghfjcp10  pdc_biehcghfjcp3  pdc_biehcghfjcp5  pdc_biehcghfjcp7  pdc_biehcghfjcp9  pdc_bigbhfbaeip1
[root@gnu-3 boot]# 

pdc_biehcghfjcp4 (aka "/dev/dm-4") is the extended partition.

/bin/os-prober has

set -e
...
for partition in $(partitions); do
...
  type=$(blkid -o value -s TYPE $mapped)
...
done

We got

[root@gnu-3 boot]# blkid -o value -s TYPE /dev/dm-1
ext4
[root@gnu-3 boot]# blkid -o value -s TYPE /dev/dm-4
[root@gnu-3 boot]# echo $?
2
[root@gnu-3 boot]# 

Due to "set -e", blkid -o value -s TYPE /dev/dm-4 will
terminate the FOR loop and skip the rest of partitions.

Change

type=$(blkid -o value -s TYPE $mapped)

to

type=$(blkid -o value -s TYPE $mapped || true)

fixes the problem.

Comment 1 Hedayat Vatankhah 2013-02-02 19:41:45 UTC
Thank you for reporting the problem. The fix will be applied in the next build.

Comment 2 Fedora Update System 2013-02-05 18:47:39 UTC
os-prober-1.57-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/os-prober-1.57-2.fc17

Comment 3 Fedora Update System 2013-02-05 18:48:25 UTC
os-prober-1.57-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/os-prober-1.57-2.fc18

Comment 4 Fedora Update System 2013-02-08 02:03:10 UTC
Package os-prober-1.57-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing os-prober-1.57-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2012/os-prober-1.57-2.fc17
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-02-16 00:58:51 UTC
os-prober-1.57-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2013-02-16 01:03:19 UTC
os-prober-1.57-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.