Bug 16117

Summary: Installer and diskdrake fail adding swap in existing LVM after removing earlier swap there
Product: Mageia Reporter: Morgan Leijström <fri>
Component: InstallerAssignee: Thierry Vignaud <thierry.vignaud>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Normal CC: ennael1, tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: MGA5TOO
Source RPM: CVE:
Status comment:
Attachments: report.bug.tar.gz lvcreate failed

Description Morgan Leijström 2015-06-15 11:39:03 CEST
Created attachment 6739 [details]
report.bug.tar.gz lvcreate failed

(i remember reporting something similar a couple yeras before but did not find it now sorry)

DrakX v16.104

Reinstall = fresh install reusing existing partitions (wrecked old cauldron)
Mechanical hard disk, dual boot system.
dual boot Microsoft W7 / Mageia
Partitions: thre ntfs partitions; MS W7 boot, C:, E:
Then in extended partition a lvm vg and ext4 /boot

I did not touch the ntfs partitions.
the /ext 4 partition i selected for mount /boot
Then in the lvm i assigned existing /home, and /
There were two swap partitions in lvm since earlier install.
I deleted both, and then i wanted to create a new swap, but it just sat there very long time.
changed to other vt and back but it did not update the graphical screen for minutes.

i ran bug, opened the file on this other computer and saw this part:

* looking for vgs in sda6
* running: lvm2 vgscan
  Reading all physical volumes.  This may take a while...
  Interrupted...
  Giving up waiting for lock.
  /run/lock/lvm/V_vg-mga: flock failed: Interrupted system call
  Can't get lock for vg-mga
  Skipping volume group vg-mga
* running: lvm2 vgchange -a y
  Interrupted...
  Giving up waiting for lock.
  /run/lock/lvm/V_vg-mga: flock failed: Interrupted system call
  Can't get lock for vg-mga
  Skipping volume group vg-mga
* running: lvm2 pvs --noheadings --nosuffix -o vg_name /dev/sda6
* ERROR: killing runaway process (process=lvm2, pid=562, args=lvcreate --size 3954688k -n swap vg-mga, error=ALARM at /usr/lib/libDrakX/run_program.pm line 241.
)
* error: lvcreate failed: 


now the graphical screen (partitioning) was alive again with a popup message "lvcreate failed: "

I tried again to create swap, and immediately got message:
"lvcreate failed:   Logical volume "swap" already exists in volume group "vg-mga"

It is still not shown graphically.
I choose to continue, it warns about i do not have a swap, i will fix it later.
And update here if i find something interesting.
David Walser 2015-06-15 15:34:01 CEST

CC: (none) => ennael1, tmb
Assignee: bugsquad => thierry.vignaud

Comment 1 Morgan Leijström 2015-06-15 16:28:16 CEST
Booting after install,
diskdrake see there is a unused (not mounted) swap in the lvm.

I click mount, and done (or finish whatever button is in english)
But it is still not registered in fstab.
Looking in diskdrake again i see it shpws as green (=swap) but have no mount point.

So I remove it, reboot and create it again in same place

This time it got a mount point

I clicked Finish and diskdrake popped up a dialog it need be formatted before it can be used. I confirmed - and diskdrake exited!!

That is probably a separate bug ?  ( it should NOT exit, but give user a chance to do what it suggested! )

firing up diskdrake again i see the swap partition is now marked red instead of green.  Clicking format anyway, it for formatted ext4. Doh.
Switched to expert mode, set type = Linux swap, clicked format, then mount and it displayed as formatted and mounted (in text at left), and exited diskdrake.

Swap still do not show up in fstab...

diskdrake again, yes it do not list mount point.
diskdrake normally  list a mount point "swap" for working swap partition at left together with the other info.
Problem is i can not set one there even in expert mode as there is not such a button for swap.

Ah well, remove it again, make new and it segfaults when i click OK.
Force it down, start diskdrake again, remove the partition (now marked red)

reboot again, create swap, format, *) mount, exit (and it asks to save fstab changes: yes).

*) this last time, the button mount was not visible until after i formatted, good.  Strange it was visible before formatting in the earlier tries, but that is probably a side effect of something going wrong earlier.

Finally.  Quirky!   (still)

Whiteboard: (none) => MGA5TOO

Morgan Leijström 2015-06-15 21:47:47 CEST

Summary: Installer fail adding swap in existing LVM after removing earlier swap there => Installer and diskdrake fail adding swap in existing LVM after removing earlier swap there

Samuel Verschelde 2015-06-17 12:17:21 CEST

Whiteboard: MGA5TOO => MGA5TOO FOR_ERRATA

Comment 2 Morgan Leijström 2015-06-17 12:58:36 CEST
_To be checked_
Same as in descripion above for other types of filesystem: If installer and diskdrake can remove and add a partition of same name in LVM in the same session.
Samuel Verschelde 2016-10-18 13:13:49 CEST

Whiteboard: MGA5TOO FOR_ERRATA => MGA5TOO