[SOLVED] Change local storage on md device to logical volume

chriswol

Member
Jun 1, 2021
31
4
13
Hi,

I have a root server from my provider (Ionos). It is configured with 2 ssd's with a software raid1. Problem is, that I have a limited set of preinstalled images I can install. The proxmox image comes without lvm configured, so `lsblk` looks so:

Code:
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   3.6T  0 disk 
├─sda1    8:1    0   511M  0 part 
│ └─md1   9:1    0 510.9M  0 raid1 /boot/efi
├─sda2    8:2    0   1.4G  0 part 
│ └─md2   9:2    0   1.4G  0 raid1 /boot
├─sda3    8:3    0   3.7G  0 part 
│ └─md3   9:3    0   3.7G  0 raid1 [SWAP]
└─sda4    8:4    0   3.6T  0 part 
  └─md4   9:4    0   3.6T  0 raid1 /
sdb       8:16   0   3.6T  0 disk 
├─sdb1    8:17   0   511M  0 part 
│ └─md1   9:1    0 510.9M  0 raid1 /boot/efi
├─sdb2    8:18   0   1.4G  0 part 
│ └─md2   9:2    0   1.4G  0 raid1 /boot
├─sdb3    8:19   0   3.7G  0 part 
│ └─md3   9:3    0   3.7G  0 raid1 [SWAP]
└─sdb4    8:20   0   3.6T  0 part 
  └─md4   9:4    0   3.6T  0 raid1 /

There is no empty device or any space left on that server. Is there any possibility to change/transform this local storage to local-lvm?


Kind regards,
Christian
 
So you have 3.6TB mirrored device, with most space allocated to root partition/filesystem - 3.6TB.
You can search and read up on "reduce filesystem root partition" guides available on the internet. However, keep in mind that a mistake during such procedure can lead to data loss. "shrink" is another keyword you can use instead of "reduce".

You can use existing layout as is with "local" storage and qcow files as disk images. Or, another option, is to backup your data and reinstall.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi and thanks for your answer. So I assume there is no "magic" transform mdraid to lvm, right? ;)

I read in the wiki, that mdraid is not recommended because of missing error correction. I think that I have to cancel the contract with my provider then. There seems no possibility to initially install proxmox with lvm configured. :mad:
 
Hi and thanks for your answer. So I assume there is no "magic" transform mdraid to lvm, right?
You can place lvm on top of mdraid device, you can place it on a section/partion of mdraid device. If you want to convert R1 mdraid to R1 LVM device - you are going to need to tear it down and rebuild from scratch.

I am not sure what exactly you mean by error correction, but I suspect you wont find it in LVM mirror either.
Mdraid and LVM have different purpose. One is strictly a disk protection technology, the other is a Volume Manager. LVM allows you to slice and dice your disk (whether mdraid, direct disk or almost anything else). That further enables things like snapshots and clones, as well as thin provisioning.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
It was just a reference to the proxmox wiki: https://pve.proxmox.com/wiki/Software_RAID

So regardless of lvm, I am unsure if I want to run the server in production mode with mdraid. Thanks for your input, I understand that my initial question makes less sense and I have to deal with mdraid anyways or cancel the server contract with my provider.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!