Possibility of Nextcloud and VM Backup - LVC on one drive and data folder on another HDD NOOB ALERT

Lipown

Member
Jan 4, 2022
7
0
6
37
Hello, I just installed Proxmox and I had not previously realized if what I want to do is actually possible.

My idea:
1) Instal Ubuntu to proxmox so it can serve for LXCs on main HDD
2) On Ubuntu in LXC run Nextcloud on main HDD
3) Store the data for nexcloud to second HDD

Questions:
1) Is this actually possible? I will be adding the second HDD today.
2) If I do the backup of this VM will both Nexcloud on main HDD and data on second be backuped?
3) Will it be possible to restore backup if I change the setup in future to only main HDD?


Thank you very much for the answers.
 
hi,

1) Instal Ubuntu to proxmox so it can serve for LXCs on main HDD
2) On Ubuntu in LXC run Nextcloud on main HDD
why not run LXC container directly on PVE? running it in a VM will only cause more overhead.

3) Store the data for nexcloud to second HDD
1) Is this actually possible? I will be adding the second HDD today.
yes can be done, you could use a bind mount [0] on your container to pass the directory from the host into it.

alternatively you can just create a new storage on your new HDD, and create a new disk on that storage. in that case you'll be able to back up normally.

2) If I do the backup of this VM will both Nexcloud on main HDD and data on second be backuped?
bind mounts are skipped during backup operations, but you can back it up separately if you wish...

3) Will it be possible to restore backup if I change the setup in future to only main HDD?
read my answers above. restore is possible with virtual disk.

if you have any questions don't hesitate to ask :)


[0]: https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points
 
Thanks for great answer. If for example I alocate 300GB to LXC container but only 10 GB will be used, will the backup have 300GB or 10 GB please?
 
Thanks for great answer. If for example I alocate 300GB to LXC container but only 10 GB will be used, will the backup have 300GB or 10 GB please?
that depends on what kind of storage you use. if you're using a thin provisioned storage like lvmthin or zfs, then only 10G will be used.
with raw disks you'll get the full size
 
why not run LXC container directly on PVE? running it in a VM will only cause more overhead.
You still need to run a template system which is running like vm doesnt?

Will the better solution with less overhed will be turnkey nextcloud from template or run nc on different template?

This might not be right quiestion for this forum but for example if I run Nexcloud with enabled encryption and mount to it samba share (trough it GUI). Upload the file - which will be encrypted to the samba mount, Then move the file on Samba server for "test" to different folder which I then mount to NC. WIll I be able to read the encrypted file through NC? Thinking about possible solutions of backup. Since I would like to use samba to share space for nexcloud.
 
Last edited:
I set up the plan.
  • I have 1 NVMe 0,5 TB where Proxmox is installed. - done
  • I added yesterday +1 HDD 1,5 TB (rotary) set as LVM Thin storage - done but issues below
  • I will have +1 HDD 1,5TB (rotary) set only for backups, maybe spare space for containers which will does not need backup. I need to figure how I will do so.

  • I have Home assistant VM on NVMe drive - done
  • I want to have Nextcloud LXC on NVMe. Dont know if turnkey or LXC on debian (or proxmox debian if possible to not make another overhead)
  • I want to have Openmediavault or siply LXC lightweight linux distro to serve samba for home networkI chose to instal Openmediavault since it add 0 watts in idle and possthrough the first HDD into it.
    • I will share space with Proxmox thru NFS for backups. OMV is up and running.
    • The drive spindown anc cache settings does not work thru OMV and needs to be done thru hdparm in Proxmox.
    • ?Trying to combination of APM, standby/cache. Spindown with or without cache currently saves 4W on one drive. I expected more like on pi.
  • I want to have another LXC for docker containers
Plan for today:
  • Reinstal Proxmox so main drive is ZFS instead of default. I ges it lower I/O since using ram.

So far I have this issues:

I am looking for the power efficiency. I came from raspberry pi 4 cause stability issue. Without any rotary drive in idle with current setup my current server take 20watts vs pi 12watts (i expected that and it is ok)
  • mentioned 20 watts with governor set to "powersave" from THIS GUIDE
  • I will test powertop
  • I will try to make same savings in bios

Drive Cache - Since I added the 1 x rotary drive (Seagate), the consumtion rised to 34watts. On Pi I had the same increase when drive were spinning but then I settted the cache in GUI Gnome discs, the increase dropped to around 4watts max when spinning. Where i can enable cache in proxmox.
  • As above mentioned, tried to setup cache in HDParm does not lower wattage.

Partially solved - Drive Spindown - I am not able to set drive spindown with HDParm. If the drive spin downs it immidiatelly spin up after. If I follow this guide and add sda (the rotary drive) to global filter the the thin LVM storage disappears however the drive spins down. I need drives to spindown because:
  • They will serve only for data which will be accessed ~ 1 - 2 times per week
  • Second will be served for backup which will be 2x per week
  • 2x14watts is a lot (+60€ approx bill annually)
  • They are noisy - I do not have another place to place the server to except below TV in livingroom where my router is near also. We do not have another UTP socket in our small appartment. I can hear the HDD noise in my bedroom when door is closed during the night :/
If I use ZFS instead of ThinLVM will I be able to spin down the drives? Note to self - learn about ZFS as I have no idea what is it currently :)
Is there another solution? I came up to that I might install debian and on top of that proxmox. In debian gnome discs which is only utility where I could solve the spin down and cache in the Raspberry pi dates. HDparm did not worked as far as I remember and did exactly the same thing. Girlfriend starting to hate me because I spend to much time with this :))

I am affraid that I will return to solution I have had on PI - debian and on that everything - docker, nextcloud, samba shares, home asssitant, file servers etc. which is not that stable :(
 
Last edited:

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!