From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ObCyb-0008Lv-Jh for mharc-grub-devel@gnu.org; Tue, 20 Jul 2010 09:35:17 -0400 Received: from [140.186.70.92] (port=40301 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObCyZ-0008Le-2G for grub-devel@gnu.org; Tue, 20 Jul 2010 09:35:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObCyX-0007jY-Jr for grub-devel@gnu.org; Tue, 20 Jul 2010 09:35:14 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:60588) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObCyX-0007iv-AI for grub-devel@gnu.org; Tue, 20 Jul 2010 09:35:13 -0400 Received: by bwz9 with SMTP id 9so3656432bwz.0 for ; Tue, 20 Jul 2010 06:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=hD2rnKMnqy9KR4cajApLuT4IB6uXDVlQ3/zPECVkf3I=; b=QYpYJ462DtZpE057NHUoJNn7M8aVrQWfjsoWgB6EWuP6teJgDQH8PKoCfQRBb311uZ fD56vebsbEM2Zva2LINMLy0rVd8I5nAMWHOfrI9bzk7YVmtSlEuCCcFHJfyyxZiwzBL1 sYpixzl8ElSv69bM/IS0CQsiZ2czwH5AMQYcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=tevlR5X/s9HalyUabGdPnWilhfekYcMa27R0LhzV+4c7NIt+EXd03I8doomuehOZlr jwf6XV89LWpvgyFVt8CChzTblj7qojFEz7D2JXkU9Tbq+cYiElA3SjYmOHnK8aAxn5Lp qxVR3ehieOOgWN0B5VwSyAO5r0sx22/5dcqXk= Received: by 10.204.81.14 with SMTP id v14mr5144155bkk.7.1279632912164; Tue, 20 Jul 2010 06:35:12 -0700 (PDT) Received: from debian.bg45.phnet ([81.62.128.73]) by mx.google.com with ESMTPS id a11sm28071990bkc.12.2010.07.20.06.35.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 06:35:11 -0700 (PDT) Message-ID: <4C45A606.8010201@gmail.com> Date: Tue, 20 Jul 2010 15:35:02 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 MIME-Version: 1.0 To: grub-devel@gnu.org References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig98AD9F78E4ECF29F89807A12" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Software RAID (fakeraid) support for Linux device mapper X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 13:35:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig98AD9F78E4ECF29F89807A12 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/14/2010 06:52 PM, Raphael Bossek wrote: > Hi folks, > > I'm using Debian GNU/Linux "squeeze/sid" with Linux > 2.6.32-5-686-bigmem were my two harddisks are configured in Software > RAID (aka faikraid). > Because faikraid did not work for me especialy since udev version 158 > where /dev/mapper/pdc_* are symlinked to /dev/dm-* nodes I tried > myself in coding GRUB and fixed all my issues with the applied patches > (based on 1.98 bzr 20100710 as provided by Debian; 1.98+20100710-1). > > 1) zcat bossekr-mdraidorlvm.patch.gz | patch -p1 > 2) zcat bossekr-fakeraid.patch | patch -p1 > > =20 Please avoid compressing patches. Perhaps it saved you 0.1 seconds of transfer time but it delayed the review because it's so annoying to have to exit from mailer for this. static int -grub_util_is_dmraid (const char *os_dev) +grub_util_is_lvm (const char *os_dev) { if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19)) return 1; nvidia_ isn't lvm-related. Why do you want to name it lvm? - if (!strncmp (os_dev, "/dev/md", 7)) + if (grub_util_is_mdraid (os_dev)) Since this function isn't reused it only increases number of lines of cod= e. + if (! realpath (os_dev, path)) + return 1; We use realpath (os_dev, NULL); + + return ! strncmp (path, "/dev/dm-", 8); This check fails if devices in mapper aren't symlinks. Aren't there any better way using libraries? +#ifdef HAVE_DEVICE_MAPPER + GRUB_DEV_ABSTRACTION_DM, +#else + GRUB_DEV_ABSTRACTION_DM_RESERVE_THIS_VALUE_NOTFORUSE, +#endif Why do you need distinguish dm from mdraid. In any case #if is useless: just use: + GRUB_DEV_ABSTRACTION_DM, > The solution was to improve the support for /dev/dm- device nodes. > > Greetings, > Raphael Bossek > > Here some additional information about my setup: > > $ cat /proc/cmdline > BOOT_IMAGE=3D/boot/vmlinuz-2.6.32-5-686-bigmem > root=3DUUID=3D081cf388-6820-4843-a4d5-9f0d4be424ef ro quiet splash > > $ cat /proc/self/mountinfo > 14 19 0:0 / /sys rw,nosuid,nodev,noexec,relatime - sysfs none rw > 15 19 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc none rw > 16 19 0:5 / /dev rw,relatime - devtmpfs none > rw,size=3D2064088k,nr_inodes=3D212971,mode=3D755 > 17 16 0:11 / /dev/pts rw,nosuid,noexec,relatime - devpts none > rw,gid=3D5,mode=3D620,ptmxmode=3D000 > 19 1 254:3 / / rw,relatime - ext4 > /dev/disk/by-uuid/081cf388-6820-4843-a4d5-9f0d4be424ef > rw,errors=3Dremount-ro,barrier=3D1,data=3Dordered > 20 19 0:15 / /lib/init/rw rw,nosuid,relatime - tmpfs tmpfs rw,mode=3D75= 5 > 21 16 0:16 / /dev/shm rw,nosuid,nodev,relatime - tmpfs tmpfs rw > 23 19 0:17 / /var/lib/nfs/rpc_pipefs rw,relatime - rpc_pipefs rpc_pipef= s rw > 24 14 0:18 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw > 25 15 0:19 / /proc/fs/nfsd rw,relatime - nfsd nfsd rw > 26 15 0:20 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime > - binfmt_misc binfmt_misc rw > > $ ls -1l /dev/mapper/ > crw------- 1 root root 10, 59 Jul 14 12:56 control > lrwxrwxrwx 1 root root 7 Jul 14 12:56 pdc_fcgchefh -> ../dm-0 > lrwxrwxrwx 1 root root 7 Jul 14 12:56 pdc_fcgchefh1 -> ../dm-1 > lrwxrwxrwx 1 root root 7 Jul 14 12:56 pdc_fcgchefh2 -> ../dm-2 > lrwxrwxrwx 1 root root 7 Jul 14 12:56 pdc_fcgchefh3 -> ../dm-3 > > $ ls -1l /dev/dm-* > brw-rw---- 1 root disk 254, 0 14. Jul 11:45 /dev/dm-0 > brw-rw---- 1 root disk 254, 1 14. Jul 10:56 /dev/dm-1 > brw-rw---- 1 root disk 254, 2 14. Jul 10:56 /dev/dm-2 > brw-rw---- 1 root disk 254, 3 14. Jul 10:56 /dev/dm-3 > =20 > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig98AD9F78E4ECF29F89807A12 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAkxFpgYACgkQNak7dOguQgmvrgD/UtW5rcw4eoCIx83CcTyDz8ZC eO/Tb0nE/9EgHs9ajFUA/iWXoS01UmrcsFa++8nHpEZ2TJ1RTmsn7iyKSXrFietL =KnN6 -----END PGP SIGNATURE----- --------------enig98AD9F78E4ECF29F89807A12--