[Dmraid-debian-commits] [SCM] Maintenance of the dmraid package branch, master, updated. debian/1.0.0.rc15-1.exp7-2-g68c7ed1
Giuseppe Iuculano
giuseppe at iuculano.it
Sat Feb 14 14:11:17 UTC 2009
The following commit has been merged in the master branch:
commit fc70eecda7c10df30577dd5c69fbd73391e7eaaf
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date: Sat Feb 14 12:09:48 2009 +0100
debian/patches/13_rm_partitions.patch: Make --rm_partitions work with older kernels which return EINVAL when trying to remove a partition with a number > 16 - Document --rm_partitions in the man page
diff --git a/debian/patches/13_rm_partitions.patch b/debian/patches/13_rm_partitions.patch
index b4e4cbf..ecf04a9 100644
--- a/debian/patches/13_rm_partitions.patch
+++ b/debian/patches/13_rm_partitions.patch
@@ -32,7 +32,7 @@ Description: Add patch adding --rm_partitions cmdline option and functionality
#endif
--- /dev/null
+++ b/1.0.0.rc15/lib/device/partition.c
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Hans de Goede <hdegoede at redhat.com>, Red Hat Inc.
+ * All rights reserved.
@@ -64,7 +64,8 @@ Description: Add patch adding --rm_partitions cmdline option and functionality
+
+ /* There is no way to enumerate partitions */
+ for (part.pno = 1; part.pno <= 256; part.pno++) {
-+ if (ioctl(fd, BLKPG, &io) < 0 && errno != ENXIO)
++ if (ioctl(fd, BLKPG, &io) < 0 && errno != ENXIO &&
++ (part.pno < 16 || errno != EINVAL))
+ LOG_ERR(lc, 0,
+ "removing part %d from %s: %s\n",
+ part.pno, rd->di->path,
@@ -192,3 +193,26 @@ Description: Add patch adding --rm_partitions cmdline option and functionality
};
/*
+--- a/1.0.0.rc15/man/dmraid.8
++++ b/1.0.0.rc15/man/dmraid.8
+@@ -8,6 +8,7 @@ dmraid \- discover, configure and activa
+ [\-f|--format FORMAT[,FORMAT...]]
+ [{-P|--partchar} CHAR]
+ [\-p|--no_partitions]
++ [\-Z|--rm_partitions]
+ [\--separator SEPARATOR]
+ [\-t|--test]
+ [RAID-set...]
+@@ -110,7 +111,11 @@ In case metadata format handlers are cho
+ Useful if devices have multiple metadata signatures.
+ When activating RAID sets,
+ .B -p
+-disables the activation of partitions on them.
++disables the activation of partitions on them, and
++.B -Z
++will make dmraid tell the kernel to remove the partitions from the disks
++underlying the set, ie if sda is part of the set, remove sda1, sda2, etc.
++This prevents applications from directly accessiong the disks bypassing dmraid.
+ RAID set names given on command line don't need to be fully specified
+ (eg, "dmraid \-ay sil" would activate all discovered Silicon Image Medley
+ RAID sets).
--
Maintenance of the dmraid package
More information about the Dmraid-debian-commits
mailing list