Backup on second physical disk connected to the same motherbord

klibr

New Member
Oct 18, 2011
12
0
1
Hello everybody,

First of all, thanks your for this freeware proxmox. Atm I dont know another free product for virtualization like proxmox. Thanks!

I come as a matter of urgency because time goes by and I do not find solution has my problem. I need your help please!

As I understood, if I wish to have on a physical machine, two physical disks, among which one where is installed proxmox and to say has proxmox to make the backup of VM on the second physical disk, I owe installed Linux above and create a LVM group. Then I have to add the group in the proxmox interface and the managed towards the second physical disk. Is that right?

It is good as this that I have to proceed or it is possible to make so that proxmox reconize the second physical disk a space of storage and so make the manipulation for the backup on the second file.

I am a windows user and Linux is another world for me. I really need your help because I am clamped on this problem from now on two week...

Thank you very much and very sorry for my bad english :<
 
Last edited:
Hello everybody,

First of all, thanks your for this freeware proxmox. Atm I dont know another free product for virtualization like proxmox. Thanks!

I come as a matter of urgency because time goes by and I do not find solution has my problem. I need your help please!

As I understood, if I wish to have on a physical machine, two physical disks, among which one where is installed proxmox and to say has proxmox to make the backup of VM on the second physical disk, I owe installed Linux above and create a LVM group. Then I have to add the group in the proxmox interface and the managed towards the second physical disk. Is that right?

It is good as this that I have to proceed or it is possible to make so that proxmox reconize the second physical disk a space of storage and so make the manipulation for the backup on the second file.

I am a windows user and Linux is another world for me. I really need your help because I am clamped on this problem from now on two week...

Thank you very much and very sorry for my bad english :<
Hi,
for backup is a new lvm nor the best solution (this is for VM-images).
Simply create an partition on the disk (fdisk) and create an filesystem (like "mkfs.ext4 /dev/sdb1"). After that create an mountpoint ("mkdir /backup") and create an entry in /etc/fstab (use the UUID - see with "blkid /dev/sdb1"). Test with "mount /backup".
After that create the directory /backup in the storage-gui.

Udo
 
Hello again guys,

I have done your comment like that:

1. fdisk -l |more

2. fdisk /dev/sdb

[proxmox:~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 10011.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-10011, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-10011, default 10011): +10000M
Command (m for help): p
Disk /dev/sdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 10011 9775521 83 Linux
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.


3. pvcreate /dev/sdb1

4. vgcreate backup /dev/sdb1

5. vgdisplay -v backup

6. lvcreate -L10000 -n vm101 backup

7. lvdisplay -v /dev/backup/vm101

8. mkfs.ext4 /dev/backup/vm101

9. mkdir -p /backup/vm101 in [proxmox:~#]

10. mount /dev/backup/vm101 /backup/vm101

And finally i added new directory in storage GUI with /backup/vm101 link and added new job for auto. backup

Is that right ? Where can I see if my .tgz backup is realy in sdb and not in sda ?

Thanks you ^^
 
Last edited:
Hi,
lvm for backup makes only sense if you don't backup VMs which are on the same VG (because of lvm-snapshot - you will get trouble)!
Why you create for each vm an backup-lv? This is not very flexible - easy create on big filesystem and backup all VM on this filesystem. If you have more nodes, share the backup-filesystem via nfs.

To see where the files are ->
ls -l /backup/vm101
or simple "df -k" to see how much is used

Udo
 
Hi,
lvm for backup makes only sense if you don't backup VMs which are on the same VG (because of lvm-snapshot - you will get trouble)!
Why you create for each vm an backup-lv? This is not very flexible - easy create on big filesystem and backup all VM on this filesystem. If you have more nodes, share the backup-filesystem via nfs.

To see where the files are ->
ls -l /backup/vm101
or simple "df -k" to see how much is used

Udo

Ok so icreated new partion on sdb (sdb1) then i added new volume groupe (vgdata) and in vgdata i added new logical volume (lvbackup) and i mounted /dev/vgdata/lvbackup on /mnt/backup

Yesterday when i entered df -h i saw /dev/mapper/vgdata-lvbackup but today, after a shutdown when i use df -h command i dont see /dev/mapper/vgdata-lvbackup ? Is that normal ? Do i need to mount /dev/vgdata/lvbackup /mnt/backup everytime when i shutdown proxmox ?

Thanks you again Udo

EDIT: I tried to put out my harddisk (sdb1) and i putted it on another proxmox server. I launched proxmox and mounted the logical volum to the proxmox. I added the directory storage and now i can see the file i saved before in the old proxmox server. then i have done this : qmrestore vzdump-qemu-<vm_id>-<date>.tgz <new_vm_id>

The VM was restore in the new proxmox server i see the 32G HDD in option but when i click start it shutdown auto. and in logs i have this message:

Oct 24 11:47:37 pvedaemon 2707 starting VM 101 on node 0 (localhost)
Oct 24 11:47:37 qm 2708 VM 101 start
Oct 24 11:47:37 qm 2708 VM 101 start failed: command '/usr/bin/kvm -monitor unix:/var/run/qemu-server/101.mon,server,nowait -vnc unix:/var/run/qemu-server/101.vnc,password -pidfile /var/run/qemu-server/101.pid -daemonize -usbdevice tablet -name winxpsp2 -smp sockets=1,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -localtime -rtc-td-hack -k fr-ch -drive file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=ide,index=0,cache=none,boot=on -drive if=ide,index=2,media=cdrom -m 512 -netdev type=tap,id=vlan0d0,ifname=tap101i0d0,script=/var/lib/qemu-server/bridge-vlan -device rtl8139,romfile=,mac=BE:3D:1B:1D:A5:F3,netdev=vlan0d0 -id 101 -cpuunits 1000' failed with exit code 1
Oct 24 11:47:37 pvedaemon 2707 VM 101 start failed -

Can u help me please ?
 
Last edited:
Ok so icreated new partion on sdb (sdb1) then i added new volume groupe (vgdata) and in vgdata i added new logical volume (lvbackup) and i mounted /dev/vgdata/lvbackup on /mnt/backup

Yesterday when i entered df -h i saw /dev/mapper/vgdata-lvbackup but today, after a shutdown when i use df -h command i dont see /dev/mapper/vgdata-lvbackup ? Is that normal ? Do i need to mount /dev/vgdata/lvbackup /mnt/backup everytime when i shutdown proxmox ?
Yes, if you ignore my hints it's normal.
Look in my old posting, there are info about /etc/fstab (this do the mounting at startup).
Thanks you again Udo

EDIT: I tried to put out my harddisk (sdb1) and i putted it on another proxmox server. I launched proxmox and mounted the logical volum to the proxmox. I added the directory storage and now i can see the file i saved before in the old proxmox server. then i have done this :qmrestore vzdump-qemu-<vm_id>-<date>.tgz <new_vm_id>

The VM was restore in the new proxmox server i see the 32G HDD in option but when i click start it shutdown auto. and in logs i have this message:



Can u help me please ?
What is the output of "qm start 101"?

Udo
 
Yes, if you ignore my hints it's normal.
Look in my old posting, there are info about /etc/fstab (this do the mounting at startup).

What is the output of "qm start 101"?

Udo

ok thanks i will add it in /etc/fstab ^^

mmh sorry Udo but what do you mean by "output of qm strat 101" ?
 
Last edited:
log in the pve-host via console or ssh as root and type on the console
Code:
qm start 101

okey i typed "qm start 101" and i have this :

[Proxmox:~#] qm start 101
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
No accelerator found!
start failed: command '/usr/bin/kvm -monitor unix:/var/run/qemu-server/101.mon,server,nowait -vnc unix:/var/run/qemu-server/101.vnc,password -pidfile /var/run/qemu-server/101.pid -daemonize -usbdevice tablet -name winxpsp2 -smp sockets=1,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -localtime -rtc-td-hack -k fr-ch -drive file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=ide,index=0,cache=none,boot=on -drive if=ide,index=2,media=cdrom -m 512 -netdev type=tap,id=vlan0d0,ifname=tap101i0d0,script=/var/lib/qemu-server/bridge-vlan -device rtl8139,romfile=,mac=BE:3D:1B:1D:A5:F3,netdev=vlan 0d0 -id 101 -cpuunits 1000' failed with exit code 1
[Proxmox:~#] _

What I have done wrong ? :O
 
Hi,
your VM use the cdrom of the host. Does the host has an cdrom? Does it's works, if you change the cdrom in the VM (hardware) to "none (eject)"??

Udo

Hi Udo,

No i dont have any cd in my cdrom and cdrom in the VM is already as "none (eject)" :(

I must informe you that when i added the directory storage in my first proxmox server to do backup i configure it like this:

Storage Name: BCK_VM
Directory: /mnt/backup
Enalbe: Yes
Shared: Yes
COntent: VZDump Backups

Maybe is that the problem? Do i need to select Virutal disk instead of VZDump backups ?

@Ip86: I will check this right now, thanks for your help too ^^

EDIT: Ip86 was right, the problem is in the BIOS because i tried to create new VM and when i want to choose KVM type i see "Attention: KVM module not loaded. Maybe you need to enable Intel VT / AMD-V support in the BIOS."
 
Last edited:
Ok guys Ip86 was right the Intel VT was disabled i enabled it and now it work fine !!

Thanks your so much Udo and Ip86. Thanks for your help ^^

I have just two last questions:

What is the difference between Virtual disk backup and VZDump back? Just to know ^^

When i type "nano /etc/fstab" i can enter in it but i dont know what i need to write to do the mounting at startup. I notice your comment Udo (use the UUID - see with "blkid /dev/sdb1") I need to write a new line with this: /dev/sdb1: UUID="jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC" TYPE="lvm2pv" in /etc/fstab ? only this?

Have a nice day guys
 
Last edited:
...
When i type "nano /etc/fstab" i can enter in it but i dont know what i need to write to do the mounting at startup. I notice your comment Udo (use the UUID - see with "blkid /dev/sdb1") I need to write a new line with this: /dev/sdb1: UUID="jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC" TYPE="lvm2pv" in /etc/fstab ? only this?...
Hi,
look at the entry for /boot and the first line gives the description (# <file system> <mount point> <type> <options> <dump> <pass>).
Your line schould looks like this
Code:
UUID=jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC  /mnt/backup ext4 defaults 0 1
Test the config with "mount /mnt/backup" ( do an umount before ).

BTW. you have marked shared for the filesystem - this mean all clusternodes can access this filesystem on they own host (only possible in your config if you share the mountpoint via nfs and have them mounted on the other nodes).

Udo
 
Hi,
look at the entry for /boot and the first line gives the description (# <file system> <mount point> <type> <options> <dump> <pass>).
Your line schould looks like this
Code:
UUID=jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC  /mnt/backup ext4 defaults 0 1
Test the config with "mount /mnt/backup" ( do an umount before ).

BTW. you have marked shared for the filesystem - this mean all clusternodes can access this filesystem on they own host (only possible in your config if you share the mountpoint via nfs and have them mounted on the other nodes).

Udo

Hi Udo,

Its doesn't work i dont know why. I added this line "UUID=jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC /mnt/backup ext4 defaults 0 1" on /etc/fstab but i have not a mounting a the boot.

I dont understand why :<
 
Hi Udo,

Its doesn't work i dont know why. I added this line "UUID=jLB6eJ-KvMW-6zkc-uXVF-w5s0-HE13-WA0udC /mnt/backup ext4 defaults 0 1" on /etc/fstab but i have not a mounting a the boot.

I dont understand why :<
Hi,
please post the output of the following commands:
Code:
umount /mnt/backup
mount /mnt/backup
cat /etc/fstab
fdisk -l
blkid
Udo
 
Hi,
please post the output of the following commands:
Code:
umount /mnt/backup
mount /mnt/backup
cat /etc/fstab
fdisk -l
blkid
Udo

hi Udo, i have done this:

proxmox:~# mount /dev/vgdata/lvdisplay /mnt/backup
EXT3-fs: barriers disabled
kjournald starting. Commit interval 5 seconds
EXT3-fs (dm-3): using internal journal
EXT3-fs (dm-3): mounted filesystem with ordered data mode

proxmox:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext3 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext3 defaults 0 1
UUID=79f0f845-9d4b-4dec-9018-274d704e02b6 /boot ext3 defaults 0 1
/dev/pve/swap none swap sw 00
proc /proc proc defaults 0 0

proxmox:~# fdisk -l
Disk /dev/sda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Unit = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device boot Start End Blocks Id System
/dev/sda1 * 1 66 524288 83 Linux
Partition 1 does not end on cylinder boundary
/dev/sda2 66 9964 79511510 8e Linux LVM

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb93f1eeb

Device Boot Start End Blocks Id System
/dev/sdb1 1 38913 312568641 8e Linux LVM

Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1: 20.4 GB, 20401094656 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2: 52.4 GB, 52437188608 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-3: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

proxmox:~# blkid
/dev/sda1: UUID="79f0f845-9d4b-4dec-9018-274d704e02b6" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: UUID="jLB6eJ-KvMW-6zkc-uXVF-w5s0-HEI3-WA0udC" TYPE="lvm2pv"
/dev/dm-0: TYPE="swap" UUID="2c8a9ed4-4019-4db1-8b60-a937faaa9c3e"
/dev/dm-1: UUID="d3277fde-64bb-4c69-9eac-e4caa8b0b59a" TYPE="ext3"
/dev/dm-2: UUID="76ceff63-3606-4e09-84c0-5524eb363cb8" SEC_TYPE="ext2" TYPE="ext3"
/dev/dm-3: UUID="0d7c2f67-feac-4366-9335-2351b1f97a9c" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: UUID="ImjMhD-e0ev-uaBu-nW2c-g5ig-6gfg-OZH9TY" TYPE="lvm2pv

proxmox:~# _
 
Last edited:
hi Udo, i have done this:
Hi,
sorry i can't help you!

You have ignored all, what i have wrote:
- you allways use an lv (it's ok if you know what you do).
- you don't have an entry in fstab (how should linux know about your wish to have an mounted filesystem??).

So read the postings again - i can't give more tips ( we move in a circle)

And buy an book about linux for beginners!

Udo
 
Hi,
sorry i can't help you!

You have ignored all, what i have wrote:
- you allways use an lv (it's ok if you know what you do).
- you don't have an entry in fstab (how should linux know about your wish to have an mounted filesystem??).

So read the postings again - i can't give more tips ( we move in a circle)

And buy an book about linux for beginners!

Udo

Hello, i have not ignored what you wrote mate.

I tried to add this cmd to /etc/fstab : /dev/vgdata/lvbackup /mnt/backup ext3 defaults 0 1

And now when i do a restart the mounting work perfectly.

Thanks you for your help and your time !

Bye. K-libr