[opensuse] cryptsetup open won't map LVM volumes
Hey, I was just wanting to inform that in openSUSE, whenever you run "cryptsetup open /dev/... cryptname" the cryptdevice gets mapped (entry appears in /dev/mapper) but any LVM volumes are not loaded automatically. I also did not know how to do it by myself. LVM shows everything is allright in terms of "lvdisplay" displaying all the logical volumes, and the like. The "lvm" command itself didn't seem to have any option of getting the volumes to be loaded/mapped. The dmsetup command also did not have any way to actually load the LVM. Now that I have internet I might find out, but I did not have any, as I needed to use the openSUSE rescue mode to access my drive and reinstall grub. I could not. Fact was that I was in a bit of a pinch as I have no other computing resources available, my Windows installation suddenly wouldn't enable my wifi anymore (as a form of not doing "rfkill unblock all", supposedly) and if it were not for the Kubuntu Live disc I had burned just moments before, I would not be having any computer for the coming months unless I installed openSUSE again from scratch, possibly having to wipe the LUKS block device. Maybe that's all irrelevant, but I was completely stuck. Maybe the answer was to do vgchange -ay <volgroupname> I couldn't find it. This stuff is really well hidden. Maybe a thought? I don't know. I think these volumes would need to get mapped automatically. Regards, Bart. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday, August 22, 2015 04:49:51 PM Xen wrote:
I was just wanting to inform that in openSUSE, whenever you run "cryptsetup open /dev/... cryptname" the cryptdevice gets mapped (entry appears in /dev/mapper) but any LVM volumes are not loaded automatically.
That's the way it should be. The "cryptsetup" command is for encryption. Maybe I am opening the encrytped container because I want to reformat, and destroy the LVM. The "cryptsetup" command cannot guess that. If the partition is listed in "/etc/crypttab", then my experience is that the LVM volumes get mapped during boot.
I also did not know how to do it by myself.
vgchange -a y [optionally add name of volume group] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
23.08.2015 04:07, Neil Rickert пишет:
On Saturday, August 22, 2015 04:49:51 PM Xen wrote:
I was just wanting to inform that in openSUSE, whenever you run "cryptsetup open /dev/... cryptname" the cryptdevice gets mapped (entry appears in /dev/mapper) but any LVM volumes are not loaded automatically.
That's the way it should be.
Not really. If lvmetad is enabled, volumes should be auto-activated by default (there is lvm.conf setting to only limit auto-activation to list of specific volumes). But it had been flipped on and off due to various problems and I believe the latest state is lvmetad is disabled, which means manual activation is required.
The "cryptsetup" command is for encryption. Maybe I am opening the encrytped container because I want to reformat, and destroy the LVM. The "cryptsetup" command cannot guess that.
If the partition is listed in "/etc/crypttab", then my experience is that the LVM volumes get mapped during boot.
I also did not know how to do it by myself.
vgchange -a y [optionally add name of volume group]
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Quoting Andrei Borzenkov <arvidjaar@gmail.com>:
23.08.2015 04:07, Neil Rickert ?????:
That's the way it should be.
Not really. If lvmetad is enabled, volumes should be auto-activated by default (there is lvm.conf setting to only limit auto-activation to list of specific volumes). But it had been flipped on and off due to various problems and I believe the latest state is lvmetad is disabled, which means manual activation is required.
I guess it's more of a flaw in LVM; the vgchange command is not exactly at the top of the list when you start looking. Also, when you use this software you don't know that it is a /volume group/ that you need to activate; as a user, you just think "lvm!". I even remember reading about vgchange -ay in the manual of LVM, but it was a while back (like 6 months ago). I had forgotten. When you start lvm lvm> help It lists vgchange as "Change volume group attributes" -- not something you think of "hey, that is going to activate my volumes!" There is absolutely no indication WHATSOEVER as to what you need to use :-/. There is also no man pages when you are in a rescue system. The only thing that could indicate what you need to do, would be: lvm> help vgchange The funny thing, of course, or the irony, is that in order to use the rescue system, you must have access to your system so you can go on the web. ;-).
The "cryptsetup" command is for encryption. Maybe I am opening the encrytped container because I want to reformat, and destroy the LVM. The "cryptsetup" command cannot guess that.
Well, you have a point. That means you'd want to reformat the container while it is mapped. But it's not hard (pretty obvious) how you can remove the VG and the PV. After that I believe formatting it would be possible in any case?. There would be no mapping left and hence you could access the crypt device without a problem. So from a user point of view that use case is not hard to achieve even when the LVM gets auto-mapped.
If the partition is listed in "/etc/crypttab", then my experience is that the LVM volumes get mapped during boot.
Right. Obviously that wasn't the case in my rescue system ;-).
vgchange -a y [optionally add name of volume group]
Thanks again. I guess.. I had already found it once I had internet access again. Bart. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-08-23 13:39, Xen wrote:
The funny thing, of course, or the irony, is that in order to use the rescue system, you must have access to your system so you can go on the web.
You must have a separate, dedicated rescue/emergency system. I suggest the openSUSE XFCE rescue image, on an USB stick. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlXZw9gACgkQja8UbcUWM1yMFQEAoA+PivtWRawlGfyHCb3rl9+O 16R3UehiG8J+T3GReasA/jwodA25dIcD54kvPJ2/xon0Jf/aW3NGEuzb6ABJtsY8 =EdnA -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Carlos E. R.
-
Neil Rickert
-
Xen