Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275566 - Broken grub install, devices created for dmraid raid sets do not match fdisk output
Summary: Broken grub install, devices created for dmraid raid sets do not match fdisk ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-27 06:31 UTC by devsk
Modified: 2009-09-10 18:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description devsk 2009-06-27 06:31:07 UTC
fdisk -l /dev/mapper/isw_<blah> shows names which don't end in isw_<blah>p<number> but the partition files in /dev/mapper have isw_<blah>p<number> format.

In a strange twist, fdisk -l /dev/dm-0 shows names with have dm-0p<number> format whereas the devices created in /dev/dm* are without the 'p' in them.

All this means is that any tool which uses fdisk like algorithm to determine the device files to 'open' to read the partitions, will fail. This includes 'grub'. This is the reason for the famous 'Error 22: No such partition' error while doing a 'setup (hd0)' where (hd0) represents the dmraid raid disk.

I got this error from grub while trying to setup MBR on my RAID0. I debugged it and found the reason. Once I made a symlink for isw_<blah>2 pointing to isw_<blah>p2, grub worked without issues.

I have no patch at this time because I don't know where to fix this: dmraid or device-mapper. Anybody with that knowledge here?
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-04 23:34:57 UTC
Probably dmraid, as device-mapper just provides the base table support.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2009-07-07 15:33:45 UTC
sys-fs/dmraid-1.0.0_rc15 currently provides partition entries with the "p<number>" suffix, however it has other issues with intel hardware that i'm currently trying to resolve.  You could give it a try?

Note, though, that grub may still try and install to the non-devmapped drive unless you map (hd0) and (hd0,0) to /dev/mapper/isw_[ident] first (see gentoo-wiki)

Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2009-07-07 15:36:49 UTC
Oh, wait -- sorry, i was reading that backwards.  OK, so the issue is that you have the "p<number>" mapping presently (from _rc15) and that's causing problems.  Cool.  I have a patch that fixes that (ie, returns the /dev/mapper entries back to the way they were with _rc14 and previous -- without the "p").  I'm planning to integrate that into the next update (soon) unless there is any opposition..?
Comment 4 devsk 2009-09-05 07:16:35 UTC
(In reply to comment #3)
> Oh, wait -- sorry, i was reading that backwards.  OK, so the issue is that you
> have the "p<number>" mapping presently (from _rc15) and that's causing
> problems.  Cool.  I have a patch that fixes that (ie, returns the /dev/mapper
> entries back to the way they were with _rc14 and previous -- without the "p"). 
> I'm planning to integrate that into the next update (soon) unless there is any
> opposition..?
> 

Let's get this going please! This bug is very annoying.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2009-09-10 15:52:28 UTC
Fixed in dmraid-1.0.0_rc15-r1.
Comment 6 devsk 2009-09-10 18:18:48 UTC
(In reply to comment #5)
> Fixed in dmraid-1.0.0_rc15-r1.
> 

r1 did not have files/dmraid-*.patch. Can you please check if this was missed somehow.
Comment 7 Thomas Sachau gentoo-dev 2009-09-10 18:29:33 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Fixed in dmraid-1.0.0_rc15-r1.
> > 
> 
> r1 did not have files/dmraid-*.patch. Can you please check if this was missed
> somehow.
> 

i added them at the time of closing this bug, might need some hours until your local rsync mirror has the patches.