Re: encrypting /home partition post-install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/02/2015 08:31 AM, Patrick O'Callaghan wrote:
On Tue, 2015-12-01 at 19:07 -0600, Chris Adams wrote:
Once upon a time, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> said:
On Tue, 2015-12-01 at 15:31 -0600, Chris Adams wrote:
With LVM, I still get /dev/vg_foo/lv_bar, and
don't care what raw device the underlying partition is, how it is
connected, etc. (very useful for example when taking an internal
drive from one computer and connecting it via an external adapter
of
some type on another).

Which is fine if a) the second machine also runs LVM (what if it's
on
an Ubuntu machine without LVM, rather than Fedora?) and b) the two
use
the same LVM logical layout.

For (a), the only Ubuntu system I have access to also has LVM; do
they not even install the lvm tools?

I've no idea. I don't even have a Ubuntu installation. It was a
hypothetical question. For Ubuntu susbstitute Mint, Opensuse or
whatever. Not all Linux distros install LVM by default.

For (b), I have no idea what you mean by "same LVM logical
layout".  The PV size, VG and LV names, etc. are all part of a
particular device. They don't have to match in any way a separate
device (on the same or on a different computer).

A good demonstration of the problems with LVM terminology. What do you
mean by device? I often feel that many of the issues people have with
LVM are caused by this sort of thing. I last used LVM several years ago
and clearly remember reading over the docs multiple times before making
what should have been a simple change, before finally resorting to
asking the list. I don't doubt that people who use it every day are
comfortable with it, but most of us just don't, so if I had to repeat
the experience I would no doubt go through the same learning curve only
to forget it again when I finished.

For the vast majority of people, the entire LVM thing is on one physical
drive. That means that that one (or more) partitions on that drive are
used as LVM PVs (physical devices). Those PVs are grouped into one or
more LVM VGs (volume groups), and bits of those VGs are used to create
LVs (logical volumes). Filesystems are, in turn, laid down on those LVs
to create the usable disk space.

That's the basic concept behind LVM, and with a single drive, most
people will not really need to worry about it. If you're doing
something "advanced" such as adding a drive, turning it into one or
more additional PVs and adding those to a VG which would permit
creating more LVs or expanding existing LVs onto those new PVs, then
yeah, you should learn LVM management.

The most common gotcha people have are collisions between the VG names
and LV names between machines. The installer uses a generic name for
the VG (I think it uses "fedora") when it creates these things, so
ADDING a drive from machine A to machine B will quite possibly end up
with two VGs with the same name or two LVs with the same name. LVM
won't let you activate that (the various combinations of VGname-LVname
must be unique on a given machine).

When I build a system, I name the volume group after the machine it's
being built on (e.g. this machine is called "prophead", so the volume
group is called "vgprophead"). The LVs are typically named after their
function ("root", "swap", "usr", "home", whatever). Thus the /dev/mapper
layouts end up with stuff like:

	/dev/mapper/vgprophead-root
	/dev/mapper/vgprophead-usr

and so on. Other device nodes end up as:

	/dev/vgprophead/root
	/dev/vgprophead/usr

and so on. Note that all of those /dev/mapper and /dev/vgprophead
entries are just symlinks to /dev/dm-X (the actual LV devices created
by LVM). Thus, if I were to take the drive from this machine and stick
it in my test machine (hamster), I could possibly see:

	/dev/mapper/vghamster-root
	/dev/mapper/vgprophead-root

That's fine (there's no name collision), and I could mount
/dev/mapper/vgprophead-root anywhere I wanted to on hamster.

I may have digressed a bit here, but LVM really isn't that scary or hard
to grasp (well, at least to me :-)). There may be the odd distro that
doesn't install LVM by default, but my guess is they're pretty rare.
AFAIK all the major distros (Fedora, CentOS, RedHat, Ubuntu, Debian,
SuSE, SciLinux) do.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-         "If you can't fix it...duct tape it!"  -- Tim Allen        -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux