Bug 12033 - fstab get wrecked by diskdrake adding encrypted partition in LVM
Summary: fstab get wrecked by diskdrake adding encrypted partition in LVM
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: MGA3TOO MGA4TOO
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2013-12-18 10:35 CET by Morgan Leijström
Modified: 2016-06-28 20:52 CEST (History)
2 users (show)

See Also:
Source RPM: drakxtools-16.26.8-1.mga4.src.rpm
CVE:
Status comment:


Attachments
other mount points in LVM are forgotten (79.72 KB, image/png)
2013-12-18 11:09 CET, Morgan Leijström
Details
/root/drakx/report.bug.xz (152.79 KB, application/x-xz)
2013-12-19 17:06 CET, Morgan Leijström
Details
/root/drakx/report.bug.xz from the correct machine.... (156.22 KB, application/x-xz)
2013-12-19 19:08 CET, Morgan Leijström
Details

Description Morgan Leijström 2013-12-18 10:35:24 CET
Description of problem:
Creating an encrypted ext4 in LVM, cause mount points for all other partiitons in that LVM removed from fstab.

(i did not test other scenaries, but please do when bug fixing!)

___Steps to Reproduce:
1. Original configuration made at install time by mga4b2-x86_64 DVD installer:
/boot is a separate ext4, rest of disk is LVM, and in LVM is /, /home, swap and free space.  /etc/fstab is:

/dev/vg-mga/root / ext4 acl,noatime 1 1
# Entry for /dev/sda1 :
UUID=ee9864cd-8bed-4b4e-a4bb-dcf01a6170f2 /boot ext4 noatime,acl 1 2
/dev/vg-mga/home /home ext4 noatime,acl 1 2
none /proc proc defaults 0 0
/dev/vg-mga/swap swap swap defaults 0 0


2. Use diskdrake to create a new ext4 in that LVM, checkmark encrypted.


3. after finishing diskdrak and answering yet to write fstab, fstab now is:

UUID=ee9864cd-8bed-4b4e-a4bb-dcf01a6170f2 /boot ext4 noatime,acl 1 2
/dev/mapper/crypt_vg_mga_test /mnt/test ext4 noatime 0 0
none /proc proc defaults 0 0


I set it critical as users may easily end up not able to boot their system

Reproducible: 

Steps to Reproduce:
Comment 1 Morgan Leijström 2013-12-18 11:09:37 CET
Created attachment 4638 [details]
other mount points in LVM are forgotten
Comment 2 Morgan Leijström 2013-12-18 11:11:00 CET
at 2. above there is a display glitch, Bug 12036
Comment 3 Thierry Vignaud 2013-12-19 10:03:00 CET
Can you attach the /root/drakx/report.bug.xz from that machine?

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 4 Morgan Leijström 2013-12-19 17:06:03 CET
Created attachment 4643 [details]
/root/drakx/report.bug.xz
Comment 5 Morgan Leijström 2013-12-19 19:08:32 CET
Created attachment 4648 [details]
/root/drakx/report.bug.xz from the correct machine....

Attachment 4643 is obsolete: 0 => 1

Comment 6 Morgan Leijström 2013-12-19 19:47:30 CET
Another issue:

Now when in diskdrake trying to remove that encrypted partition, it say 

lvremove failed: Logical volume vg-mga/test is used by another device.

Diskdrake show it is btrfs, but i selected to make it ext4 when i made it - i think i have seen in another bug that diskdrake shows wrong type some cases.

It do not show mount point, but button "use".  Clicking it, it asks for the key, then i get message "cryptsetup failed"  Same message if i select to format and enter key.

I found it was still mounted.  So as root i umnounted it.  Still same result trying to remove.

Seems to be multiple issues, hopefully caused by a common small problem somewhere...
Manuel Hiebel 2014-01-20 22:06:06 CET

Keywords: NEEDINFO => (none)

Comment 7 Morgan Leijström 2014-06-12 18:01:23 CEST
Verified still valid current mga4-64, drakxtools 16.26.8-1.mga4 ;

I set up the disks at install:
sda=120G SSD; ext4 /boot, rest is a LVM containing /, /home, /swap, /var
sdb=500G spinner; all is a ext4 at /mnt/Arkiv

Install was no problem like that.
However, initially i had tried two variants of encryption but installer failed either immediately, next try system was unbootable after install, so i decided to add encrypted data partition later.

Then i used diskdrake to make a LVM on all of a third drive, sdc, added it to a new vg group, and in that made a couple partitions, one of them encrypted.   Clicking on the other vg group i see now diskdrake thinks all partitions there have no mount point anymore!

I realised this may not be a stable situation if i use diskdrake later even if i fix fstab for now...

However diskddrake fail to remove the encrypted partition.

And trying to exit diskdrake and write fstab i get this popup:

 INTERNAL ERROR: unknown device sdc7
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/bootloader.pm:1665
bootloader::device_string2grub() called from /usr/lib/libDrakX/bootloader.pm:2248
bootloader::update_for_renumbered_partitions() called from /usr/lib/libDrakX/diskdrake/interactive.pm:1541
diskdrake::interactive::update_bootloader_for_renumbered_partitions() called from /usr/lib/libDrakX/diskdrake/interactive.pm:298
diskdrake::interactive::Done() called from /usr/lib/libDrakX/diskdrake/hd_gtk.pm:144
(eval)() called from /usr/lib/libDrakX/diskdrake/hd_gtk.pm:144
diskdrake::hd_gtk::try_() called from /usr/lib/libDrakX/diskdrake/hd_gtk.pm:138
diskdrake::hd_gtk::try() called from /usr/lib/libDrakX/diskdrake/hd_gtk.pm:220
diskdrake::hd_gtk::__ANON__() called from /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm:341
(eval)() called from /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm:341
Gtk3::main() called from /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm:294
Gtk3::__ANON__() called from /usr/lib/libDrakX/mygtk3.pm:1501
mygtk3::main() called from /usr/lib/libDrakX/ugtk3.pm:748
ugtk3::main() called from /usr/lib/libDrakX/diskdrake/hd_gtk.pm:132
diskdrake::hd_gtk::main() called from /usr/libexec/drakdisk:93

As i have learned to always keep backups of fstab, i could restore it, reboot, use gparted on a live disk to clear sdc.

Then used diskdrake to make a large encrypted LVM of all sdc, and in that my partitions.  That works.

Basically: never use diskdrake to make an encrypted partition in a LVM.
Other way around is OK; so on one disk systems make a /boot, then an encrypted LVM of all rest and you are free to create, resize, remove partitions inside that LVM.  Drawback: CPU usage for everuthing, also nonsensitive date, but with todays multicores it seem not to matter really.

Source RPM: drakxtools-16.16-1.mga4.src.rpm => drakxtools-16.26.8-1.mga4.src.rpm
Whiteboard: (none) => MGA3TOO MGA4TOO

Comment 8 Marja Van Waes 2016-02-03 14:39:52 CET
There was no action in this report since 2014-06-12

Is this bug still valid with Mga5 or (preferably) cauldron / mga6dev1 ?

Keywords: (none) => NEEDINFO
CC: (none) => marja11

Comment 9 Morgan Leijström 2016-02-03 14:56:35 CET
Will probably try again with mga6 around beta
Comment 10 Marja Van Waes 2016-02-03 15:01:10 CET
(In reply to Morgan Leijström from comment #9)
> Will probably try again with mga6 around beta

Thanks :-)
Comment 11 Marja Van Waes 2016-06-05 14:11:22 CEST
(In reply to Morgan Leijström from comment #9)
> Will probably try again with mga6 around beta

and?
Comment 12 Morgan Leijström 2016-06-06 12:34:31 CEST
The bugreporting share of my life is currently exhausted... ;)
(not only mageia.. gotta work)

Thanks for the ping though.
Comment 13 Marja Van Waes 2016-06-28 20:52:25 CEST
Thx for the reply, Morgan.

Closing as OLD because the issue wasn't reproduced since 2014

Feel free to reopen, if needed.

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


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