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

RE: [linux-lvm] Root + Software RAID 1 in partition + LVM + Reiserfs

There is a very similar thread called [linux-lvm] pvcreate fails on a
software RAID metadisk
I'm posting the patch to it too...

> > pvcreate /dev/md1 complained about using a Linux SWAP partition
> Did you change the partition type with fdisk to be the LVM partition type?
> Hmm, I suppose that if you are using MD RAID autostart, you need to have
> that partition type instead.
> > I tweaked lvm_check_partitioned_device to have it return FALSE for MD
> > devices. This would probably prevent me from partitioning any
> MD device. But
> > I won't anyway... that's what I use LVM for.
> I don't think you CAN partition an MD device and use it (what
> would the minor
> numbers be?).  Please submit the patch.

Please beware. This patch is the quick and dirty type. I have no idea as to
its implications except I know it will prevent from partitioning MD devices.
diff -ru 1.0.1-rc2/tools/lib/lvm_check_partitioned_dev.c
--- 1.0.1-rc2/tools/lib/lvm_check_partitioned_dev.c	Mon Aug 20 17:17:56 2001
+++ slp-1.0.1-rc2/tools/lib/lvm_check_partitioned_dev.c	Thu Oct  4 14:47:37
@@ -55,6 +55,8 @@
 	switch (lvm_get_device_type(st_rdev)) {
+	case 2:	/* YAL: MD device on partition. Won't partition it. */
+		break;
 	    ret = TRUE;
> Cheers, Andreas
> --
> Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
>                  \  would they cancel out, leaving him still hungry?"
> http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


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