[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Software Raid not autodetected with bsd disklabel



Thank's, I'll give that a try.  BTW, fdisk had no option for
linux_raid_autodetect in the bsd disklabel section.  Do i just put fd at
the prompt?
Thank's
Mike

On Mon, Aug 25, 2003 at 12:29:52AM -0400, Tom Vier wrote:
> oops, screwed up the formatting.
> 
> diff -urN linux-2.4.10-ac7-patched-build/fs/partitions/osf.c linux-2.4.10-ac7-patched-build-osf/fs/partitions/osf.c
> --- linux-2.4.10-ac7-patched-build/fs/partitions/osf.c  Sat Oct  6 13:25:48 2001
> +++ linux-2.4.10-ac7-patched-build-osf/fs/partitions/osf.c      Sat Oct  6 13:25:20 2001
> @@ -7,6 +7,7 @@
>   *  Re-organised Feb 1998 Russell King
>   */
> 
> +#include <linux/config.h>
>  #include <linux/fs.h>
>  #include <linux/genhd.h>
>  #include <linux/kernel.h>
> @@ -17,6 +18,10 @@
>  #include "check.h"
>  #include "osf.h"
> 
> +#if CONFIG_BLK_DEV_MD
> +extern void md_autodetect_dev(kdev_t dev);
> +#endif
> +
>  int osf_partition(struct gendisk *hd, struct block_device *bdev,
>                 unsigned long first_sector, int current_minor)
>  {
> @@ -74,10 +79,16 @@
>         for (i = 0 ; i < le16_to_cpu(label->d_npartitions); i++, partition++) {
>                 if ((current_minor & mask) == 0)
>                         break;
> -               if (le32_to_cpu(partition->p_size))
> -                       add_gd_partition(hd, current_minor,
> -                               first_sector+le32_to_cpu(partition->p_offset),
> -                               le32_to_cpu(partition->p_size));
> +               if (le32_to_cpu(partition->p_size)) {
> +                               add_gd_partition(hd, current_minor,
> +                                       first_sector+le32_to_cpu(partition->p_offset),
> +                                       le32_to_cpu(partition->p_size));
> +#if CONFIG_BLK_DEV_MD
> +                               if (partition->p_fstype == LINUX_RAID_PARTITION) {
> +                                       md_autodetect_dev(MKDEV(hd->major,current_minor));
> +                               }
> +#endif
> +               }
>                 current_minor++;
>         }
>         printk("\n");
> 
> -- 
> Tom Vier <tmv@comcast.net>
> DSA Key ID 0xE6CB97DA
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

-- 
  To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public.
  	-- Theodore Roosevelt



Reply to: