How to copy changes in /etc/pve from another Proxmox installation SSD ? (minipc dead)

Vittorio

Well-Known Member
Jul 24, 2019
79
5
48
59
Hi all

My minipc where Proxmox was installed is dead
I had two SSDs, one for boot and some data, and another one just for data

Is there a way to mount the main SSD to copy the /etc/pve change I've made during old minipc life and get into a new Proxmox installation?

I already have VM and LXC backup in a NAS, so I don't need to recover them from the SSD

Thanks
 
you can boot from a livecd, mount your root file system and chroot into it. then you can run pmxcfs -l to mount /etc/pve and copy the contents.
 
Thanks @fabian

The "old" ssd is like this

Code:
/dev/sdc                                          8:32   0 238.5G  0 disk
├─/dev/sdc1                                       8:33   0  1007K  0 part
├─/dev/sdc2                                       8:34   0   512M  0 part
└─/dev/sdc3                                       8:35   0   238G  0 part

So I have to boot from a Proxmox livecd, without installing it
From a normal Proxmox installation I've tried to mount sdc1 and sdc3 but I get this error

Code:
root@newpve:~# mount /dev/sdc3 /mnt/usb/backup
mount: /mnt/usb/backup: unknown filesystem type 'LVM2_member'.
       dmesg(1) may have more information after failed mount system call.

sdc2 is the EFI partition

Using a livecd, which one should I mount as root partition?

Thanks
 
Using a livecd, which one should I mount as root partition?
Assuming your old installation was a regular (non zfs) install, try the following:

1. Boot from a regular Linux live cd, preferably on a machine that does not have Proxmox currently installed, with the old disk connected.
2. sudo vgscan (will show Volume Groups found).
3. sudo vgchange -ay pve (will activate the pve VG).
4. sudo mkdir /media/old_pve (will make local directly for mountpoint).
5. sudo mount /dev/pve/root /media/old_pve/ (will mount the old pve root to the mountpoint).
6. Copy the necessary files from the old installation to some permanent medium.
 
  • Like
Reactions: Vittorio
it's a mountpoint. like a I said, you need to chroot into the root disk and then run pmxcfs -l to populate it..
 
@fabian

last command give me this error

Code:
ubuntu@ubuntu:/media/old_pve$ sudo chroot /media/old_pve
root@ubuntu:/# pmxcfs -l
[main] crit: Unable to resolve node name 'ubuntu' to a non-loopback IP address - missing entry in '/etc/hosts' or DNS?

and this is the /etc/hosts that seems to be the one from the old server

Code:
127.0.0.1 localhost.localdomain localhost
192.168.1.113 pve.beelink pve

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
you need to set the hostname to pve, or add an entry for "ubuntu"
 
You mean something like this?

Code:
127.0.0.1 localhost.localdomain localhost
192.168.1.113 pve.beelink pve

192.168.1.91 pve.ubuntu ubuntu

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

now I get this error

Code:
root@ubuntu:/# pmxcfs -l
[main] notice: resolved node name 'ubuntu' to '192.168.1.91' for default node IP address
fuse: device not found, try 'modprobe fuse' first
[main] crit: fuse_mount error: No such file or directory
[main] notice: exit proxmox configuration filesystem (-1)

and if I try modprobe fuse I get an error that Module fuse is not found in directory

sorry for all these question, but I'm not very familiar with this
 
Last edited:
you need to modprobe fuse outside of the chroot
 
Done
I've exited from chroot, executed command modprobe fuse and reenter to chroot

but I get same error

Code:
root@ubuntu:/# pmxcfs -l
[main] notice: resolved node name 'ubuntu' to '192.168.1.91' for default node IP address
fuse: device not found, try 'modprobe fuse' first
[main] crit: fuse_mount error: No such file or directory
[main] notice: exit proxmox configuration filesystem (-1)
 
I've added a debug to the pmxcfs command

Code:
root@ubuntu:/# pmxcfs -l
[main] notice: resolved node name 'ubuntu' to '192.168.1.91' for default node IP address
fuse: device not found, try 'modprobe fuse' first
[main] crit: fuse_mount error: No such file or directory
[main] notice: exit proxmox configuration filesystem (-1)
root@ubuntu:/# pmxcfs -ld
[main] notice: resolved node name 'ubuntu' to '192.168.1.91' for default node IP address (pmxcfs.c:859:main)
[database] debug: name __version__ (inode = 0000000000000000, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name virtual-guest (inode = 0000000000000008, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name priv (inode = 0000000000000009, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name nodes (inode = 000000000000000B, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name pve (inode = 000000000000000C, parent = 000000000000000B) (database.c:370:bdb_backend_load_index)
[database] debug: name lxc (inode = 000000000000000D, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name qemu-server (inode = 000000000000000E, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name openvz (inode = 000000000000000F, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name priv (inode = 0000000000000010, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name lock (inode = 0000000000000011, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-www.key (inode = 0000000000000018, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-ssl.key (inode = 000000000000001A, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-root-ca.key (inode = 000000000000001C, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-root-ca.pem (inode = 000000000000001E, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-root-ca.srl (inode = 0000000000000020, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-ssl.pem (inode = 0000000000000023, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name ha (inode = 0000000000000031, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name acme (inode = 0000000000000032, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name sdn (inode = 0000000000000033, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name domotica-new (inode = 0000000000017541, parent = 000000000000000B) (database.c:370:bdb_backend_load_index)
[database] debug: name qemu-server (inode = 0000000000017542, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name lxc (inode = 0000000000017543, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name openvz (inode = 0000000000017544, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name priv (inode = 0000000000017545, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-ssl.key (inode = 0000000000017546, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name pve-ssl.pem (inode = 0000000000017548, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name lrm_status (inode = 000000000001760B, parent = 0000000000017541) (database.c:370:bdb_backend_load_index)
[database] debug: name firewall (inode = 0000000000085A9B, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name token.cfg (inode = 000000000015F51D, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name datacenter.cfg (inode = 0000000000365B7C, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name shadow.cfg (inode = 000000000076948C, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name lrm_status.tmp.1196 (inode = 0000000000ACDE7B, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name lrm_status (inode = 0000000000B44B97, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name storage (inode = 0000000000BDEF72, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name trova.txt (inode = 0000000000C3367B, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name user.cfg (inode = 0000000000C7327A, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name mapping (inode = 0000000000C84570, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name 102.conf.save (inode = 0000000000C998DD, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 100.conf (inode = 0000000000CAEEBE, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 108.conf (inode = 0000000000CAEEC4, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 109.conf (inode = 0000000000CAEECA, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 113.conf (inode = 0000000000CAEED4, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 116.conf (inode = 0000000000CAEF32, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name config (inode = 0000000000CE5510, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[database] debug: name known_hosts (inode = 0000000000CFADE1, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name usb.cfg (inode = 0000000000D0DC34, parent = 0000000000C84570) (database.c:370:bdb_backend_load_index)
[database] debug: name storage.cfg (inode = 0000000000D1FD0D, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name notifications.cfg (inode = 0000000000D2974E, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name notifications.cfg (inode = 0000000000D29751, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name 107.conf (inode = 0000000000E09EE6, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 103.conf (inode = 0000000000E0B64D, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name replication.cfg (inode = 0000000000E0B65A, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name jobs.cfg (inode = 0000000000E0B65E, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name vzdump.cron (inode = 0000000000E0B663, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name 104.conf (inode = 0000000000E19745, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 110.conf (inode = 0000000000E1976B, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 118.conf (inode = 0000000000E19775, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 101.conf (inode = 0000000000E197E7, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 111.conf (inode = 0000000000E19859, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 112.conf (inode = 0000000000E198EB, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 114.conf (inode = 0000000000E19965, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 117.conf (inode = 0000000000E19B06, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 115.conf (inode = 0000000000E19C4C, parent = 000000000000000E) (database.c:370:bdb_backend_load_index)
[database] debug: name 105.conf (inode = 0000000000E19C69, parent = 000000000000000D) (database.c:370:bdb_backend_load_index)
[database] debug: name 106.conf (inode = 0000000000E19CBB, parent = 000000000000000E) (database.c:370:bdb_backend_load_index)
[database] debug: name authkey.pub.old (inode = 0000000000E1A6EF, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name authkey.pub (inode = 0000000000E1A6F2, parent = 0000000000000000) (database.c:370:bdb_backend_load_index)
[database] debug: name authkey.key (inode = 0000000000E1A6F5, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name authorized_keys (inode = 0000000000E1A745, parent = 0000000000000009) (database.c:370:bdb_backend_load_index)
[database] debug: name ssh_known_hosts (inode = 0000000000E1A748, parent = 000000000000000C) (database.c:370:bdb_backend_load_index)
[main] debug: memdb open '/var/lib/pve-cluster/config.db' successful (version = 0000000000E1A74A) (memdb.c:536:memdb_open)
[main] debug: using local mode (corosync.conf does not exist) (pmxcfs.c:931:main)
fuse: device not found, try 'modprobe fuse' first
[main] crit: fuse_mount error: No such file or directory (pmxcfs.c:955:main)
[main] notice: exit proxmox configuration filesystem (-1) (pmxcfs.c:1110:main)
 
did you follow the instructions I linked? you need to bind mount certain virtual file systems from the host into the chroot..
 
Thanks for you time!

Now I've done all the others, I didn't before because I saw same subfolders already in place

The only one it fails is this one

Code:
ubuntu@ubuntu:~$ sudo mount /dev/sdc1 /media/old_pve/boot
mount: /media/old_pve/boot: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

Even with this it seems that now I can see /etc/pve

Now I will install a brand new Proxmox onto the new minipc

What is the best "practice" to have a Proxmox installation as a clone of the previous one ?

I've already tried to boot from old ssd disk into new minipc, different brand and cpu, but it does not work

Thanks
 
And also, with previous installation i had also a second disk named "DATI" as local-lvm, where most of VMs and LXCs where located
Can I just mount it?

To get back all VMs and LXCs without restoring them from backup, is there a way copying some folders/files from what I have in my old disk?

Thanks again
 
yes, if our LVM disk is still around, you can add it as storage again and all the disks should become visible in PVE.
 
  • Like
Reactions: Vittorio

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!