[SOLVED] Help need to add disk to Proxmox VE

gersongarcia67

New Member
Feb 12, 2021
4
1
3
58
Hello guys,

Sorry, I am quite new to Proxmox...

I lost my Proxmox server yesterday and I re-installed it. But the disk with all my VMs are preserved.

Please how can I add this disk safely to my new server. And re-add my VMs

Thank you very much,
 
What type of storage was your disk with the VM images? LVM? ZFS?

If you don't backuped your VMs you only got the disk images and lost all the VM configurations so you would need to create new VMs but you can use the old disk images.
 
What type of storage was your disk with the VM images? LVM? ZFS?

If you don't backuped your VMs you only got the disk images and lost all the VM configurations so you would need to create new VMs but you can use the old disk images.
What is the location of the VMs files? I can check if they still there...

I believe it is LVM, but I am not sure about that. The only thing I can see is:

1613161285808.png

Thank you!!!
 
VM configs were stored on your failed proxmox drive (/etc/pve/qemu-server).

What are fdisk -l /dev/sdb and lsblk /dev/sdb showing?
 
Code:
root@mypve:~# fdisk -l /dev/sdb
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xb9048e87

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907029167 3907027120  1.8T 83 Linux
root@mypve:~# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   0  1.8T  0 disk
└─sdb1   8:17   0  1.8T  0 part

root@mypve:~# mkdir /t
root@mypve:~# mount /dev/sdb1 /t
root@mypve:~# ls -al /t
total 40
drwxrwxr-t  7 root plugdev  4096 May 26  2020 .
drwxr-xr-x 19 root root     4096 Feb 12 14:36 ..
drwxr-xr-x  2 root root     4096 May 26  2020 dump
drwxr-xr-x 14 root root     4096 Dec  4 23:21 images
drwx------  2 root root    16384 May 22  2020 lost+found
drwxr-xr-x  2 root root     4096 May 26  2020 private
drwxr-xr-x  4 root root     4096 May 26  2020 template
root@mypve:~# ls -al /t/images/
total 56
drwxr-xr-x 14 root root    4096 Dec  4 23:21 .
drwxrwxr-t  7 root plugdev 4096 May 26  2020 ..
drwxr-----  2 root root    4096 May 26  2020 100
drwxr-----  2 root root    4096 May 26  2020 101
drwxr-----  2 root root    4096 May 27  2020 102
drwxr-----  2 root root    4096 May 31  2020 103
drwxr-----  2 root root    4096 May 30  2020 105
drwxr-----  2 root root    4096 May 31  2020 106
drwxr-xr-x  2 root root    4096 Jun 15  2020 107
drwxr-----  2 root root    4096 Jun 24  2020 108
drwxr-xr-x  2 root root    4096 Jun 24  2020 109
drwxr-xr-x  2 root root    4096 Aug 17 13:39 110
drwxr-xr-x  2 root root    4096 Aug 17 13:39 111
drwxr-xr-x  2 root root    4096 Dec  4 23:21 112

I believe the VMs are gone...

Code:
root@mypve:~# ls -al /etc/pve/qemu-server/
total 0
drwxr-xr-x 2 root www-data 0 Feb 14  2019 .
drwxr-xr-x 2 root www-data 0 Feb 14  2019 ..
root@mypve:~# lsblk /dev/sda
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                  8:0    0 489.1G  0 disk
├─sda1               8:1    0  1007K  0 part
├─sda2               8:2    0   512M  0 part
└─sda3               8:3    0 488.6G  0 part
  ├─pve-swap       253:0    0     8G  0 lvm  [SWAP]
  ├─pve-root       253:1    0    96G  0 lvm  /
  ├─pve-data_tmeta 253:2    0   3.7G  0 lvm
  │ └─pve-data     253:4    0 361.2G  0 lvm
  └─pve-data_tdata 253:3    0 361.2G  0 lvm
    └─pve-data     253:4    0 361.2G  0 lvm

Thank you very much, I really appreciate your help.
 
Last edited:
Code:
root@mypve:~# fdisk -l /dev/sdb
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xb9048e87

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907029167 3907027120  1.8T 83 Linux
root@mypve:~# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   0  1.8T  0 disk
└─sdb1   8:17   0  1.8T  0 part

root@mypve:~# mkdir /t
root@mypve:~# mount /dev/sdb1 /t
root@mypve:~# ls -al /t
total 40
drwxrwxr-t  7 root plugdev  4096 May 26  2020 .
drwxr-xr-x 19 root root     4096 Feb 12 14:36 ..
drwxr-xr-x  2 root root     4096 May 26  2020 dump
drwxr-xr-x 14 root root     4096 Dec  4 23:21 images
drwx------  2 root root    16384 May 22  2020 lost+found
drwxr-xr-x  2 root root     4096 May 26  2020 private
drwxr-xr-x  4 root root     4096 May 26  2020 template
root@mypve:~# ls -al /t/images/
total 56
drwxr-xr-x 14 root root    4096 Dec  4 23:21 .
drwxrwxr-t  7 root plugdev 4096 May 26  2020 ..
drwxr-----  2 root root    4096 May 26  2020 100
drwxr-----  2 root root    4096 May 26  2020 101
drwxr-----  2 root root    4096 May 27  2020 102
drwxr-----  2 root root    4096 May 31  2020 103
drwxr-----  2 root root    4096 May 30  2020 105
drwxr-----  2 root root    4096 May 31  2020 106
drwxr-xr-x  2 root root    4096 Jun 15  2020 107
drwxr-----  2 root root    4096 Jun 24  2020 108
drwxr-xr-x  2 root root    4096 Jun 24  2020 109
drwxr-xr-x  2 root root    4096 Aug 17 13:39 110
drwxr-xr-x  2 root root    4096 Aug 17 13:39 111
drwxr-xr-x  2 root root    4096 Dec  4 23:21 112
You got a "lost+found" folder so sdb looks to be just a plain ext4 partition.
You can mount that folder using fstab for example:
nano /etc/fstab
And add a line like...
/dev/sdb /mnt/hdd ext4 defaults,noatime,nodiratime 0 0
...so your partition gets mounted to /mnt/hdd.

Next you need to create new storages for your VMs disk images ("disk image"), backups ("vzdump") and so on Proxmox so it knows where to look for and store stuff.
You can do that using GUI by going to "Datacenter -> Storage -> Add -> Directory" and point it to the folders in that mountpoint.
For example, if your old storage for "disk image" was the folder now mounted in "/mnt/hdd/images" choose that path and select "disk image" as content.
Reboot after that and check if you are able to select a existing disk image for the VM.

You really should considering using raid1 and a external backup storage (USB-HDD, NAS, PBS) so this don't happen again.