Bug 5383 - Multiple errors, seem to stem from lvm setup
Summary: Multiple errors, seem to stem from lvm setup
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2012-04-13 02:18 CEST by Morgan Leijström
Modified: 2013-05-09 16:15 CEST (History)
6 users (show)

See Also:
Source RPM: drakxtools ?
CVE:
Status comment:


Attachments
Output of /sbin/sfdisk -l -uS /dev/sda (453 bytes, text/plain)
2012-04-15 00:18 CEST, Morgan Leijström
Details

Description Morgan Leijström 2012-04-13 02:18:53 CEST
Symptoms:
Basically the system is running fine, although several drak* tools are unusable.
For example drakboot simply crashes, drakx11 settings is not persistent, and diskdrake fail showing mount points for one LVM.
- All while the system is happily chewing on using them.
Also safe boot is unusable see bug 5381
When i start an affected drak* tool in graphic mode from terminal i see lots of output, about 40 repeats of these two lines:
File descriptor 8 (/dev/pts/0) leaked on lvm2 invocation. Parent PID 20506: /usr/bin/perl
File descriptor 9 (/dev/pts/0) leaked on lvm2 invocation. Parent PID 20506: /usr/bin/perl

And then some tools output more errors. MCC>Start>Configure_start_system, gives the following output in terminal (and then i get a popup "program terminated abnormally"). I guess the first line is a good clue:

INTERNAL ERROR: hd0 has no mapping in device.map (when translating (hd0,0))
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/bootloader.pm:1657
bootloader::grub2dev_and_file() called from /usr/lib/libDrakX/bootloader.pm:1666
bootloader::grub2dev() called from /usr/lib/libDrakX/bootloader.pm:253
bootloader::_may_fix_grub2dev() called from /usr/lib/libDrakX/bootloader.pm:228
bootloader::read_grub() called from /usr/lib/libDrakX/bootloader.pm:182
bootloader::read() called from /usr/sbin/drakboot:53

__History and set up
Machine: Thinkpad T42p
Set up a week ago by network install of cauldron i586
During install i made a /boot partition, then a large partition for LVM, then a smaller encrypted for a second LVM.
In the unencrypted LVM i have swap, /, /home, and one large, see 1) below.
In the encrypted i have a partition mounted as /homencr in which i have my possibly sensitive user files.


1) that large partition i initially had at /mnt/test
Next session i wanted to remove that partition, but diskdrake responded "lvremove failed"
After that diskdrake stopped showing the mount points in that LVM.

( It still show the mount point for the partition in the encrypted lvm, and for /boot partition )

I can have it like this for a while, please tell want you want me to investigate.
Comment 1 Morgan Leijström 2012-04-13 02:41:43 CEST
Oh, i just remembered a possibly important detail!

I did not get network interfaces working using network installer, so i cloned another drive from a very similar laptop to this one, and was happy it booted up seemingly perfectly.

The original drive was 40 GB, this is 60 GB.
It was after that it booted i added the encrypted LVM.
And it failed removing the unused partiton in the unencrypted lvm.
Comment 2 Dave Hodgins 2012-04-13 04:51:52 CEST
If you don't have it already, please install the package util-linux-ng
and then attach the output of /sbin/sfdisk -l -uS /dev/sda >sfdisk.txt

CC: (none) => davidwhodgins

Comment 3 Morgan Leijström 2012-04-15 00:11:51 CEST
Thnaks Dave, sfdisk in next post;
One step back to simplify things:
I noted the machine i cloned from have the exact same problems, but less complex partitioning.
So let us shift focus to that machine from now on:
(note to self: machine T43k)

Partitioning was set up directly in installer, network install a week ago.
Disk was partiotionned in a small /boot and a large not encrypted LVM
In LVM: /, /home, swap, /mnt/test
the /mnt/test never got used yet and below you see problems removing it.

...........

Now: exercising diskdrake from MCC;
Output in terminal at start of MCC:

File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 8 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl
File descriptor 9 (/dev/pts/1) leaked on lvm2 invocation. Parent PID 30573: /usr/bin/perl

..........

Starting diskdrake, from MCC log window:

22:53:45 diskdrake[30573]: ### Program is starting ### 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/sda 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/sda 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/sda1 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/sda5 
22:53:47 diskdrake[30573]: running: lvm2 pvs --noheadings --nosuffix -o vg_name /dev/sda5 
22:53:47 diskdrake[30573]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size vg-mga 
22:53:47 diskdrake[30573]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_size vg-mga 
22:53:47 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_name vg-mga 
22:53:47 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/home 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/home 
22:53:47 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/root 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/root 
22:53:47 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/swap 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/swap 
22:53:47 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/test 
22:53:47 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/test 
22:53:47 diskdrake[30573]: running: lvm2 pvs --noheadings --nosuffix -o vg_name /dev/sda5 
22:53:47 diskdrake[30573]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size vg-mga 
22:53:48 diskdrake[30573]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_size vg-mga 
22:53:48 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_name vg-mga 
22:53:48 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/home 
22:53:48 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/home 
22:53:48 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/root 
22:53:48 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/root 
22:53:48 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/swap 
22:53:48 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/swap 
22:53:48 diskdrake[30573]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/test 
22:53:48 diskdrake[30573]: running: blkid -o udev -p /dev/vg-mga/test 
22:53:48 diskdrake[30573]: created directory /boot (and parents if necessary) 
22:53:48 diskdrake[30573]: created directory /home (and parents if necessary) 
22:53:48 diskdrake[30573]: created directory / (and parents if necessary) 
22:53:48 diskdrake[30573]: created directory /mnt/test (and parents if necessary) 
22:53:48 diskdrake[30573]: created directory /proc (and parents if necessary) 
22:53:48 diskdrake[30573]: created directory /proc (and parents if necessary) 

And diskdrake is showing all partiitons mount points OK.

.........

Selecting the large never used logical partiotion mounted at /mnt/test :

22:54:55 diskdrake[30573]: running: umount /mnt/test 
22:54:55 diskdrake[30573]: modified file /etc/mtab 

.........

Clicking remove button:

22:54:58 diskdrake[30573]: running: lvm2 lvremove -f /dev/vg-mga/test 

Message (both popup and visible at Ctrl-Alt-F12):
"lvremove failed.  Logical volume vg-mga/test contains a filesystem in use."

Now the thing is that it have never been used, it is empty,
and diskdrake just said it unmounted it and i saw no error...

Reboot & retry: same happens.

..........

Now: unmounted, and then changed mount point to nothing:
diskdrake writes fstab.
then diskdrake show no mount point for any partition in the LVM !

*** Now look at the changed mount points in fstab! ****

$ cat /etc/fstab
/dev/mapper/vg--mga-root / ext4 acl,noatime 1 1
# Entry for /dev/sda1 :
UUID=80e460e7-8af2-4074-992a-a0f5d69abce5 /boot ext4 acl,noatime 1 2
/dev/mapper/vg--mga-home /home ext4 acl,noatime 1 2
none /proc proc defaults 0 0
/dev/vg-mga/swap swap swap defaults 0 0

$ cat /etc/fstab.old
/dev/vg-mga/root / ext4 acl,noatime 1 1
# Entry for /dev/sda1 :
UUID=80e460e7-8af2-4074-992a-a0f5d69abce5 /boot ext4 acl,noatime 1 2
/dev/vg-mga/home /home ext4 acl,noatime 1 2
/dev/vg-mga/test /mnt/test ext4 acl,noatime 1 2
none /proc proc defaults 0 0
/dev/vg-mga/swap swap swap defaults 0 0

So it seems diskdrake rewrites fstab in a way it cannot read itself.
But it apparently works anyway.
I do not know which way is right/best.

I tested remove using alternate name, but same result:
# lvm2 lvremove -f /dev/mapper/vg--mga-test
  Logical volume vg-mga/test contains a filesystem in use.

(This is not a important productiton machine so i can try...)

Below is from last run of diskdrake where it rewrote fstab:

23:28:14 diskdrake[9878]: ### Program is starting ### 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/sda 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/sda 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/sda1 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/sda5 
23:28:15 diskdrake[9878]: running: lvm2 pvs --noheadings --nosuffix -o vg_name /dev/sda5 
23:28:15 diskdrake[9878]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size vg-mga 
23:28:15 diskdrake[9878]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_size vg-mga 
23:28:15 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_name vg-mga 
23:28:15 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/home 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/home 
23:28:15 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/root 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/root 
23:28:15 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/swap 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/swap 
23:28:15 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/test 
23:28:15 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/test 
23:28:15 diskdrake[9878]: running: lvm2 pvs --noheadings --nosuffix -o vg_name /dev/sda5 
23:28:15 diskdrake[9878]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size vg-mga 
23:28:15 diskdrake[9878]: running: lvm2 vgs --noheadings --nosuffix --units s -o vg_size vg-mga 
23:28:16 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_name vg-mga 
23:28:16 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/home 
23:28:16 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/home 
23:28:16 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/root 
23:28:16 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/root 
23:28:16 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/swap 
23:28:16 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/swap 
23:28:16 diskdrake[9878]: running: lvm2 lvs --noheadings --nosuffix --units s -o lv_size /dev/vg-mga/test 
23:28:16 diskdrake[9878]: running: blkid -o udev -p /dev/vg-mga/test 
23:28:16 diskdrake[9878]: created directory /boot (and parents if necessary) 
23:28:16 diskdrake[9878]: created directory /proc (and parents if necessary) 
23:28:16 diskdrake[9878]: created directory /proc (and parents if necessary)
Comment 4 Morgan Leijström 2012-04-15 00:18:15 CEST
Created attachment 1991 [details]
Output of /sbin/sfdisk -l -uS /dev/sda

sfdisk warned that (translated) extended partition do not start at even cylinder border. DOS and Linux will differ in how they see the content.
Comment 5 Morgan Leijström 2012-04-15 01:42:37 CEST
Tested on another machine, fresh network install mga2 yesterday.
It have the same partitioning of a /boot and then the rest in a LVM except /mnt/test was not set up during install.

-> On that machine i can make a new logical partition in the LVM, mount, unmount, remove, no isuses.

So what differs?
That OK machine is x86_64, on a fresh SATA drive.

The problematic machine is i586, disk is IDE on a SATA to IDE bridge on the main board (weird design this laptop). Also it seems (looking at the sfdisk output above) that the partitioning from earlier install was not completely removed. It was Mandriva but i do not remember partitionig details.
Comment 6 Morgan Leijström 2012-04-15 02:04:48 CEST
The "OK" machine in previous post also show the same File Descriptor ... leaked on lvm2 invocation, as per my post #0
- Maybe i should post a separate bug on that?
......
More on this "bad" machine:
When i in mcc Start>Configure start system, in terminal i see:
INTERNAL ERROR: hd0 has no mapping in device.map (when translating (hd0,0))
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/bootloader.pm:1657
bootloader::grub2dev_and_file() called from /usr/lib/libDrakX/bootloader.pm:1666
bootloader::grub2dev() called from /usr/lib/libDrakX/bootloader.pm:253
bootloader::_may_fix_grub2dev() called from /usr/lib/libDrakX/bootloader.pm:228
bootloader::read_grub() called from /usr/lib/libDrakX/bootloader.pm:182
bootloader::read() called from /usr/sbin/drakboot:53

and in Ctrl-Alt-F12 i see a twenty lines beginning with "kernel:" and of them a couple lines mention floppy, one interrupt and one timeout.
Comment 7 Morgan Leijström 2012-04-15 02:22:10 CEST
The "File Descriptor" problem -> Bug 5405
Comment 8 Morgan Leijström 2012-04-15 03:33:31 CEST
I forgot to mention one difference: the OK machie have *encrypted* LVM.
Manuel Hiebel 2012-04-19 09:26:44 CEST

CC: (none) => mageia, pterjan, thierry.vignaud

Comment 9 Marja Van Waes 2012-05-26 13:10:11 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 10 roelof Wobben 2013-01-03 09:45:21 CET
Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,

Roelof

CC: (none) => r.wobben

roelof Wobben 2013-01-03 09:46:22 CET

CC: (none) => tmb

Comment 11 Morgan Leijström 2013-05-09 16:15:38 CEST
There are other more up to date bugs about lvm and encryption issues with diskdrake, so i set this as resolved old.

Status: NEW => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.