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

Re: How to use dmsetuup?



On Sat, Nov 04, 2023 at 01:20:08PM -0400, gene heskett wrote:

[...]

> Indeed it does clarify the mechanics. thank you. Now do I have to zero them
> first before I can then create (pvcreate) them,

Not necessarily. Unless, of course, there are sensitive data on them.

The process would go roughly:

  # put the necessary PV metadata on your raw devices
  pvcreate /dev/foo1 /dev/foo2 ...

  # make them to a volume group named my-volgroup
  vgcreate my-volgroup /dev/foo1 /dev/foo2 ...

  # cut out a logical volume from that, named my-logvol
  lvcreate --name my-logvol my-volgroup

  # put a file system on that logical volume
  mkfs.ext4 /dev/mapper/my-logvol

  # mount it
  mount /dev/mapper/my-logvol /home

Now convince your boot setup to add the logical vols
and mount them (this somehow involves fstab).

Perhaps this [1] page is enlightening (just disregard the
talk about vagrant(. I'm not yet quite sure you really
want this, but hey. Learning new tricks is what keeps one
happy.

In my case I actually have a volume group (spanning a single
physical device), but the use case is different: the physical
device is encrypted (laptops get lost) and I wanted to have
several partitions on it (and still move space from the one
to the other in a pinch).

Cheers & enjoy

[1] https://linuxhandbook.com/lvm-guide/
-- 
tomás

Attachment: signature.asc
Description: PGP signature


Reply to: