José Manuel Giner
2018-06-04 09:21:56 UTC
Yeah! thanks! need to add the --recreate parameter.
Just to clarify, you probably want to do this (if you want to go the easy
# prlctl set 100 --device-add hdd --image /backup/100 --size 100G --mnt
/backup --recreate
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
# prlctl set 100 --device-add hdd --image /backup/100 --size 100G --mnt
/backup --recreate
image_name: the image file to be used to emulate the VE virtual hard
disk. To use an existing image file, specify its name and path. To
create a new image file, omit the --image option (a new file named
harddiskN.hdd will be created in the VE directory) or use --recreate option.
You have two options here. Either create a new disk image externally,
before running that command (using dd, fdisk/parted, mkfs, etc.). Or, you
can try the --recreate option.
Let us know how that goes. :)
-Alex
_______________________________________________disk. To use an existing image file, specify its name and path. To
create a new image file, omit the --image option (a new file named
harddiskN.hdd will be created in the VE directory) or use --recreate option.
You have two options here. Either create a new disk image externally,
before running that command (using dd, fdisk/parted, mkfs, etc.). Or, you
can try the --recreate option.
Let us know how that goes. :)
-Alex
ls -al /backup/100
ls: cannot access /backup/100: No such file or directory
José Manuel Giner
_______________________________________________
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
ls: cannot access /backup/100: No such file or directory
ls -al /backup/100
Output?
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
--Output?
Hello,
I'm trying to add an additional disk to a container.
The new disk image must be hosted on a different partition of the
node.
If we exclude the "--image PATH" parameter, the result is correct. But
we want to be able to define a different partition for the additional disk.
According to the documentation, this should be possible.
# prlctl set 100 --device-add hdd --image /backup/100 --size 100G
--mnt /backup
Creating hdd1 (+) scsi:1 image='/backup/100' mnt=/backup
subtype=virtio-scsi
* The image file "/backup/100" used by hard disk 2 does not exist.Hard
disk 2 will not be connected at the virtual machine startup.
Failed to configure the virtual machine.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/openvz-root 9.8G 2.2G 7.1G 24% /
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 12G 780K 12G 1% /run
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/sda2 976M 146M 764M 17% /boot
/dev/mapper/backup-backup 148G 61M 140G 1% /backup
/dev/mapper/openvz-vz 138G 1.7G 130G 2% /vz
tmpfs 2.4G 0 2.4G 0% /run/user/0
--
José Manuel Giner
_______________________________________________
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
_______________________________________________I'm trying to add an additional disk to a container.
The new disk image must be hosted on a different partition of the
node.
If we exclude the "--image PATH" parameter, the result is correct. But
we want to be able to define a different partition for the additional disk.
According to the documentation, this should be possible.
# prlctl set 100 --device-add hdd --image /backup/100 --size 100G
--mnt /backup
Creating hdd1 (+) scsi:1 image='/backup/100' mnt=/backup
subtype=virtio-scsi
* The image file "/backup/100" used by hard disk 2 does not exist.Hard
disk 2 will not be connected at the virtual machine startup.
Failed to configure the virtual machine.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/openvz-root 9.8G 2.2G 7.1G 24% /
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 12G 780K 12G 1% /run
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/sda2 976M 146M 764M 17% /boot
/dev/mapper/backup-backup 148G 61M 140G 1% /backup
/dev/mapper/openvz-vz 138G 1.7G 130G 2% /vz
tmpfs 2.4G 0 2.4G 0% /run/user/0
--
José Manuel Giner
_______________________________________________
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
José Manuel Giner
_______________________________________________
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
Users mailing list
https://lists.openvz.org/mailman/listinfo/users
--
José Manuel Giner
José Manuel Giner