Commit Graph

1147 Commits

Author SHA1 Message Date
Alexandre Derumier
ec4b0dc781 storage: add parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-10-01 11:19:00 +02:00
Dietmar Maurer
452e3ee780 bug fix: use filesysetm_path for LVM/iSCSI storage
So that the genrice Storage::Plugin code works again (get_subdir() fails on
this type of storage).
2013-09-19 06:41:51 +02:00
Dietmar Maurer
08480ce768 introduce new method filesystem_path()
If a plugin overwrites method path() to return optimized setting for qemu,
it can now still use the generic methods from PVE::Storage::Plugin which works
on file system paths (for example the glusterfs plugin).
2013-09-17 09:05:17 +02:00
Dietmar Maurer
5f25af2f93 avoid nested parameter exception 2013-09-04 13:43:59 +02:00
Dietmar Maurer
8e87d6eef0 auto-detect format for files with vmdk extension 2013-09-04 10:18:50 +02:00
Dietmar Maurer
a18f774079 return error if volume does not exists 2013-09-04 10:17:47 +02:00
Dietmar Maurer
3cf5e19edc API: add scan method for glusterfs 2013-08-13 10:06:03 +02:00
Dietmar Maurer
1a3459ac78 delete trailing white-space 2013-08-12 11:56:41 +02:00
Alexandre Derumier
f4648aef06 add Glusterfs Plugin
storage.cfg
------------
glusterfs: glusterstore
       path /mnt/pve/gluster
       server server.fqdn  (optional, default is localhost)
       volume glustervolume
       content images
       maxfiles 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-08-12 11:55:06 +02:00
Alexandre Derumier
9165b0153e sheepdog : fix create_base with storeid !='sheepdog'
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-24 10:07:46 +02:00
Alexandre Derumier
9538d0475a sheepdog: fix find_next_volume with storeid != 'sheepdog', find display volume size
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-24 10:07:33 +02:00
Stefan Priebe
a8c3f8f6ac --format is deprecated
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-06-04 13:09:02 +02:00
Stefan Priebe
8cc610093b be more verebose on rbd commands to get progress
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-05-31 11:50:41 +02:00
Alexandre Derumier
0b79e98ccb nexenta: nexenta_get_zvol_size : parse result to avoid tainted value
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-28 12:39:09 +02:00
Dietmar Maurer
c55a499dfe nexenta: skip disks whith no owner
We also do this for LVM. Else I get:

> qm rescan --vmid 100
Use of uninitialized value $owner in string ne at /usr/share/perl5/PVE/Storage/NexentaPlugin.pm line 356.
2013-05-27 06:40:37 +02:00
Dietmar Maurer
72d9f66e51 nexenta: disable ssl_opt verify_hostname
Else we are unable to connect to the server when using ssl.
2013-05-24 14:53:40 +02:00
Dietmar Maurer
12c2fe32e1 bump version to 3.0-6 and fix bug from previous commit 2013-05-14 11:26:23 +02:00
Alexandre Derumier
3e29c0f229 rbd : clone volume to same pool that base volume
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-14 10:04:01 +02:00
Dietmar Maurer
283608f330 extend storage list API with useful parameters for clone
Add ability to list shared storages availavlable on souce and target node.
2013-05-14 09:56:11 +02:00
Dietmar Maurer
7acee37a30 since wheezy, iscsiadm -m session throw an error code if no session exist.
So we can't bring up the iscsi storage

This patch is based on the patch submitted by Alexandre, but we only
suppress error messages when there are no active sessions. Other errors still
trigges an exceptions.
2013-05-13 08:00:16 +02:00
Alexandre Derumier
38e6ec3fbd rbd: sub path: add snapname argument
needed for qemu-img convert from src snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:34:55 +02:00
Alexandre Derumier
24cec3aa77 sheepdog: sub path: add snapname argument
needed for qemu-img convert from src snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:34:32 +02:00
Alexandre Derumier
207ea85267 storage : sub path: add snapname argument
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:33:33 +02:00
Stefan Priebe
8897f5dcc5 rbd -p parameter is only valid for the src (see man). Add the pool to the target as well.
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-04-22 06:17:15 +02:00
Dietmar Maurer
87cf5d409c use integer size in rbd size parameter 2013-03-25 12:55:09 +01:00
Dietmar Maurer
d6c9dc34af file upload: fix race condition
bump version to 2.3-6
2013-03-04 09:00:27 +01:00
Dietmar Maurer
df6b79c892 fix permission check for backup file removal 2013-03-01 06:04:03 +01:00
Dietmar Maurer
b8744249a2 fix access rights
Try to use $rpcenv->check_volume_access() everywhere.
2013-02-28 10:15:44 +01:00
Alexandre Derumier
1440604a4b rbd : rework pool - username - auth_supported options
pool is now optional, default value is 'rbd';
username is now optional, default value is 'admin';

auth_supported option is removed and is autodetected.
  auth = cephx if private key exist
  auth = none if private key does not exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-18 06:32:57 +01:00
Alexandre Derumier
5649ccfe89 has_feature : template
for plugin-rbd-sheepdog-nexenta

+ indentation fix

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-18 06:18:15 +01:00
Alexandre Derumier
2c5a70971a has_feature : fix key = snap
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 10:08:04 +01:00
Alexandre Derumier
7e8c6888b2 iscsi : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:28:25 +01:00
Alexandre Derumier
39ab682a68 iscsidirect : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:28:15 +01:00
Alexandre Derumier
9bb4abf6a6 lvm : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:28:03 +01:00
Alexandre Derumier
74158ff3b9 nexenta : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:27:51 +01:00
Alexandre Derumier
62ebea1e56 sheppdog : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:27:37 +01:00
Alexandre Derumier
0255ee5fda rbd : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:27:27 +01:00
Alexandre Derumier
22b8cf9731 plugin : has_feature : copy
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:27:07 +01:00
Alexandre Derumier
9bc7fa7ad2 nexenta : has_feature : clone base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 11:11:36 +01:00
Alexandre Derumier
7516817760 sheepdog : has_feature : clone base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 11:11:21 +01:00
Alexandre Derumier
1e7ae58194 rbd : has_feature : clone from base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 11:10:51 +01:00
Alexandre Derumier
dc4f2cb33d plugin : has_feature : clone from base + fix
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 11:10:23 +01:00
Alexandre Derumier
201345af42 nexenta : volume_snapshot_delete : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:34:41 +01:00
Alexandre Derumier
851dc88088 nexenta : volume_snapshot_rollback : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:34:18 +01:00
Alexandre Derumier
1e507a72f9 nexenta : volume_snapshot : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:34:10 +01:00
Alexandre Derumier
d6a30aa259 nexenta : volume_resize : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:33:58 +01:00
Alexandre Derumier
d2befd94be nexenta : volume_size_info : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:33:43 +01:00
Alexandre Derumier
74822cd72d nexenta : free_image
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:33:33 +01:00
Alexandre Derumier
2e910a0e3a nexenta : list_images
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:32:55 +01:00
Alexandre Derumier
324679682e nexenta : clone_image
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:31:39 +01:00
Alexandre Derumier
1c0097dd51 nexenta : create_base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:31:29 +01:00
Alexandre Derumier
5b29d458f4 nexenta : find_free_diskname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:26:05 +01:00
Alexandre Derumier
1a259abc18 nexenta : nexenta_list_zvol : parse base volumes
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:25:04 +01:00
Alexandre Derumier
e7b2953b2f nexenta : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:23:44 +01:00
Alexandre Derumier
d99eee9399 sheepdog : volume_snapshot_delete : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:22:28 +01:00
Alexandre Derumier
b8f4f5be20 sheepdog : volume_snapshot_rollback : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:22:17 +01:00
Alexandre Derumier
d719effa9b sheepdog : volume_snapshot : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:22:02 +01:00
Alexandre Derumier
fddfc53873 sheepdog : volume_resize : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:21:49 +01:00
Alexandre Derumier
61b8ccc917 sheepdog : volume_size_info: parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:21:30 +01:00
Alexandre Derumier
b22af8eee9 sheepdog : list_images
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:21:04 +01:00
Alexandre Derumier
b2f975cf1e sheepdog : free_image : parse volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:20:33 +01:00
Alexandre Derumier
87157341ad sheepdog : clone_image
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:19:20 +01:00
Alexandre Derumier
8a3c8d0e59 sheepdog : create_base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-14 10:18:51 +01:00
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
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
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
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
Alexandre Derumier
c30470a35e rbd: purge snapshots before delete volume
we can't delete a rbd volume if snapshots exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-10-31 14:06:42 +01:00
Stefan Priebe
45c2ee3526 PVE/API2/Storage/Status: remove hardcoded blowfish cipher PVE/Storage: remove hardcoded blowfish cipher
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2012-10-31 14:05:40 +01:00
Alexandre Derumier
e110213e71 rbd: get volume size for volumes list
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-10-17 10:30:41 +02:00
Alexandre Derumier
6958944439 rbd: add storage space stats
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-10-17 06:34:25 +02:00
Dietmar Maurer
6bcc16d70e create 'dump' directory if storage contains containers
This is needed by openvz migrate to store state.
2012-10-02 13:36:52 +02:00
Dietmar Maurer
045ae0a7fe code cleanup 2012-09-20 07:18:59 +02:00
Alexandre Derumier
1e679ac591 qcow2 : preallocate metadatas at file creation
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-20 07:11:43 +02:00
Dietmar Maurer
1059cc994d use longer timeouts for snapshot commands 2012-09-19 08:55:23 +02:00
Dietmar Maurer
2103bd20ef nexenta: implement status 2012-09-19 08:39:25 +02:00
Dietmar Maurer
8914a711eb nexenta: use import_lu on rollback
To avoid generation of new GUID.
2012-09-19 08:16:58 +02:00
Dietmar Maurer
ac4329f3d8 nexenta: fix parse_volname
And some coding style cleanups.
2012-09-19 07:38:40 +02:00
Dietmar Maurer
2570fb94e8 nexenta: recursively delete all snapshots on vdisk_free 2012-09-17 10:32:09 +02:00
Dietmar Maurer
88a2b8c79e nexenta: fix parameter for create_snapshot 2012-09-17 10:26:21 +02:00
Dietmar Maurer
4b0dea6c82 nexenta API cleanups
remove all uncommented sleep calls (will add them later if required). Use
new nexenta_request() syntax. Also removed strangs eval{} sections which
hide errors.
2012-09-17 10:12:36 +02:00
Dietmar Maurer
d6eee582dc nexenta: correctly get volsize (needs extra API call) 2012-09-17 07:58:20 +02:00
Dietmar Maurer
27cc55d4fb fix typo 2012-09-07 12:59:26 +02:00
Alexandre Derumier
b2c1ab4bd6 iscsidirect : add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:41 +02:00
Alexandre Derumier
f57e796b9a lvm: add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:39 +02:00
Alexandre Derumier
5d8f5e22b9 nexenta: add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:36 +02:00
Alexandre Derumier
9cd89ee32f sheepdog: add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:33 +02:00
Alexandre Derumier
cce29bcd6b rbd : add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:30 +02:00
Alexandre Derumier
6000a061e9 plugin: add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:27 +02:00
Alexandre Derumier
5753c9d1b6 storage : add volume_snapshot_delete
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:24 +02:00
Alexandre Derumier
9f02df8359 iscsidirect : add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:22 +02:00
Alexandre Derumier
051e85b827 lvm : add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:19 +02:00
Alexandre Derumier
4c6c642353 nexenta: add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:14 +02:00
Alexandre Derumier
948b2e22ce sheepdog : add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:12 +02:00
Alexandre Derumier
5a2b2e2f14 rbd: add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:08 +02:00
Alexandre Derumier
41dffa853d plugin : add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:04 +02:00
Alexandre Derumier
22a2a633c4 storage: add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:01 +02:00
Alexandre Derumier
ec409fb48b iscsidirect : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:58 +02:00
Alexandre Derumier
33818d1604 lvm: add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:56 +02:00
Alexandre Derumier
5223286c26 nexenta: add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:53 +02:00
Alexandre Derumier
788dd8e182 rbd : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:50 +02:00
Alexandre Derumier
50a19c0987 sheepdog : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:46 +02:00
Alexandre Derumier
7dcb06977e plugin : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:43 +02:00
Alexandre Derumier
db60719cde storage : add volume_snapshot
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:36:40 +02:00
Alexandre Derumier
034e4411bf nexenta: fix lun number parsing in sub path
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-22 12:25:13 +02:00
Alexandre Derumier
0f94c1c938 nexenta: ssl option is optionnal
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:08:42 +02:00
Alexandre Derumier
120ca009d6 nexenta: add ssl option and clean errors handling
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:08:28 +02:00
Alexandre Derumier
4f01611d13 nexenta : add nodes and disable options
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:07:02 +02:00
Alexandre Derumier
911ce8504f sheepdog : add nodes and disable options
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:06:52 +02:00
Alexandre Derumier
35d6dfaf9e rbd: add nodes and disable options
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:06:36 +02:00
Alexandre Derumier
69971d8bae nexenta: volume_resize
resize volume using nexenta api. (online or offline).

we can't use qmp block_resize with libiscsi to online update disk size in guest (throw error), so return undef;

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:19 +02:00
Alexandre Derumier
9ffffc2e24 sheepdog : volume_resize
use collie command to resize disk (online or offline).

we can't use qmp block_resize to online resize size in guest (throw error) , so return undef.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:16 +02:00
Alexandre Derumier
e7a42a764e rbd : volume_resize
resize disk with rbd command if vm is offline
otherwise we can use qmp block_resize if vm is online

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:14 +02:00
Alexandre Derumier
3bac137c9f ISCSIDirect : volume_resize
die as we can't resize scsi device plugins

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:11 +02:00
Alexandre Derumier
0244a7b9c6 ISCSIPlugin : volume_resize
die as we can't resize iscsi devices

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:09 +02:00
Alexandre Derumier
530defb603 lvmplugin : volume_resize
resize the lvm device (online or offline)

return 1 to use qmp block_resize to online update size in guest

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:06 +02:00
Alexandre Derumier
81f5058c01 plugins : add volume_resize
this add qemu-img resize for file devices (raw - qcow2) if vm is offline.

otherwise we need to use online qmp block_resize

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:03 +02:00
Alexandre Derumier
7e6c05dc2c Storage : add global volume_resize
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:00 +02:00
Alexandre Derumier
6f714585f2 ISCSIDirect : volume_size_info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:21 +02:00
Alexandre Derumier
3a0c324642 ISCSIDirect : fixes and cleanup
-use "lunX" for volume name.
previously it was only the lun number, and it conflict with current syntax to disk alloc disk size.

-scsi-ls return size in Gb, so we need to convert to bytes

-small cleanups

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:16 +02:00
Alexandre Derumier
60301ee037 nexenta: volume_size_info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:13 +02:00
Alexandre Derumier
c95c307373 rbd : volume_size_info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:10 +02:00
Alexandre Derumier
c732d5dbac sheepdog : volume_size_info
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:06 +02:00
Alexandre Derumier
a1301c92d6 ISCSIPlugin : remove specific volume_size_info
no need to use volume_size_info, we can use generic volume_size_info from Plugin. (file_size_info)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-06 06:10:03 +02:00
Dietmar Maurer
86a9a680de use rpcinfo instead of Ping
This works for NFS servers behind firewalls.
2012-08-01 08:45:33 +02:00
Dietmar Maurer
f3d4ef4626 move check_connection into activate_storage 2012-08-01 07:16:33 +02:00
Dietmar Maurer
f18199e580 volume_size_info: make it work with raw devices 2012-07-31 11:01:02 +02:00
Alexandre Derumier
c3013a8be5 nexentaplugin : volume_size_info
return nothing for now.

This also avoid de call soap api each time in sub path.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:21 +02:00
Alexandre Derumier
0002d9cc30 rbdplugin: volume_size_info
return nothing for now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:18 +02:00
Alexandre Derumier
27923b43c7 sheepdogplugin: volume_size_info
return nothing for now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:16 +02:00
Alexandre Derumier
baf6965931 iscsidirectplugin : volume_size_info
return nothing for now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:14 +02:00
Alexandre Derumier
a548fd488f iscsiplugin:volume_size_info
return nothing for now, as we can't get volume used inside the volume, stats are empty.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:45:06 +02:00
Alexandre Derumier
e47e548e51 add volume_size_info for generic plugin
this use path and file_size_info like before

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:44:46 +02:00
Alexandre Derumier
20ccac1b6d add volume_size_info sub
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:44:03 +02:00
Dietmar Maurer
6d64e9e065 fix lvmscan 2012-07-25 15:50:23 +02:00
Dietmar Maurer
7028645e2e catch exception 2012-07-19 11:22:35 +02:00
Alexandre Derumier
03b5bfdf9c iscsi: add check_connection
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-19 11:00:39 +02:00
Alexandre Derumier
4d284721ed nfs: add check_connection
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-19 11:00:06 +02:00
Alexandre Derumier
c9eeac0131 add check_connection in storage_check_enabled.
Currently, if a storage have an infinite timeout (nfs hard option or iscsi with high timeout for failover),
and if the storage is down or is doing ha failover with dual controller

- pvestatd hang on storage_info. (So pve-manager see the host as down, and hang on differents parts, gui,rrds display)

- pvedaemon hang on differents place (storage disk list,vm_status, hardware info,...)

- I also see a lot of qemu-img info process hanging in uninterruptible sleep state with iscsi storage.

This patch add a check to see if the storage is accessible.

For nfs and iscsi : ping with a timeout of 2 second.  (Maybe this can be polish with some kind of filesystem/storage read test with timeout...)

Default for other storage plugins is to check nothing. (not a problem with sheepdog,ceph,libiscsi... as commands have timeout)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-19 10:58:19 +02:00
Dietmar Maurer
8c3abf126f re-add hack for empty pool
fresh created and empty rbd pool, throw a 500 error with "pool xxx doesn't contain rbd images" message.
2012-07-18 06:04:09 +02:00
Dietmar Maurer
f7a1e35f69 fix sheepdog path
We always need to specify a port, else kvm does not find the disk.
2012-07-17 15:12:49 +02:00
Dietmar Maurer
411476cd32 cleanup rbd driver 2012-07-17 13:26:36 +02:00
Dietmar Maurer
8661655414 register all plugins 2012-07-17 12:58:38 +02:00
Dietmar Maurer
2677f6239d cleanup white space errors 2012-07-17 11:55:38 +02:00
Alexandre Derumier
40cd7d27d5 add nexenta plugin
storage definition
------------------
portal 192.168.0.1
target iqn.1986-03.com.sun:....
login myloginwithjsonpermission
password jsonuserpassword
pool Yourpool
blocksize 4K

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-17 11:49:53 +02:00
Alexandre Derumier
b345cad347 add iscsidirect plugin
This use libiscsi

