Re-installing Proxmox help

DomF

Member
Nov 7, 2017
43
3
13
52
I've been having problems with my Proxmox installation overtime with pve_root partition running low of space. My PVE installation resides on a 16Gb usb stick and VMs/Containers reside on a ZSF pool of hard disks.

This my my original post:
https://forum.proxmox.com/threads/pve-root-full-and-iso-location.43459/#post-208906

I feel my installation has other issues as well and so I want start again with a fresh install on a bigger usb stick (128GB) and re-connect to my hard disks containing the VMs and Containers.

What is the best way to do this?

Thanks,
Dominic
 
If you've got a completely separate storage setup for your VMs, and your USB stick only holds the Proxmox installation, then I'd say backup the configuration files from /etc/pve/qemu-server/, re-OS on a new USB stick, add your ZFS storage back giving it the same name in Proxmox as it had before, and then put your configuration files back in /etc/pve/qemu-server/.
 
My current setup gave up the ghost recently with "out of space" issue. I tried to remove some files but didn't make much difference. The web gui doesn't work anymore but I can still ssh into the server and so tried to backup my configurations. Some how /etc/pve/ is empty there is no qemu-server directory nor my VM conf files (I'm sure I didn't deleted them by mistake). Anyway, I don't think this is too much of a problem as I have a pve report having the config details.

I proceeded with creating a new USB stick (64GB) with proxmox. Once booted I ran zpool create data -f /dev/sda. However, I think this initialised the SSD drive and possibly I have lost my VM hard-disks. I stopped here, and swapped back to my first USB stick (16GB) running Proxmox, ssh'ed into the server and ran zpool status which didn't show the data zpool, my second zpool nas is still present for now.

My questions:
1) How do I bring back my previous zpool data?
2) How do I connect my new proxmox installation to my data stored in the zpools data and nas?

Thanks,
Dominic
 
1) How do I bring back my previous zpool data?

You'll have to ssh into the new installation, and run zpool import and that will show you the list of zpools that can be imported. From there do zpool import <yourzpoolname> and your zpool will be associated with your new installation and automatically import on reboot. You may have to add -f to that command to force it to import the pool.

2) How do I connect my new proxmox installation to my data stored in the zpools data and nas?

If you don't have the VM configuration files, then the only way I know how to do this is to attach the zpool and the NAS as they were attached to Proxmox previously (Storage -> add -> ZFS, etc.). Then you create new VMs. I think Proxmox is smart enough to not create a new virtual disk over an existing virtual disk. So say you have vm-100-disk-1 already, if you create a new VM 100, it will create it with a virtual disk vm-100-disk-2. But, if you don't want to take the chance, use different VM numbers from what you had before.

Once you have virtual machines configured for each of your devices, you will have to go into the configuration files at /etc/pve/qemu-server/ and change their disk to look at the old virtual disks.

Does that make sense? I feel like I got wordy, and my explanation suffers.
 
Thanks for getting back. I've pretty much lost the my zpool called data (as I already performed zpool create data -f /dev/sda which overwrote data) but I managed to bring up my zpool called nas with the commands:
zpool extport nas using the old proxmox server
and then running zpool import nas on the proxmox server.

Now, I have to attach nas to the proxmox storage. I think I had originally setup the storage for nas as a directory (storage -> add -> Directory). I'll try to back-up the directory first if I can before making the attachment just incase the directory and contents is overwritten.

Thank you for your guidance.
 
I thought the last bit might be easy but I have encountered a few difficulties attaching the storage to PVE. I had done the following:
storage -> add -> ZFS gave the label zfsnetwk-storage, type image and container.

I created a Fileserver container and set the mount point to zfsnetwk-storage, at this point it created the subvol-100-disk-2 directory (when I imported my nas zpool it had subvol-100-disk-1 present). So, here I thought I could remove subvol-100-disk-2 and rename subvol-100-disk-1 to ...disk-2 but I got a message saying can't remove as device busy. I thought this to be strange as the Fileserver container wasn't running so I don't how to remove the directory. I carried on by copying the content from the subvol-disk-1 directory to the subvol-100-disk-2 directory which seem to be going well. However, the server would get into a strange state and the copying would fail after some time, this is probably another forum topic (soft lockup - CPU#6 stuck stuck).

My question is, how do I remove subvol-100-disk-2 and replace it with subvol-100-disk-1 (if I can't use rm -rf)?
 

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!