Re: Bug#597563: grub-common: grub-probe segfaults scanning lvmdevices

Re: Bug#597563: grub-common: grub-probe segfaults scanning lvmdevices

am 09.01.2011 22:57:35 von NeilBrown

--Sig_/gIZHr=rXB7xLOFWlY1/PdzA
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sun, 09 Jan 2011 22:32:01 +0100 Vladimir 'φ-coder/phcoder' Serbinen=
ko
wrote:

> On 01/09/2011 09:55 PM, NeilBrown wrote:
> > On Sat, 8 Jan 2011 17:53:07 -0500 (EST) Matthew Gabeler-Lee
> > wrote:
> >
> > =20
> >> On Sat, 8 Jan 2011, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >>
> >> =20
> >>> As was recommended I forward the remaining part to linux-raid mailing=
list.
> >>> In short: on his system mdraid, raid5, 4 devices, metadata (presumabl=
y)
> >>> 0.90, two devices have index 0.
> >>> =20
> > What do you mean by "two devices have index 0" ??? I could see nothing =
in any
> > of the posts you sent that could be interpreted that way.
> >
> > =20
> Sorry, I forgot this part:
> grub-core/disk/raid.c:699: Scanning for RAID devices on disk hd2
> grub-core/kern/disk.c:245: Opening `hd2'...
> ./grub-probe: info: the size of hd2 is 1465149168.
> error: found two disks with the number 0.
> grub-core/kern/disk.c:330: Closing `hd2'.
>=20
> Trouble comes from followint part:
> $ sudo mdadm --examine /dev/sdb
> /dev/sdb:
> Magic : a92b4efc
> Version : 0.90.03
> UUID : 9364f7a2:d74695d5:7d8db3a0:3b5f9e48
> Creation Time : Mon Mar 27 14:03:04 2006
> Raid Level : raid1
> Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
> Array Size : 979840 (957.04 MiB 1003.36 MB)
> Raid Devices : 2
> Total Devices : 3
> Preferred Minor : 0
>=20
> Update Time : Thu Jan 8 00:34:39 2009
> State : clean
> Active Devices : 2
> Working Devices : 3
> Failed Devices : 0
> Spare Devices : 1
> Checksum : 5b8134eb - correct
> Events : 9446738
> So sdb as whole pretends to be a part of the following array:
> $ sudo mdadm -QD /dev/md0
> /dev/md0:
> Version : 0.90
> Creation Time : Mon Mar 27 14:03:04 2006
> Raid Level : raid1
> Array Size : 2008000 (1961.27 MiB 2056.19 MB)
> Used Dev Size : 2008000 (1961.27 MiB 2056.19 MB)
> Raid Devices : 4
> Total Devices : 4
> Preferred Minor : 0
> Persistence : Superblock is persistent
>=20
> Update Time : Sat Jan 8 18:35:47 2011
> State : clean
> Active Devices : 4
> Working Devices : 4
> Failed Devices : 0
> Spare Devices : 0
>=20
> UUID : 9364f7a2:d74695d5:7d8db3a0:3b5f9e48
> Events : 0.10758124
>=20
> Number Major Minor RaidDevice State
> 0 8 17 0 active sync /dev/sdb1
> 1 8 33 1 active sync /dev/sdc1
> 2 8 1 2 active sync /dev/sda1
> 3 8 49 3 active sync /dev/sdd1
>=20
>=20
> As you can see there is a stalled superblock approximately 2 years old.
> I don't know if it's some kind of freak accident or operator error. If
> it's later then probably zero-filling over stalled superblock will solve
> the problems
>=20


Simply running
mdadm --zero-superblock /dev/sdb

should fix it.

NeilBrown

--Sig_/gIZHr=rXB7xLOFWlY1/PdzA
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)

iD8DBQFNKi9UG5fc6gV+Wb0RAnAUAJ9NqVMZGiox1llp40kf7Mj/3LVG0ACg 2gxy
nKZxbBpNFrYH+8gWvsSe+Nk=
=IuTv
-----END PGP SIGNATURE-----

--Sig_/gIZHr=rXB7xLOFWlY1/PdzA--
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Bug#597563: grub-common: grub-probe segfaults scanning lvm devices

am 09.01.2011 23:13:10 von Matthew Gabeler-Lee

On 1/9/2011 16:57, NeilBrown wrote:
> Simply running
> mdadm --zero-superblock /dev/sdb
>
> should fix it.
Well, that doesn't work very well: "mdadm: Couldn't open /dev/sdb for write
- not zeroing" ... strace reveals that mdadm is trying to open it O_EXCL,
which I presume is why it's not working ... I presume I'd have to reboot to
single user mode and stop the LVM and possibly MD stuff in order for that to
work, which might then require booting from a rescue cd to do it.

So I backed up the contents of the end of the disk in case I screwed up, and
then zerro'd it with dd (nervous nervous). I double-checked things with
mdadm --examine to double-check I had cleared the stray superblock and not
damaged the one in sdb3, and that looks OK

After doing that, the version of grub-probe that was crashing before appears
to work properly, and the trunk version of grub-probe no longer spits out
the warning/error. I then upgraded the debian package to the latest version
in testing (since I'd been using an old version where I could work around
the problems), and let it run the grub-install on all 4 disks, and that
proceeded without errors. Hooray :)

Thank you folks for your help solving this!

--
-Matt
"Reality is that which, when you stop believing in it, doesn't go away".
-- Philip K. Dick
GPG pubkey fingerprint: A57F B354 FD30 A502 795B 9637 3EF1 3F22 A85E 2AD1

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html