Commit Graph

2106 Commits

Author SHA1 Message Date
Alexandre Derumier
19860f5bae sheepdog : find_free_diskname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:18:17 +01:00
Alexandre Derumier
a602d95758 sheepdog : sheepdog_snapshot_ls : fix
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:17:27 +01:00
Alexandre Derumier
a76d3c973f sheepdog : sheepdog_ls : parse base volumes
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:17:06 +01:00
Alexandre Derumier
648095a9db sheepdog : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:16:23 +01:00
Alexandre Derumier
c78cb110e7 rbd : volume_snapshot_delete : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:47:27 +01:00
Alexandre Derumier
c6ce2cc8ec rbd : volume_snapshot_rollback : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:47:02 +01:00
Alexandre Derumier
9af33ed0b9 rbd : volume_snapshot : parse volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:46:38 +01:00
Alexandre Derumier
478fc06cd5 rbd: volume_resize : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:46:08 +01:00
Alexandre Derumier
81d1d01774 rbd: volume_size_info : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:45:51 +01:00
Alexandre Derumier
42d07b9ab3 rbd : free_image : unprotect snapshot is base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:40:26 +01:00
Alexandre Derumier
5b9b9b1449 rbd: fix: move find_free_diskname + fix trailing whitespace
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:38:19 +01:00
Alexandre Derumier
f27082855d rbd : clone_image
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:37:16 +01:00
Alexandre Derumier
992e6835e2 rbd : create_base
- rename volume
- take snapshot '__base__'
- protect the snapshot

Fix: the volume_snapshot sub need a $running parameter,
to known if it need to use rbd command or qmp command to take the snapshot.
for now, I pass undef, as it should be always offline.

(But we need to verify somewhere that vm is not running,
because take a snapshot with rbd command on a running vm can break it.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:35:55 +01:00
Alexandre Derumier
8b3ae5180b rbd : find_free_diskname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 09:18:47 +01:00
Alexandre Derumier
ca1e168ad3 rbd : rbd_ls : parse base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 08:58:49 +01:00
Alexandre Derumier
d04c7e55a8 rbd : parse_volname : parse base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 08:52:22 +01:00
Dietmar Maurer
ff00afd7fb vmid is integer an can be 0, so we need to use defined() to check if it is set
Note: The plan is to use vmid 0 to mark shared volumes.
2013-02-14 08:41:15 +01:00
Alexandre Derumier
f104d1dd07 storage : vdisk_free : eval parse_volname
If the storage have some customs volumes name, vdisk_free will hang

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 08:36:44 +01:00
Dietmar Maurer
d67264f17d depend on libfile-chdir-perl 2013-02-14 07:58:57 +01:00
Dietmar Maurer
7fc619d5d3 use File::chdir instead of Cwd
To avoid errors in taint mode.
2013-02-14 06:53:48 +01:00
Dietmar Maurer
32437ed279 check base image use count inside vdisk_free
To make it work with all storage types.
2013-02-01 06:55:39 +01:00
Dietmar Maurer
c803c3963c use chattr to set immutable flag on base images 2013-01-31 11:52:31 +01:00
Dietmar Maurer
a7f3d90919 free_image: correctly check if base volume is not used
moved parse_volume_id to PVE::Storage::Plugin::parse_volume_id
2013-01-31 11:36:49 +01:00
Dietmar Maurer
188aca388e return the volid, not the storage path 2013-01-31 08:47:27 +01:00
Dietmar Maurer
ad27ee3e4a new method volume_is_base() to check if volume is a base volume 2013-01-31 08:42:26 +01:00
Dietmar Maurer
fcbec6545b fix path_to_volume_id to work with base volumes and clones 2013-01-31 08:14:55 +01:00
Dietmar Maurer
5eab0272f0 add stubs for create_base and cone_image 2013-01-31 07:47:02 +01:00
Dietmar Maurer
2502b33b08 implement vdisk_clone and vdisk_create_base
This is an iplementation for file base storage types.

changes compared to patches from Alexandre:

* use correct locking
* private find_free_diskname() with bug fixes
* changed names of new methods
* always refer to base volumes in volume names

Example volume names:

local:6000/base-6000-disk-9.raw
local:6000/base-6000-disk-9.raw/7000/vm-7000-disk-9.qcow2
local:6000/base-6000-disk-9.raw/7000/base-7000-disk-10.qcow2
2013-01-30 12:55:37 +01:00
Stefan Priebe
249cb64756 RBDPlugin: introduce rbd_unittobytes / rbd tends to be human readable
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-01-22 11:14:57 +01:00
Dietmar Maurer
db8057dc96 bump version to 2.3-2 2013-01-03 11:47:26 +01:00
Alexandre Derumier
166196ac10 create rbd volume with format v2
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-01-03 11:44:38 +01:00
Alexandre Derumier
7cb2889abb rbd: use rbd ls -l
avoid to call rbd info for each volume

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-01-03 11:44:24 +01:00
Alexandre Derumier
cbc6fef357 iscsidirect : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:53:25 +01:00
Alexandre Derumier
852a55f7d2 iscsi : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:53:09 +01:00
Alexandre Derumier
f7d4064fec lvm: has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:53:00 +01:00
Alexandre Derumier
767132f72a nexenta: has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:52:52 +01:00
Alexandre Derumier
c0235499b3 sheepdog : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:52:43 +01:00
Alexandre Derumier
774f21b9ee rbd : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:52:33 +01:00
Alexandre Derumier
f884fe1125 plugin : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:52:20 +01:00
Alexandre Derumier
99473759b2 storage : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:50:48 +01:00
Dietmar Maurer
e8acaa3c0d fix typo 2012-12-17 11:50:22 +01:00
Dietmar Maurer
a22854e540 also list vma backup archives
bump version to 2.3-1
2012-12-13 12:51:52 +01:00
Alexandre Derumier
73b6f89b3c sheepdog : fix volume_size_info && parentid check
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-12 13:29:09 +01:00
Alexandre Derumier
ba4ee9ba25 sheepdog : retrieve parent of a clone
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-11-22 06:58:14 +01:00
Alexandre Derumier
62b98a65b5 rbd: retrieve parent of a clone
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-11-22 06:58:03 +01:00
Alexandre Derumier
4d4f734eea nexenta: retrieve parent of a clone
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-11-22 06:57:53 +01:00
Alexandre Derumier
73b7847e53 files: retrieve parent of a clone
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-11-22 06:57:38 +01:00
Dietmar Maurer
3f13fd7dc3 remove timeouts from 'qemu-img snapshot' commands.
Those commands can take several minutes on larger files.
2012-11-02 08:52:50 +01:00
Dietmar Maurer
4ff42fd691 bump version to 2.0-35 2012-10-31 14:08:20 +01:00
Alexandre Derumier
3cb217030a sheepdog : delete snapshots when deleting volume
sheepdog don't delete snapshots automatically when deleting volume

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-10-31 14:06:55 +01:00