public inbox for linux-lvm@redhat.com
 help / color / mirror / Atom feed
* is it possible to use LVM AFTER system installation?
@ 2026-02-21 17:58 Frédéric Baldit
  2026-02-21 18:35 ` Roger Heflin
  2026-02-21 20:20 ` Christian Recktenwald
  0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Baldit @ 2026-02-21 17:58 UTC (permalink / raw)
  To: linux-lvm


Hi everybody,

I'm a debian 12 user, running it on a system which was initially 
installed without LVM (on a thinkpad laptop)n with classical netinst. My
system is totally installed on a unique nvme disk, with distinct
partitions, among which a /home partition for all my personal data.

I recently installed a second nvme disk (512G capacity). I would like
to extend my /home ext4 partition (which is now exclusively on
/dev/nvme0n1p6, 436G) so that I can keep my old data but have
the possibility to split /home on the initial disk and the second
recently added disk.

This seems to be possible with LVM but only when decided at the
beginning of the installation. Right or wrong?

Or would it possible to:

0) install lvm2 on my system
1) create a new ext4 partition (512G size) on the new nvme disk (using
all available space, 512G, on it)
2) create a new PV with this partition
3) create a new VG containing this unique PV
4) create a new LV on this VG
5) format this LV as an ext4 filesystem with mkfs.ext4
6) mount this LV on a new system directory, say /home1
7) migrate all the data on my old /home to the new /home1
8) modify the VG created before in order to add to it the
/dev/nvme0n1p6 PV
9) resize the LV so that it can use the new PV added
10) rename /home1 to /home

Is this globally correct??? Step 7 if crucial, as I really don't want
any loss or corruption of personal data during the transfer.

Thank's in advance for any help to my two questions, 

F. Baldit. 



--
  Frédéric Baldit

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: is it possible to use LVM AFTER system installation?
  2026-02-21 17:58 is it possible to use LVM AFTER system installation? Frédéric Baldit
@ 2026-02-21 18:35 ` Roger Heflin
  2026-02-21 20:20 ` Christian Recktenwald
  1 sibling, 0 replies; 3+ messages in thread
From: Roger Heflin @ 2026-02-21 18:35 UTC (permalink / raw)
  To: Frédéric Baldit; +Cc: linux-lvm

That seems pretty close to right.    Step 1  I would label the
partition as LVM, not that it really matters since the labels seem to
not be actively used in Linux) I did not look at every last step in
detail, but that is pretty close to what should work if executed
correctly.

On step 7 you probably need to execute it with the primary user logged
out and from a non-gui login(or a root login assuming root's home is
/root and not in /home)  to get a clean copy.

You may need to make sure your initramfs has lvm built into it, it may
not really matter for home given it can mount much later than say /
(if using lvm for /).

On Sat, Feb 21, 2026 at 11:58 AM Frédéric Baldit
<frederic.baldit@free.fr> wrote:
>
>
> Hi everybody,
>
> I'm a debian 12 user, running it on a system which was initially
> installed without LVM (on a thinkpad laptop)n with classical netinst. My
> system is totally installed on a unique nvme disk, with distinct
> partitions, among which a /home partition for all my personal data.
>
> I recently installed a second nvme disk (512G capacity). I would like
> to extend my /home ext4 partition (which is now exclusively on
> /dev/nvme0n1p6, 436G) so that I can keep my old data but have
> the possibility to split /home on the initial disk and the second
> recently added disk.
>
> This seems to be possible with LVM but only when decided at the
> beginning of the installation. Right or wrong?
>
> Or would it possible to:
>
> 0) install lvm2 on my system
> 1) create a new ext4 partition (512G size) on the new nvme disk (using
> all available space, 512G, on it)
> 2) create a new PV with this partition
> 3) create a new VG containing this unique PV
> 4) create a new LV on this VG
> 5) format this LV as an ext4 filesystem with mkfs.ext4
> 6) mount this LV on a new system directory, say /home1
> 7) migrate all the data on my old /home to the new /home1
> 8) modify the VG created before in order to add to it the
> /dev/nvme0n1p6 PV
> 9) resize the LV so that it can use the new PV added
> 10) rename /home1 to /home
>
> Is this globally correct??? Step 7 if crucial, as I really don't want
> any loss or corruption of personal data during the transfer.
>
> Thank's in advance for any help to my two questions,
>
> F. Baldit.
>
>
>
> --
>   Frédéric Baldit
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: is it possible to use LVM AFTER system installation?
  2026-02-21 17:58 is it possible to use LVM AFTER system installation? Frédéric Baldit
  2026-02-21 18:35 ` Roger Heflin
@ 2026-02-21 20:20 ` Christian Recktenwald
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Recktenwald @ 2026-02-21 20:20 UTC (permalink / raw)
  To: Frédéric Baldit; +Cc: linux-lvm

On Sat, Feb 21, 2026 at 06:58:16PM +0100, Frédéric Baldit wrote:
> 
> Hi everybody,
> 
> I'm a debian 12 user, running it on a system which was initially 
> installed without LVM (on a thinkpad laptop)n with classical netinst. My
> system is totally installed on a unique nvme disk, with distinct
> partitions, among which a /home partition for all my personal data.
> 
> I recently installed a second nvme disk (512G capacity). I would like
> to extend my /home ext4 partition (which is now exclusively on
> /dev/nvme0n1p6, 436G) so that I can keep my old data but have
> the possibility to split /home on the initial disk and the second
> recently added disk.
> 
> This seems to be possible with LVM but only when decided at the
> beginning of the installation. Right or wrong?
> 
> Or would it possible to:

create 3 partitions:
1MB for boot loader (grub)
500B for UEFI
rest: LVM PV

Something like:
  VG=vg01
  LVN=lvhome
  DRV=/dev/nvme....
  PART2=/dev/nvme....
  PART3=/dev/nvme....

  SZ=...G # slightly larger (like 1GB) than your current /home

  parted    $DRV mklabel gpt
  # those values are crucial:
  parted -s $DRV unit s mkpart primary      34     2047 set 1 bios_grub on
  parted -s $DRV unit s mkpart primary    2048  1050623 set 2 esp on
  parted -s $DRV unit s mkpart primary 1050624 100%FREE set 3 lvm on
  partprobe $DRV

  mkfs.fat -F32 $PART2
  pvcreate $PART3
  vgcreate $VG $PART3
  lvcreate $VG -n $LVN -L $SZ

  umount /home
  dd if=$OLDHOME of=/dev/$VG/$LVN bs=10M 
  resize2fs /dev/$VG/$LVN
  fsck -f /dev/$VG/$LVN
  $EDITOR /etc/fstab
  mount /home

  live happily ever after...

  cherry on top:
  - mount partition 2 somewhere
    copy the contents of your existing efi boot partition there
    umount partition 2
  - run grub to install on the new drive
  Y? If you ever come across replacing the smaller disk 
  the preparations to get the new disk bootable are already done
  
-- 
Christian Recktenwald      : voice +49 711 601 2091  : Böblinger Strasse 189
chris@citecs.de            : mobil +49 172 711 8104  : D-70199 Stuttgart

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-21 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-21 17:58 is it possible to use LVM AFTER system installation? Frédéric Baldit
2026-02-21 18:35 ` Roger Heflin
2026-02-21 20:20 ` Christian Recktenwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox