Linux Volume Manager [LVM] on DietPi?

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
PDXpi
Posts: 13
Joined: Fri Apr 12, 2019 11:17 pm

Linux Volume Manager [LVM] on DietPi?

Post by PDXpi »

I'd like to use my Rock64 as a file repository by attaching an external SSD to the USB3 interface.

And, for a couple of different reasons, I would like to allocate space on the external SSD using the Linux Volume Manager [LVM].
  1. Is LVM supported by DietPi?
  2. What are the recommendations for using LVM on DietPi?
I only ask because I noticed that LVM doesn't seem to be an option that's available in dietpi-software or dietpi-drive_manager. But it is available via APT.

TIA,
Eric P.
Portland, Oregon
PDXpi
Posts: 13
Joined: Fri Apr 12, 2019 11:17 pm

Re: Linux Volume Manager [LVM] on DietPi?

Post by PDXpi »

PDXpi wrote: Fri Jan 29, 2021 5:12 am I only ask because I noticed that LVM doesn't seem to be an option that's available in dietpi-software or dietpi-drive_manager. But it is available via APT.

FWIW: Installation was a breeze...

Code: Select all

dietpi@DietPi:~$ sudo apt install thin-provisioning-tools lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dmeventd libaio1 libdevmapper-event1.02.1 liblvm2cmd2.03 libreadline5
The following NEW packages will be installed:
  dmeventd libaio1 libdevmapper-event1.02.1 liblvm2cmd2.03 libreadline5 lvm2 thin-provisioning-tools
0 upgraded, 7 newly installed, 0 to remove and 1 not upgraded.
Need to get 2,090 kB of archives.
After this operation, 8,324 kB of additional disk space will be used.
Do you want to continue? [Y/n] 

And LVM seems to work as it usually does...

Code: Select all

dietpi@DietPi:~$ sudo pvcreate /dev/sda1
WARNING: ext4 signature detected on /dev/sda1 at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/sda1.
  Physical volume "/dev/sda1" successfully created.

dietpi@DietPi:~$ sudo vgcreate Rock64 /dev/sda1
  Volume group "Rock64" successfully created

dietpi@DietPi:~$ sudo lvcreate -L 100G -n WD500 /dev/Rock64
  Logical volume "WD500" created.

dietpi@DietPi:~$ sudo pvs
  PV         VG     Fmt  Attr PSize    PFree   
  /dev/sda1  Rock64 lvm2 a--  <465.73g <365.73g

dietpi@DietPi:~$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree   
  Rock64   1   1   0 wz--n- <465.73g <365.73g

dietpi@DietPi:~$ sudo lvs
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  WD500 Rock64 -wi-a----- 100.00g

In conclusion: It seems to "work right out of the box"! I'll put it through a few paces and report back!
Last edited by PDXpi on Fri Jan 29, 2021 6:41 pm, edited 2 times in total.
Eric P.
Portland, Oregon
User avatar
Joulinar
Posts: 5170
Joined: Sat Nov 16, 2019 12:49 am

Re: Linux Volume Manager [LVM] on DietPi?

Post by Joulinar »

I did a LVM test installation in the past. Some information on this post viewtopic.php?f=9&t=8225&p=28280&hilit=lvm#p28280
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply