problems with the display from the lvm-tools

Hi,

I have a very strange problem: I have a SLES 11 SP3 VM (KVM), which is running on a SLES 11 SP3 host. When I use e.g. vgs, vgdisplay, pvscan I get strange results:

vm58820-6:~ # vgs
vgs VG #PV #LV #SN Attr VSize VFree
vgs vg1 1 2 1 wz–n- 295.00g 25.00g

vm58820-6:~ # vgdisplay
vgdisplay — Volume group —
vgdisplay VG Name vg1
vgdisplay System ID
vgdisplay Format lvm2
vgdisplay Metadata Areas 1
vgdisplay Metadata Sequence No 331
vgdisplay VG Access read/write
vgdisplay VG Status resizable
vgdisplay MAX LV 0
vgdisplay Cur LV 2
vgdisplay Open LV 1
vgdisplay Max PV 0
vgdisplay Cur PV 1
vgdisplay Act PV 1
vgdisplay VG Size 295.00 GiB
vgdisplay PE Size 32.00 MiB
vgdisplay Total PE 9440
vgdisplay Alloc PE / Size 8640 / 270.00 GiB
vgdisplay Free PE / Size 800 / 25.00 GiB
vgdisplay VG UUID J4yEY5-kIkV-Nfrm-bJts-Fgec-u30j-j0z3uE
vgdisplay

vm58820-6:~ # pvscan
pvscan PV /dev/vda1 VG vg1 lvm2 [295.00 GiB / 25.00 GiB free]
pvscan Total: 1 [295.00 GiB] / in use: 1 [295.00 GiB] / in no VG: 0 [0 ]

As you see, the name of the used program is always displayed in the beginning of the line.

My LVM version is:
vm58820-6:~ # rpm -qf $(which vgs)
lvm2-2.02.98-0.33.1

I have another vm which is also SLES 11 SP3, having the same lvm version. But there the program name at the beginning is missing (what I think is the right behavior).

This strange behaviour is causing trouble: E.g. the script /etc/init.d/boot.kdump is not running fine because the output of vgs is used to crate the name of a block device which is with this behavior not working properly.

Bernd

Hi Bernd,

while I wouldn’t know out of the box how to tell lvm to behave that way (i.e. via command profiles), you might consider to compare LVM configuration of both systems (“lvmconfig --type current”).

As this problem seems to affect more than just your current shell, I’ll assume that shell settings are not to blame.

Also, please verify if parts of LVM may have been modified since installation: “rpm -vV lvm2”.

Regards,
Jens

[QUOTE=jmozdzen;30426]Hi Bernd,

while I wouldn’t know out of the box how to tell lvm to behave that way (i.e. via command profiles), you might consider to compare LVM configuration of both systems (“lvmconfig --type current”).

As this problem seems to affect more than just your current shell, I’ll assume that shell settings are not to blame.

Also, please verify if parts of LVM may have been modified since installation: “rpm -vV lvm2”.

Regards,
Jens[/QUOTE]

Hi Jens,

nice to meet you again :-). The package seems to be fine:

rpm -vV lvm2-2.02.98-0.33.1

S.5…T /lib/mkinitrd/scripts/setup-lvm2.sh

This is the only file which has changed. I made some changes to the script to see exactly where the error is.

The LVM configuration:

vm58820-6:~ # lvm dumpconfig
devices {
dir=“/dev”
scan=“/dev”
preferred_names=
filter=“a/.*/”
cache=“/etc/lvm/.cache”
write_cache_state=1
sysfs_scan=1
md_component_detection=1
ignore_suspended_devices=0
}
dmeventd {
mirror_library=“libdevmapper-event-lvm2mirror.so”
snapshot_library=“libdevmapper-event-lvm2snapshot.so”
thin_library=“libdevmapper-event-lvm2thin.so”
}
activation {
missing_stripe_filler=“/dev/ioerror”
reserved_stack=256
reserved_memory=8192
process_priority=-18
mirror_region_size=512
readahead=“auto”
monitoring=1
mirror_log_fault_policy=“allocate”
mirror_device_fault_policy=“remove”
thin_pool_autoextend_threshold=100
thin_pool_autoextend_percent=20
udev_rules=1
udev_sync=1
}
global {
umask=63
test=0
units=“h”
activation=1
proc=“/proc”
locking_type=1
fallback_to_clustered_locking=1
fallback_to_local_locking=1
locking_dir=“/var/run/lvm/lock”
lvdisplay_shows_full_device_path=1
}
shell {
history_size=100
}
backup {
backup=1
backup_dir=“/etc/lvm/backup”
archive=1
archive_dir=“/etc/lvm/archive”
retain_min=10
retain_days=30
}
log {
verbose=0
syslog=1
file=“/var/log/lvm2.log”
overwrite=0
level=0
indent=1
command_names=1
prefix=" "
}
allocation {
maximise_cling=1
mirror_legs_require_separate_pvs=0
mirror_logs_require_separate_pvs=0
thin_pool_metadata_require_separate_pvs=0
}

I found it out:
log {
verbose=0
syslog=1
file=“/var/log/lvm2.log”
overwrite=0
level=0
indent=1
======================
command_names=1
======================
prefix=" "

This is the respective entry. If i set it to zero, the name of the program dissapears.

OK. But why does rpm -V not show that the file lvm.conf has changed ? No matter if i have 0 or 1, rpm says the config file is fine.
Or are config files excluded from some tests (what would make sense) ?

And why is my config file so much different from the one of another pc (although we have the same version) ?

diff /etc/lvm/lvm.conf /etc/lvm/lvm.conf.vm58820-6

22,31d21
< # If set, the cache of block device nodes with all associated symlinks
< # will be constructed out of the existing udev database content.
< # This avoids using and opening any inapplicable non-block devices or
< # subdirectories found in the device directory. This setting is applied
< # to udev-managed device directory only, other directories will be scanned
< # fully. LVM2 needs to be compiled with udev support for this setting to
< # take effect. N.B. Any device node or symlink not managed by udev in
< # udev directory will be ignored with this setting on.
< obtain_device_list_from_udev = 1
<
83,87c73,75
< # N.B. If obtain_device_list_from_udev is set to 1 the list of
< # devices is instead obtained from udev and any existing .cache
< # file is removed.
< cache_dir = “/etc/lvm/cache”
< cache_file_prefix = “”

# cache_dir = "/etc/lvm/cache"
# cache_file_prefix = ""
cache = "/etc/lvm/.cache"

181c169
< #file = “/var/log/lvm2.log”

file = "/var/log/lvm2.log"

303c291
< locking_type = 3

locking_type = 1

Bernd

Hi Bernd,

I can confirm this behavior on SLES11SP4. Let’s see if I can find anything on that, but it’s probably be better if you could open a service request…

[CODE]
[FONT=monospace][COLOR=#ff5454]server:~ # [/COLOR][COLOR=#000000]echo " # comment" >> /etc/lvm/lvm.conf[/COLOR][/FONT]

[FONT=monospace][COLOR=#ff5454]server:~ # [/COLOR][COLOR=#000000]rpm -vV lvm2|grep conf [/COLOR]
… c /etc/lvm/lvm.conf[/CODE]
[/FONT][FONT=monospace]
Regards,
Jens
[/FONT]

Hi Bernd,

And why is my config file so much different from the one of another pc (although we have the same version) ?

it does look like a manual edit to me - or a file placed there by error (intended for a different machine).

If still available, have a look at the time stamp of the file and that of the containing directory… maybe you can relate that to some login or scripted action that was active at that time?

Regards,
Jens