[SOLVED] Migration from VM to CT, question about rootfs

LangDuTienTu

Member
Sep 15, 2020
12
0
21
36
Iam currently have 1 NAS and 1 Webserver on Proxmox as VM that I wanna migrate to CT. Each VM has its own dedicated NVMe passthrough as system partition, and the NAS I passthrough another RAID controller for HDDs.

Using CT, I wanna maintain each CT has its own rootfs on an isolated SSD. I did some research and find out there are 3 types of rootfs that Image bases, ZFS subvolume and Directory. Could you help me decide what is the best and the most efficiency type for my case. And if possible, please write me a simple guide to setup the CT.

Iam sorry that I did not test some cases first before asking this question. I only have free time on weekend and it's a bit tight, I also wanna have some advice first to avoid make it a mess :D

Thank you
 
Each VM has its own dedicated NVMe passthrough as system partition, and the NAS I passthrough another RAID controller for HDDs.
Why is it so complicated? You use a virtualization system and then decide to "unvirtualize" the storage. Everything you would have with virtualization is not present:
  • no thin provisioning
  • no compresseion
  • no snapshots
  • no redundancy
For containers, ZFS is the most practical system I know, and each container would have its own ZFS dataset, directly mounted on the PVE host for easy access.
Easiest way to migrate the data would be to just create new containers with the same OS, stop the containers and rsync all files to the container directory with appropriate command line options.
 
  • Like
Reactions: LangDuTienTu
Why is it so complicated? You use a virtualization system and then decide to "unvirtualize" the storage. Everything you would have with virtualization is not present:
  • no thin provisioning
  • no compresseion
  • no snapshots
  • no redundancy
For containers, ZFS is the most practical system I know, and each container would have its own ZFS dataset, directly mounted on the PVE host for easy access.
Easiest way to migrate the data would be to just create new containers with the same OS, stop the containers and rsync all files to the container directory with appropriate command line options.

I donot use those features you mentioned, so it would be okay. Beside I wanna prevent IO Wait cause of high system load may happen, so each container should have its own SSD. There are some more VM/CT on the host, they are not IO sensitive as NAS and Webserver and I would keep them in LVM-Thin as usual.

In fact the reason I wanna migrate to CT cause of the RAID controller I passthough to NAS has higher latency. I run surface scanning of a HDD and VM environment gives higher latency than I run it in bare metal environment. In case I use CT and pass them all using bind-mount I think that should be better.

Back to the topic, thank you for your advice, I plan to go with ZFS too. There are some steps I wanna make it clear before I start. I assume step by step would be:
- Datacenter > Storage > Add: what should I choose, is it ZFS? I guest that I have to create a ZFS Pool before adding, am I right?
- Create CT Wizard: I guest I cannot change rootfs to ZFS Pool from here, and I have to use cli

And a further more question. My Proxmox currently use ext4, I plan to reinstall it as ZFS too, should I?

I know I ask too much, thank you for your patient :D
 
- Datacenter > Storage > Add: what should I choose, is it ZFS? I guest that I have to create a ZFS Pool before adding, am I right?
Yes, the pool should exist beforehand, so you need another disk for this.

- Create CT Wizard: I guest I cannot change rootfs to ZFS Pool from here, and I have to use cli
If you already have the container, backup & restore, if not, just create a new container on ZFS and then move to the place where the data is stored on disk. Default is /<poolname>/data/subvol-<vmid>-disk-<diskid>.
 
  • Like
Reactions: LangDuTienTu
If you already have the container, backup & restore, if not, just create a new container on ZFS and then move to the place where the data is stored on disk. Default is /<poolname>/data/subvol-<vmid>-disk-<diskid>.

In this case while using Create CT Wizard, Im afraid that Proxmox gonna store a .raw image format on that ZFS Pool, itn't it?

I don't wanna use image based rootfs cause it has worse performance. If Iam right, I must setup with cli --rootfs poolname:0. Or this steps I assume is directory based type but not ZFS subvolume?
 
I just figure it out, a moderator confirmed that if using a ZFS Pool for rootfs it will use a subvolume, so no worries at all.

Thank you for your guide, it's gonna save me some time :D
 

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!