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

Re: new pc and swap



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 31, 2016 at 01:27:22PM -0500, Richard Owlett wrote:

[...]

> omnia disci en tres partes est:
>   primary
>   extended
>   logical
> 
> Whither goest LVM?

Either ou go with Pascal's advice and use GPT, or, if you feel more
comfortable, you go with the traditional DOS partitioning you sketched
above. Then, you need two "traditional" partitions:

 - one (small) primary for boot
 - another (the rest) either primary, or a logical within the extended
   (doesn't matter that much which; my Debian installer chose the second
   variant, I let it do its thing), which is then the "physical volume"
   for LVM, which does its own partition scheme within that.

In my case, the partition looks like:

  tomas@rasputin:~$ sudo fdisk -l /dev/sda
  [sudo] password for tomas: 
  
  Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
  255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 4096 bytes
  I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  Disk identifier: 0x000d2482
  
     Device Boot      Start         End      Blocks   Id  System
  /dev/sda1   *        2048     2099199     1048576   83  Linux
  /dev/sda2         2099200  1953525167   975712984    5  Extended
  /dev/sda5         2101248  1953525167   975711960   83  Linux

Note that /dev/sda2 isn't a real partition, but the extended, containing
the "real meat" /dev/sda5. This one is an encrypted Luks partition (in
my case), which then is subdivided by LVM into /, /usr, /var, /home.

What does that buy you? Well, you can, with enough care, resize your
partitions within LVM after the fact [1] (you can even add a second
hard disk and allot some or all of its space to one of the existing
volumes).

For me, the nicest part is that I can have all my separate partitions
encrypted in one fell swoop.

> P.S. a wise person admits his ignorance.

;-)

regards

[1] You have to take care of the file systems: before modifying the
  partition when shrinking, after when growing. Growing is typically
  painless and low risk and can be achieved on-line (i.e. while the
  file system is mounted), shrinking can typically only be done
  off-line (for ext4 this is so).

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgXoTwACgkQBcgs9XrR2kZ3oACfXlgb4qrZ1vVMdwuwIFTkeVpl
LRQAn3SAUObxiJX8gopZq8zPR51/A2Fs
=qm7Y
-----END PGP SIGNATURE-----


Reply to: