From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Software RAID (fakeraid) support for Linux device mapper
Date: Tue, 20 Jul 2010 15:35:02 +0200 [thread overview]
Message-ID: <4C45A606.8010201@gmail.com> (raw)
In-Reply-To: <AANLkTimuEVXO54WIN0jcJdaMgteiUA6F-TqGB4IrZqor@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3769 bytes --]
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
>
>
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 code.
+ 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=/boot/vmlinuz-2.6.32-5-686-bigmem
> root=UUID=081cf388-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=2064088k,nr_inodes=212971,mode=755
> 17 16 0:11 / /dev/pts rw,nosuid,noexec,relatime - devpts none
> rw,gid=5,mode=620,ptmxmode=000
> 19 1 254:3 / / rw,relatime - ext4
> /dev/disk/by-uuid/081cf388-6820-4843-a4d5-9f0d4be424ef
> rw,errors=remount-ro,barrier=1,data=ordered
> 20 19 0:15 / /lib/init/rw rw,nosuid,relatime - tmpfs tmpfs rw,mode=755
> 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_pipefs 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
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2010-07-20 13:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 16:52 [PATCH] Software RAID (fakeraid) support for Linux device mapper Raphael Bossek
2010-07-20 13:35 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-07-22 19:59 ` Raphael Bossek
2010-07-27 10:00 ` Raphael Bossek
2010-08-05 8:34 ` Raphael Bossek
2010-09-16 10:36 ` Colin Watson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C45A606.8010201@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.