Ticket #654 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

analyze-my-lvm fails if LANG is not english

Reported by: ediaz Owned by: bruno
Priority: normal Milestone: 3.0.3
Component: mindi Version: 3.0.2
Severity: normal Keywords: mindi lvm create fail
Cc:

Description (last modified by bruno) (diff)

Hello take care of LANG in create mindi copy..

[root@redhatprueba1 mindi]# set | grep LANG
LANG=en_US.UTF-8

[root@redhatprueba1 mindi]# ./analyze-my-lvm
/usr/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sda2
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# echo y | lvm pvcreate -ff /dev/sda2
# lvm vgscan

Create and activate the VG's (volume groups).
# '''lvm vgcreate VolGroup00 -l 0 -p 0 -s 32.00m /dev/sda2'''
# lvm vgchange -a y VolGroup00

Finally, create the LV's (logical volumes).
# lvm lvcreate -L 6082m -r auto -n LogVol00 VolGroup00
# lvm lvcreate -L 352.00m -r auto -n LogVol01 VolGroup00

# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/VolGroup00/LogVol00 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol01 or something like that)

Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/VolGroup00/LogVol00)
(lvm lvremove -f /dev/VolGroup00/LogVol01)
(lvm vgchange -a n VolGroup00)
(lvm vgremove VolGroup00)
(rmmod dm-mod & rmmod dm_mod & )
[root@redhatprueba1 mindi]# ./analyze-my-lvm
/usr/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sda2
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# echo y | lvm pvcreate -ff /dev/sda2
# lvm vgscan

Create and activate the VG's (volume groups).
# lvm vgcreate VolGroup00 -l 0 -p 0 -s 32.00m /dev/sda2
# lvm vgchange -a y VolGroup00

Finally, create the LV's (logical volumes).
# lvm lvcreate -L 6082m -r auto -n LogVol00 VolGroup00
# lvm lvcreate -L 352.00m -r auto -n LogVol01 VolGroup00

# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/VolGroup00/LogVol00 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol01 or something like that)

Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/VolGroup00/LogVol00)
(lvm lvremove -f /dev/VolGroup00/LogVol01)
(lvm vgchange -a n VolGroup00)
(lvm vgremove VolGroup00)
(rmmod dm-mod & rmmod dm_mod & )

[root@redhatprueba1 mindi]# export LANG=es_ES.UTF-8
[root@redhatprueba1 mindi]# ./analyze-my-lvm
/usr/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sda2
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# echo y | lvm pvcreate -ff /dev/sda2
# lvm vgscan

Create and activate the VG's (volume groups).
# '''lvm vgcreate VolGroup00 -l 0 -p 0 -s 32,00m /dev/sda2'''
# lvm vgchange -a y VolGroup00

Finally, create the LV's (logical volumes).
# lvm lvcreate -L 6082m -r auto -n LogVol00 VolGroup00
# lvm lvcreate -L 352,00m -r auto -n LogVol01 VolGroup00

# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/VolGroup00/LogVol00 or something like that)
(mkfs -t foo /dev/VolGroup00/LogVol01 or something like that)

Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/VolGroup00/LogVol00)
(lvm lvremove -f /dev/VolGroup00/LogVol01)
(lvm vgchange -a n VolGroup00)
(lvm vgremove VolGroup00)
(rmmod dm-mod & rmmod dm_mod & )

after of this the diference in , and . is very importan because mondoresque don't run.

i-want-my-lvm fails to create because this command is error.

lvm vgcreate VolGroup00 -l 0 -p 0 -s 32,00m /dev/sda2

can't use , you must use .

Regards!

Change History

comment:1 Changed 21 months ago by bruno

  • Status changed from new to assigned
  • Description modified (diff)

comment:2 Changed 21 months ago by bruno

It seems that on your distribution, the vgdisplay commands does output the ',' when using your locale. Is that correct ?

It's then strange that it doesn't use also it for vgcreate :-(

What about vgdisplay and pvdisplay commands ?

Depending on these feedback I'll work on the appropriate patch.

Workaround: add export LANGUAGE=C and export LANG=C at the start of this script.

comment:3 Changed 21 months ago by ediaz

Yes I use this workaround, I send you the output of.

root@redhatprueba1 /]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               7,88 GB
  PE Size               32,00 MB
  Total PE              252
  Alloc PE / Size       201 / 6,28 GB
  Free  PE / Size       51 / 1,59 GB
  VG UUID               XgsrvF-ptls-MbuB-EJZo-VJrB-nDd7-ldf59r


[root@redhatprueba1 /]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               7,89 GB / not usable 15,57 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              252
  Free PE               51
  Allocated PE          201
  PV UUID               6PWCPp-Ney0-6x5T-kiBj-dzSB-1xPd-0s7qHx



====================================================================================== EXTERNAL INFLUENCES

Environment Variables

determines the language in which messages are displayed.

If is not specified or is null, it defaults to "C" (see lang(5)).

If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).

Only must be take care of this... :)

Can be interested put in the analyze-my-lvm script the LANG=C by default??? Regards!

Last edited 21 months ago by ediaz (previous) (diff)

comment:4 Changed 21 months ago by bruno

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in rev [3063] by adopting your fix.

Note: See TracTickets for help on using tickets.