Re: Is it possible to create several LV on a VG with different names using partman ?

2008-08-04 Thread Christian Perrier
Quoting Justin B Rye ([EMAIL PROTECTED]):

  _Description: No physical volume defined in volume group
   The automatic partitioning recipe contains the definition of a
   volume group that does not contain any physical volume.
   .
   Alternatively, please check the automatic partitioning recipe.
^
 What's this option an alternative to? 

Nice catch. I was trying to factorize paragraphs to save some l10n
work but, here, this is not possible and Alternatively in the secodn
case should be dropped.







signature.asc
Description: Digital signature


Re: Is it possible to create several LV on a VG with different names using partman ?

2008-08-02 Thread Christian Perrier
I apparently missed that this proposam contains new debconf
templates. Please find my comments on the wording, below.

(debian-l10n-english CC'ed)

 +Template: partman-auto-lvm/no_such_pv
 +Type: error
 +_Description: Inexistant PV declared
 + A Volume Group definition contains a reference to a Physical Volume
 + that is not present. 
 + .
 + Check for you connectivity or the recipe.

These templates are missing the sublevel markers. I propose to use 3
as translation sublevel, just like all other RAID/LVM related stuff
(except partman-auto-lvm which inadvertently uses sublevel 1 for everything
which is B.A.D.)

Rewrite proposal:

Template: partman-auto-lvm/no_such_pv
Type: error
# :sl3:
_Description: Non-existing physical volume
 A volume group definition contains a reference to a non-existing
 physical volume.
 .
 Please check that all devices are properly connected.
 Alternatively, please check the automatic partitioning recipe.

I'm puzzled by the latter paragraph, which is definitely not correct
(I suppose you meant your).

Your connectivity would be incorrect anyway, this is not the user's
connectivity this is about the conenctivity of the machine, or the
hardware, or whatever :-)

I therefore assumed you wanted to talk about the hardware connectivity.

 +
 +Template: partman-auto-lvm/no_pv_in_vg
 +Type: error
 +_Description: No PV defined for creating VG
 + The recipe contains the definition of a Volume Group without
 + any Physical Volume in it.
 + .
 + Review the recipe.

Template: partman-auto-lvm/no_pv_in_vg
Type: error
# :sl3:
_Description: No physical volume defined in volume group
 The automatic partitioning recipe contains the definition of a
 volume group that does not contain any physical volume.
 .
 Alternatively, please check the automatic partitioning recipe.


Here, I dropped for creating to better fit other LVM-related
templates' wording.



signature.asc
Description: Digital signature


Re: Is it possible to create several LV on a VG with different names using partman ?

2008-08-02 Thread Jérémy Bobbio
On Sat, Aug 02, 2008 at 08:40:58AM +0200, Christian Perrier wrote:
 I apparently missed that this proposam contains new debconf
 templates. Please find my comments on the wording, below.
 […]
 These templates are missing the sublevel markers. I propose to use 3
 as translation sublevel, just like all other RAID/LVM related stuff
 (except partman-auto-lvm which inadvertently uses sublevel 1 for everything
 which is B.A.D.)

As far as I understand, this error should only be seen when erroneous
custom expert recipes for LVM partioning are specified.  This is a
really specific use and I think sublevel 4 or 5 would be better suited.

Cheers,
-- 
Jérémy Bobbio.''`. 
[EMAIL PROTECTED]: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature


Re: Is it possible to create several LV on a VG with different names using partman ?

2008-08-02 Thread Justin B Rye
Christian Perrier wrote:
 +_Description: Inexistant PV declared
[...]
 Rewrite proposal:
 
 Template: partman-auto-lvm/no_such_pv
 Type: error
 # :sl3:
 _Description: Non-existing physical volume

(Non-existing always makes me slightly unsure, but I suppose it's
right; it means not already created, so it's slightly more
informative than nonexistent... and certainly better than the
inexistant word inexistant).

[...]
  Please check that all devices are properly connected.
  Alternatively, please check the automatic partitioning recipe.
[...]
 _Description: No physical volume defined in volume group
  The automatic partitioning recipe contains the definition of a
  volume group that does not contain any physical volume.
  .
  Alternatively, please check the automatic partitioning recipe.
   ^
What's this option an alternative to?
-- 
JBR with qualifications in linguistics, experience as a Debian
sysadmin, and probably no clue about this particular package


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-26 Thread Grégory Oestreicher
OK, I managed to get qemu running in a sid chroot and to access it via serial 
console. This is for the good part.

Le jeudi 24 juillet 2008 11:05, Jérémy Bobbio a écrit :
 Please also test normal guided partitioning using LVM and LVM+crypto,
 if you can.

Now the bad part is that the base recipes doesn't work with the patch applied. 
I'll do some debugging, trying to trace what have changed, and come back with 
a working patch.

Cheers,
Grégory


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-25 Thread Grégory Oestreicher
Le jeudi 24 juillet 2008 11:05, Jérémy Bobbio a écrit :
 Try passing -std-vga, as I think vesamenu might be the issue.

 Another more twisted way to workaround graphic card issues:
[cut]

Thanks for the hints, but that didn't help. I can see the boot menu, but after 
choosing a simple install it then get stuck on booting kernel. More verbose 
output didn't help me sort out the issue, as well as fiddling with various 
qemu flags.

 Please also test normal guided partitioning using LVM and LVM+crypto,
 if you can.

Good point, I didn't thought of LVM+crypto. I plan to do the same tests than I 
did back in february for my first patch, which include testing all base 
recipes, plus some tests designed specially to test the good behavior of the 
new features (with a device not declared in the recipe, with a device 
missing, and so on). Everything was OK last time, and I have good hope it's 
still the case.

Cheers,
Grégory


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-24 Thread Grégory Oestreicher
 On Wed, Jul 23, 2008 at 10:19:20PM +0200, Grégory Oestreicher wrote:
 I was planning to have another look at it soon, but if you have the time
 to update and test it before that, that would indeed be great. :)

Well I had some time to merge both patches by hand (not a big deal) and
they still apply to the latest SVN of all required packages.

However I could not test it yet as I wasn't able to boot any Lenny CD
image (bot genuine or remastered for the tests) using qemu on an Etch
system. While I search a workaround, I attach the patch and the test
recipes modified to add some randomly placed lvname{ } to this message
in case someone has the possibility to test them. When tested, they can be
added to the bugreport.

Cheers,
GrégoryIndex: packages/partman/partman-auto-lvm/debian/partman-auto-lvm.templates
===
--- packages/partman/partman-auto-lvm/debian/partman-auto-lvm.templates	(révision 54546)
+++ packages/partman/partman-auto-lvm/debian/partman-auto-lvm.templates	(copie de travail)
@@ -42,3 +42,19 @@
  the volume group.
  .
  Check /var/log/syslog or see virtual console 4 for the details.
+
+Template: partman-auto-lvm/no_such_pv
+Type: error
+_Description: Inexistant PV declared
+ A Volume Group definition contains a reference to a Physical Volume
+ that is not present. 
+ .
+ Check for you connectivity or the recipe.
+
+Template: partman-auto-lvm/no_pv_in_vg
+Type: error
+_Description: No PV defined for creating VG
+ The recipe contains the definition of a Volume Group without
+ any Physical Volume in it.
+ .
+ Review the recipe.
Index: packages/partman/partman-auto-lvm/lib/auto-lvm.sh
===
--- packages/partman/partman-auto-lvm/lib/auto-lvm.sh	(révision 54546)
+++ packages/partman/partman-auto-lvm/lib/auto-lvm.sh	(copie de travail)
@@ -10,14 +10,48 @@
 	exit 1
 }
 
+# This function was copied from another file (partman-auto/lib/initial_auto).
+# Maybe it should be useful to put it in auto-shared.sh or in base.sh
+dev_to_partman () {
+	local dev_name=$1
+	local dev
+
+	local mapped_dev_name=$(mapdevfs $dev_name)
+	if [ -n $mapped_dev_name ]; then
+		dev_name=$mapped_dev_name
+	fi
+
+	for dev in $DEVICES/*; do
+		[ -d $dev ] || continue
+
+		# mapdevfs both to allow for different ways to refer to the
+		# same device using devfs, and to allow user input in
+		# non-devfs form
+		if [ $(mapdevfs $(cat $dev/device)) = $dev_name ]; then
+			echo $dev
+		fi
+	done
+}
+
 auto_lvm_prepare() {
-	local dev method size free_size normalscheme target
+	local dev method size free_size normalscheme target extra_devices tmpdev tmpdevdir physdev
 	dev=$1
 	method=$2
 
 	[ -f $dev/size ] || return 1
 	size=$(cat $dev/size)
 
+	extra_devices=''
+	if db_get partman-auto-lvm/extra_devices  [ $RET ]; then
+		for tmpdev in $RET; do
+			tmpdevdir=$(dev_to_partman $tmpdev)
+			if [ -d $tmpdevdir ]; then
+size=$(($size + $(cat $tmpdevdir/size)))
+extra_devices=$extra_devices $tmpdevdir
+			fi
+		done
+	fi
+
 	# Be sure the modules are loaded
 	modprobe dm-mod /dev/null 21 || true
 	modprobe lvm-mod /dev/null 21 || true
@@ -26,21 +60,32 @@
 		log-output -t update-dev update-dev
 	fi
 
-	target=$(humandev $(cat $dev/device)) - $(cat $dev/model)
+	if [ $extra_devices ]; then
+		for extradev in $dev $extra_devices; do
+			extradev_str=$extradev_str $(cat $extradev/device)
+		done
+		target=Multiple disks ($extradev_str)
+	else
+		target=$(humandev $(cat $dev/device)) - $(cat $dev/model)
+	fi
 	target=$target: $(longint2human $size)
 	free_size=$(expr 000$size : '0*\(..*\)..$') # convert to megabytes
 
 	choose_recipe lvm $target $free_size || return $?
 
-	auto_init_disk $dev || return $?
+	size=0
+	for tmpdev in $dev $extra_devices; do
+		auto_init_disk $tmpdev || return $?
+		size=$(($size + $free_size))
 
-	# Check if partition is usable; use existing partman-auto template as we depend on it
-	if [ $free_type = unusable ]; then
-		db_input critical partman-auto/unusable_space || true
-		db_go || true
-		return 1
-	fi
-	free_size=$(expr 000$free_size : '0*\(..*\)..$') # convert to megabytes
+		# Check if partition is usable; use existing partman-auto template as we depend on it
+		if [ $free_type = unusable ]; then
+			db_input critical partman-auto/unusable_space || true
+			db_go || true
+			return 1
+		fi
+	done
+	free_size=$(expr 000$size : '0*\(..*\)..$') # convert to megabytes
 
 	decode_recipe $recipe lvm
 
@@ -88,11 +133,6 @@
 		;;
 	esac
 
-	# Creating envelope
-	scheme=$normalscheme${NL}100 1000 10 ext3 \$primary{ } method{ $method }
-
-	expand_scheme
-
 	clean_method
 
 	# This variable will be used to store the partitions that will be LVM
@@ -101,27 +141,65 @@
 	# (still one atm)
 	devfspv_devices=''
 
-	create_primary_partitions
+	# Creating envelope
+	# Only if one does not already exist (identified by 'method{ lvm }' and by 
+	# the current device 

Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-24 Thread Jérémy Bobbio
On Thu, Jul 24, 2008 at 08:06:43AM +0200, Grégory Oestreicher wrote:
  On Wed, Jul 23, 2008 at 10:19:20PM +0200, Grégory Oestreicher wrote:
  I was planning to have another look at it soon, but if you have the time
  to update and test it before that, that would indeed be great. :)
 
 Well I had some time to merge both patches by hand (not a big deal) and
 they still apply to the latest SVN of all required packages.
 
 However I could not test it yet as I wasn't able to boot any Lenny CD
 image (bot genuine or remastered for the tests) using qemu on an Etch
 system.

Try passing -std-vga, as I think vesamenu might be the issue.

Another more twisted way to workaround graphic card issues:
 * Start qemu with -nographic,
 * Press Control-a, then c,
 * Type sendkey tab, then sendkey spc, then sendkey c, then
   (ommiting sendkey) 'o', 'n', 's', 'o', 'l', 'e', 'equal', 't', 't',
   'y', 'shift-s', '0' and finally 'ret'.
 * Press Control-a, then c again, and you should be in front of a
   d-i through serial console installation.

 While I search a workaround, I attach the patch and the test recipes
 modified to add some randomly placed lvname{ } to this message in
 case someone has the possibility to test them. When tested, they can
 be added to the bugreport.

Please also test normal guided partitioning using LVM and LVM+crypto,
if you can.

Cheers,
-- 
Jérémy Bobbio.''`. 
[EMAIL PROTECTED]: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature


Is it possible to create several LV on a VG with different names using partman ?

2008-07-23 Thread BUFFARD Adrien
Hello everybody,

I'm currently creating a debian autoinstaller and I'm facing issues
creating partitions with partman.
I would like to create a VG called name with LV on it called lv_home,
lv_tmp,lv_usr,lv_var, etc ...
Is it possible to include the creation of those VG and LVs using d-i
preseed configuration file ?

Thank you

Council of Europe
Network Services



Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-23 Thread Jérémy Bobbio
On Wed, Jul 23, 2008 at 09:54:12AM +0200, BUFFARD Adrien wrote:
 I'm currently creating a debian autoinstaller and I'm facing issues
 creating partitions with partman.
 I would like to create a VG called name with LV on it called lv_home,
 lv_tmp,lv_usr,lv_var, etc ...
 Is it possible to include the creation of those VG and LVs using d-i
 preseed configuration file ?

Not currently, but there is two patches against partman-auto-lvm that
needs to be merged and tested.  See #462396 [1] for Volume Group naming
support and #484272 [2] for Logical Volume naming support.

[1] http://bugs.debian.org/462396
[2] http://bugs.debian.org/484272

Cheers,
-- 
Jérémy Bobbio.''`. 
[EMAIL PROTECTED]: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature


Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-23 Thread Grégory Oestreicher
Hi,

Le mercredi 23 juillet 2008 11:21, Jérémy Bobbio a écrit :
  Is it possible to include the creation of those VG and LVs using d-i
  preseed configuration file ?

 Not currently, but there is two patches against partman-auto-lvm that
 needs to be merged and tested.  See #462396 [1] for Volume Group naming
 support and #484272 [2] for Logical Volume naming support.

I totally missed your patch, and both completes really well. If it's OK with 
you I can merge them, and at the same time check that mine still applies 
correctly to the SVN tree (I doubt this because of changes in the latest 
versions of partman-*).

Cheers,
Grégory


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Is it possible to create several LV on a VG with different names using partman ?

2008-07-23 Thread Jérémy Bobbio
On Wed, Jul 23, 2008 at 10:19:20PM +0200, Grégory Oestreicher wrote:
 I totally missed your patch, and both completes really well. If it's OK with 
 you I can merge them, and at the same time check that mine still applies 
 correctly to the SVN tree (I doubt this because of changes in the latest 
 versions of partman-*).

I still think that with proper testing and careful review, your patch
would be a good inclusion for Lenny.

I was planning to have another look at it soon, but if you have the time
to update and test it before that, that would indeed be great. :)

Cheers,
-- 
Jérémy Bobbio.''`. 
[EMAIL PROTECTED]: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature