reassign 402410 partman-auto-lvm
tags 402410 + patch pending
thanks
On Monday 11 December 2006 20:36, Mike Hommey wrote:
> the hyphen is a valid character, but it is doubled in the /dev/mapper
> device name (because the hyphen separates VG and LV names). Note that
> the /dev/$VG/$LV mapping doesn't double the hyphens.
OK. In that case I think the patch below fixes things. There already seems
to be support for "undoubling" hyphens when parsing VG/LV names
from /dev/mapper devices.
I cannot quickly find how exactly this is handled in manual partitioning
using LVM, but as it seems to work correctly there I'm not going to worry
too much about it now.
Index: perform_recipe_by_lvm
===================================================================
--- perform_recipe_by_lvm (revision 43277)
+++ perform_recipe_by_lvm (working copy)
@@ -78,7 +78,10 @@
lv_create $VG_name "$lvname" $(($1/1024)) ||
autopartitioning_failed
fi
- device=/dev/mapper/"$VG_name"-"$lvname"
+ # Hyphens in VG or LV names are doubled under /dev/mapper
+ VG_dev="$(echo "$VG_name" | sed 's/-/--/g')"
+ LV_dev="$(echo "$lvname" | sed 's/-/--/g')"
+ device=/dev/mapper/"$VG_dev"-"$LV_dev"
dirname=$(echo "$device" | sed "s:/:=:g")
dev=$DEVICES/$dirname
Attachment:
pgp9eMc9ZfCKA.pgp
Description: PGP signature