LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Fresh Slackware64-current RAID-1 + LVM + LUKS: pvcreate not working (http://www.linuxquestions.org/questions/slackware-14/fresh-slackware64-current-raid-1-lvm-luks-pvcreate-not-working-793586/)

gargamel 03-06-2010 04:41 AM

Fresh Slackware64-current RAID-1 + LVM + LUKS: pvcreate not working
 
Hi there,

I want to do a fresh install of Slackware64-current with two hard disks combined to a software RAID-1 array, LVM and LUKS, according to these instructions (originally written for Slackware 12.2).

I used Alien Bob's script to mirror Slackware64-current of 2nd March, 2010 (today's upgrades are not yet included), and to create a DVD ISO image, which I then burned onto a DVD, in order to use it as my installation medium.

Up to the actual encryption everything seems to be fine:
Code:

# cryptsetup.dynamic -s 256 -y luksFormat /dev/md1
# cryptsetup.dynamic luksOpen /dev/md1 slackluks
[...]
Command successful.

However, when I want to create the physical volume, as described in section 2.4, I get an error:

Code:

# pvcreate /dev/mapper/slackluks
  Device /dev/mapper/slackluks not found (or ignored by filtering)

In fact, there is no /dev/mapper/slackluks file.

Has anything fundamentally changed with LUKS or LVM in the installation system of Slackware64-current, that could explain this behaviour?

I am clueless, any help much appreciated, thanks in advance!

gargamel

imitheos 03-06-2010 06:01 AM

Quote:

Originally Posted by gargamel (Post 3888065)
Hi there,

However, when I want to create the physical volume, as described in section 2.4, I get an error:

Code:

# pvcreate /dev/mapper/slackluks
  Device /dev/mapper/slackluks not found (or ignored by filtering)

In fact, there is no /dev/mapper/slackluks file.

Has anything fundamentally changed with LUKS or LVM in the installation system of Slackware64-current, that could explain this behaviour?

I am clueless, any help much appreciated, thanks in advance!

gargamel

I get the same behavior on a installed system too. It appears that udev doesn't
create some devices. It might have something with this
(or it may be irrelevant)
http://www.linuxquestions.org/questi...3/#post3888051

If you run "udevadm trigger" the device will be created and then you
will be able to install fine.

gargamel 03-06-2010 08:41 AM

Thanks a lot, that was really it!

Meanwhile I found, that when I connect an external USB device with an encrypted file system, I too have to issue

Code:

# udevadm trigger
to be able to mount it. Seems to be a systematic bug in this latest version of Slackware64-current.

gargamel

rworkman 03-19-2010 09:07 PM

Heh. I guess everyone thought this one had been lost in the shuffle :-)

Has anyone verified that this also happens on 32bit -current?
Either way, I'm looking into it. I've found at least one problem in lvm2 package anyway while looking into this, so that's good. In the meantime, I confirmed it on my laptop (x86_64), but since it's my daily use machine, I used the ugly udevadm trigger workaround and continued on with the installation, and now I'm up and running again. In my testing on 32bit (I have otherwised unused hardware to test on it), I was able to reproduce this *sometimes* but not always. I've talked with one of the cryptsetup devs, and because it's not multithreaded, he doesn't think it's a timing issue - instead it's probably something to do with the kernel or udev.

I've made some changes to several packages locally and rebuilt the installer initrd to reflect those changes, and I am now unable to reproduce it on -current 32bit. I'll do the same for 64bit soonish and test in a virtual machine, but I'd rather do this sort of test on real hardware. If/when I get to that point, are any of you willing to grab a new installer image and do that?

rworkman 03-20-2010 02:09 AM

http://connie.slackware.com/~rworkman/cryptsetup/

Burn 64.iso to a cdrom and boot it. See what happens.
If you install a system with it, you'll need to upgrade the six packages in pkg/ immediately after installing the system (especially the cryptsetup one - I think the old cryptsetup won't open luks devices formatted with new cryptsetup, but I won't swear to that). Obviously though, the most important thing to test is whether the problem is gone using the changed installer.

gargamel 03-20-2010 05:17 AM

Hi Robby,

thanks a lot, this is really great support!

In my environment I could reproduce the bug in a running system, by connecting an external USB hard disk. It wasn't necessary to go back to boot or installation stage. Not sure, if it played a role, but all my USB disks are encrypted. I connected the device and looked what happened in /dev/mapper.

The problem went away in the meantime, with one of the recent upgrades for Slackware64-current. As far as I can tell, removing the old device-mapper package and upgrading to lvm2-2.02.62-x86_64-1 fixed it.

Or maybe some of these helped:

Code:

a/sysvinit-scripts-1.2-noarch-31.txz: Rebuilt.
      Don't warn about already mounted /proc, or already activated swap.
      Look for either tmpfs or devtmpfs when starting rc.udev.
a/udev-151-x86_64-1.txz: Upgraded.
a/usbutils-0.86-x86_64-1.txz: Upgraded.

But my (totally un-educated ;)) guess is, that it was simply a bug in the device mapper. I am only an end-user, though, and do not really know or understand a lot about these things.

gargamel

EDIT: Unfortunately I am bit short on time, these days, otherwise I would try to set up a system with your packages. If noone can do it in the next few days, I may be able to do it, but not immediately. (Need my machine for productive things...;)).

imitheos 03-23-2010 02:24 PM

Quote:

Originally Posted by gargamel (Post 3905372)
Hi Robby,

The problem went away in the meantime, with one of the recent upgrades for Slackware64-current. As far as I can tell, removing the old device-mapper package and upgrading to lvm2-2.02.62-x86_64-1 fixed it.

In my case the problem still exists on latest -current with the lvm2 .62
udevd --debug shows that the link is created but it isn't.


Quote:

Originally Posted by rworkman (Post 3905258)
http://connie.slackware.com/~rworkman/cryptsetup/

Burn 64.iso to a cdrom and boot it. See what happens.

Thank you for taking the time to test it. I have tested both the latest
-current and your 64.iso. Your image works fine.

Edit: I browsed your tree out of curiosity and tried some things.
I noticed that you removed a patch that hashed a line in rules.d
Code:

# ACTION=="add", ENV{STARTUP}!="1", NAME="", GOTO="dm_end"
When i unhashed this line on -current, then it worked again,
so i guess the culprit was some rule after this line.

Thank you again for solving it.


All times are GMT -5. The time now is 01:21 PM.