storage definition:
------------------
portal 192.168.0.1
target iqn.1986-03.com.sun:....

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-17 11:48:27 +02:00
Dietmar Maurer
e9256323c0 sheepdog: implement storage status 2012-07-16 09:51:26 +02:00
Dietmar Maurer
7f8373d270 delete trailing white spaces 2012-07-16 09:13:19 +02:00
Dietmar Maurer
be6339fc3a sheepdog: use '-r' to get sizes in bytes, code cleanup
Use a common method collie_cmd() to assemble command using
correct server/port settings.
2012-07-16 09:10:17 +02:00
Dietmar Maurer
caf1960c76 register sheepdog plugin 2012-07-16 07:26:08 +02:00
Alexandre Derumier
e4fc8228a7 add sheepdog plugin
storage definition
-------------------
portal 127.0.0.1:7000

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 07:14:53 +02:00
Alexandre Derumier
1270370d9b set shared=1 to sheepdog plugin
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 07:03:42 +02:00
Dietmar Maurer
6bf5629866 fix offline migration bug
Alway pass volname and storeid to plugin->path()
2012-07-16 06:45:13 +02:00
Alexandre Derumier
d70e7f6c0d rbd : add owner attribute when rbs ls
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-19 06:42:35 +02:00
Alexandre Derumier
4e2d3bc8ea rbd : use keyring file instead keyfile
we need 1 keyring by rbd storage

/etc/pve/priv/ceph/storagename.keyring

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-18 13:44:56 +02:00
Dietmar Maurer
571abaa611 add newline to error message 2012-06-18 06:30:27 +02:00
Alexandre Derumier
3e195ccccb rbd : rbd_ls: doesn't throw error if pool doesn't contain image
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-18 06:04:57 +02:00
Alexandre Derumier
4f4f94801d rbd : set shared as default
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-06 12:19:09 +02:00
Alexandre Derumier
e5427b0097 rados block plugin update
config file
-----------
rbd: rbdtest
        monhost 10.3.94.27:6789;10.3.94.28:6789;10.3.94.29:6789
        pool pool2
        username admin
        authsupported cephx;none
        content images

key for user admin must be specified in:
---------------------------------------
/etc/pve/priv/ceph/storeid.username.key

/etc/pve/priv/ceph/rbdtest.admin.key   for this exemple.

(so we can have multiple users key by storage and multiple storage with same username)

I change "sub path" in Storage.pm to pass $storeid as third argument.

I rename property id to username, to be more clear.

removal of rbd_ prefix.

removal of trailing whitespace

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-02 12:00:33 +02:00
Alexandre Derumier
0509010d6e Add rados block plugin storage
This add rados plugin storage.

We need rbd command from ceph repository (ceph-common package) to create/delete volumes,I didn't have add depends for the moment.

/etc/pve/storage.cfg sample config

rbd: rbdtest
        rbd_monhost 10.3.94.27:6789;10.3.94.28:6789;10.3.94.29:6789
        rbd_pool pool2
        rbd_id admin
        rbd_key AQAmOcZPwNY7GRAAuvJjVAKIm1r3JKqLCa4LGQ==
        rbd_authsupported cephx;none
        content images

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-01 07:18:11 +02:00
Dietmar Maurer
5521b5805b fix return value for path() 2012-05-23 13:11:20 +02:00
Dietmar Maurer
be2e0c16b1 import run_command 2012-05-23 12:56:25 +02:00
Dietmar Maurer
d9e4e1ce2c use File::Path 2012-05-23 12:48:44 +02:00
Dietmar Maurer
7a2d5c1a26 use Sockets 2012-05-23 12:43:28 +02:00
Dietmar Maurer
1dc01b9f30 new plugin architecture 2012-05-23 08:00:13 +02:00
Dietmar Maurer
5c009b733e avoid call to lvs when deactivating devices
Because this can be slow if there are many devices.
2012-04-23 06:31:04 +02:00
Dietmar Maurer
75d75990b4 fix bug #171: fix path_to_volume_id for unmounted NFS 2012-04-18 12:34:39 +02:00
Dietmar Maurer
369977e8bb fix bug #148: set maxfiles for default local storage 2012-04-05 14:40:01 +02:00
Dietmar Maurer
dc2deeb8fe use dir_glob_* from PVE::Tools 2012-03-28 08:00:59 +02:00
Dietmar Maurer
da156fb3ef add line break to error message 2012-03-28 06:36:38 +02:00
Dietmar Maurer
446073f681 allow to set option 'maxfiles' 2012-03-23 07:43:28 +01:00
Dietmar Maurer
6bf7eb0903 use Digest::SHA instead of Digest::SHA1 2012-03-20 11:27:51 +01:00
Dietmar Maurer
d642361b29 new lvm option 'saferemove' to zero-out data when removing LVs 2012-03-09 09:43:01 +01:00
Dietmar Maurer
88c3abaf6e zero-ot data on LVM volumes 2012-03-07 12:32:02 +01:00
Dietmar Maurer
b755bdb0f9 delete volume requires Datastore.Allocate 2012-02-22 12:08:54 +01:00
Dietmar Maurer
0c1473f928 only list iscsi when enabled (content == images) 2012-02-15 09:33:12 +01:00
Dietmar Maurer
888709239d also list tar.gz and tar.lzo backup files 2012-02-07 12:54:16 +01:00
Dietmar Maurer
1f6610f386 fix upload permissions. Only allow iso/tmpl upload. 2012-02-06 10:10:55 +01:00
Dietmar Maurer
2494896aaa parse backup files and return owner vmid 2012-02-01 11:47:44 +01:00
Dietmar Maurer
05f697c983 use correct package prefix 2012-01-26 13:10:50 +01:00
Dietmar Maurer
8fba271817 moved format definition to pve-common 2012-01-26 11:55:28 +01:00
Dietmar Maurer
5f642f73b8 add permission checks 2012-01-26 09:25:39 +01:00
Dietmar Maurer
95e8e21cc5 allow optional slash in mount path
Seems NFS4 use that smetimes
2012-01-26 05:55:12 +01:00
Dietmar Maurer
db2ec87f83 use -e to test if volume exists
Because rootdir is a directory, not a file
2011-12-02 10:31:49 +01:00
Dietmar Maurer
02fae308ed fix iscsi size bug 2011-11-28 07:38:02 +01:00
Dietmar Maurer
3af60e62fa ignore errors from vgs 2011-11-25 09:43:29 +01:00
Dietmar Maurer
f81372ac59 improve error messages 2011-11-25 07:42:26 +01:00
Dietmar Maurer
6703353bb8 do not activate LVM volumes with vgchange -aly 2011-11-25 07:27:25 +01:00
Dietmar Maurer
c63913bf57 fix bug 44: allow to store vztmpl on NFS 2011-11-17 12:15:39 +01:00
Dietmar Maurer
1ac17c745e improved container support (rootdir) 2011-11-14 07:11:36 +01:00
Dietmar Maurer
d22a6133ab allow container rootdir on NFS 2011-11-07 11:14:32 +01:00
Dietmar Maurer
03f03009ba fix description 2011-11-03 09:33:27 +01:00
Dietmar Maurer
4ea5bca4e3 use correct prefix 2011-11-03 09:32:32 +01:00
Dietmar Maurer
7814e05f6f implement file upload API 2011-11-03 09:22:53 +01:00
Dietmar Maurer
87191fbe8f add content type attribute 2011-10-31 11:45:16 +01:00
Dietmar Maurer
686e1d032b fix parse_volname_dir to support backup images 2011-10-20 11:05:05 +02:00
Dietmar Maurer
6a4d7398b3 allow multiple content types 2011-10-20 08:02:52 +02:00
Dietmar Maurer
568de3d125 allow backup to local storage and code cleanups 2011-10-18 11:23:31 +02:00
Dietmar Maurer
883eeea67d add copy API example for stefan 2011-10-12 07:39:50 +02:00
Dietmar Maurer
9dec0cb1f7 only activate lvm volumes on local node
Pass -aly to lvcreate.
2011-09-29 08:42:00 +02:00
Dietmar Maurer
6c64928f88 avoid warning about uninitialize value 2011-09-23 06:57:40 +02:00
Dietmar Maurer
dfe98e6437 Fix digest handling 2011-09-07 12:01:25 +02:00
Dietmar Maurer
04a2e4f39f fix shared attribute in storage list 2011-08-26 06:23:24 +02:00
Dietmar Maurer
b6cf0a6659 imported from svn 'pve-storage/pve2' 2011-08-23 07:43:03 +02:00