Commit Graph

79 Commits

Author SHA1 Message Date
Dietmar Maurer
626da4ffd4 whitespace cleanups 2015-04-27 10:09:18 +02:00
Wolfgang Link
7eccaed5fb implement offline migration on zfs
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-04-27 10:02:11 +02:00
Pawel Boguslawski
15dca6b0d8 Fixed LV cleaning function. saferemove_throughput parameter added.
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
2015-03-06 08:34:34 +01:00
Dietmar Maurer
f824c72250 cleanup error messages 2015-02-12 09:40:17 +01:00
Dietmar Maurer
b3f302c638 call volume_rollback_is_possible from PVE::Storage::volume_snapshot_rollback
That way it is automatically called for all plungins.
2015-02-12 09:28:52 +01:00
Wolfgang Link
1597f1f9ad Storage: add method volume_rollback_is_possible
add method volume_rollback_is_possible and redactor
Improve error handling
If snapshot is not reversible catch it before vm will lock and shutdown.
This is the case if zfs has an younger snapshot.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-02-12 09:15:02 +01:00
Dietmar Maurer
584d97f646 implement zfsscan to list local zfs pools 2015-01-26 09:05:09 +01:00
Dietmar Maurer
85fda4dd7f rename ZFSDirPlugin to ZFSPoolPlugin
Turned out it makes no sense to duplicated DirPlugin features. So I
also changed the name to make it less confusing. So we can only
create zvols inside a zfs pool with this plugin.
2015-01-24 14:17:55 +01:00
Dietmar Maurer
5bb8e01076 ZFSDirPlugin: new plugin for local zfs storage
We also want to use this as base class for ZFSPlugin, to increase
code sharing.
2015-01-22 07:54:10 +01:00
Stefan Priebe
7bbc40045a pass snapname to vdisk_clone and plugin clone_image
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-07-17 07:59:49 +02:00
Alexandre Derumier
7ecc43edac remove nexenta plugin
zfs plugin is better and faster and backward compatible

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-10-08 06:13:09 +02:00
Michael Rasmussen
4f914e6ec0 Added support for ZFS Storage Plugin
example of storage.cfg

zfs:    omnios
        blocksize 8k
        target iqn.2010-09.org.openindiana:target1
        pool pool1
        iscsiprovider comstar
        portal 192.168.0.1
        sudo 1  (optionnal)
        content images

note for fast ssh login:
on solaris  host :

/etc/ssh/sshd_config

LookupClientHostnames no
VerifyReverseMapping no
GSSAPIAuthentication no

note for nexenta:

rm /root/.bash_profile

to avoid to go in nmc console by default

Signed-off-by: Michael Rasmussen <mir@datanom.net>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-10-02 06:37:18 +02:00
Dietmar Maurer
ffd6f2f3ab use warnings instead of global -w flag 2013-10-01 13:08:43 +02:00
Dietmar Maurer
35fbb2e645 new helper abs_filesystem_path()
Returns the absolute path for a <volid>. Also activates storage if possible.
2013-10-01 12:29:39 +02:00
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
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
207ea85267 storage : sub path: add snapname argument
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:33:33 +02: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
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
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
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
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
Alexandre Derumier
99473759b2 storage : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:50:48 +01:00
Dietmar Maurer
a22854e540 also list vma backup archives
bump version to 2.3-1
2012-12-13 12:51:52 +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
Dietmar Maurer
27cc55d4fb fix typo 2012-09-07 12:59:26 +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
22a2a633c4 storage: add volume_snapshot_rollback
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:37:01 +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
7e6c05dc2c Storage : add global volume_resize
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:09:00 +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
20ccac1b6d add volume_size_info sub
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:44:03 +02:00
Dietmar Maurer
7028645e2e catch exception 2012-07-19 11:22:35 +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
8661655414 register all plugins 2012-07-17 12:58:38 +02:00
Dietmar Maurer
caf1960c76 register sheepdog plugin 2012-07-16 07:26:08 +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
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
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