Commit Graph

130 Commits

Author SHA1 Message Date
Fabian Grünbichler
086c4bf12b extract_vzdump_config: handle RE consistently
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-20 11:14:01 +01:00
Fabian Grünbichler
8944339466 weaken matching for vzdump config extract filename
to allow "pvesm extractconfig filename" when in the dump
directory.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-20 11:13:58 +01:00
Dietmar Maurer
04a13668b9 PVE::Storage: new helper check_volume_access()
Copied from PVE::RPCEnvironment to avoid cyclic dependency
(pve-storgae => pve-access-control => pve-storage).
2017-01-19 09:14:41 +01:00
Fabian Grünbichler
afd0afe4f5 fix #1135: always clean up ZFS snapshots on migration
otherwise there are situations where snapshots are left
behind for already sent volumes. also include more warnings.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-03 11:45:16 +01:00
Dietmar Maurer
46f114a53f storage_migrate: use bs=4k to copy images with dd
The default block size is 512 bytes, and is quite slow. We do not
want to use blocks bigger than 4k, because we want to detect empty
blocks (sparse).
2016-12-24 10:55:31 +01:00
Dietmar Maurer
ff3badd83f white space cleanups 2016-09-26 13:40:43 +02:00
Wolfgang Link
a9ef8ffb16 Avoid JavaScript gets a string 0.
If the JavaScript gets a "0" it convents it to a boolean false.
So to ensure the GUI always get valid int we cast the values.
2016-09-26 13:38:56 +02:00
Fabian Grünbichler
787624dfc0 add comments about LVM thin clones 2016-09-15 14:01:07 +02:00
Fabian Grünbichler
17fb7e4215 move check for existing clones into own method
and change its return type to boolean
2016-09-15 13:52:57 +02:00
Fabian Grünbichler
9924228be1 remove unused method
only used by test case, which should use what the rest of
the codebase uses as well
2016-09-15 13:42:55 +02:00
Fabian Grünbichler
3718e83ab5 fix error message 2016-09-14 11:24:06 +02:00
Dmitry Petuhov
4dee23d305 Add support for custom storage plugins
PVE team cannot support specialized vendor-specific storage
plugins because of lack of hardware. But we can allow users to
add own plugins for their storages without need to rewrite any
PVE code and thus ease PVE updates to them.

Idea of this patch is to add folder /usr/share/perl5/PVE/Storage/Custom
where user can place his plugins and PVE will automatically load
them on start or warn if it could not and continue. Maybe we could
even load all plugins (except PVE::Storage::Plugin itself) this way,
because current storage plugins are not really plugins, if they
need to be explicitly loaded in PVE code :-).

Custom plugins MUST have api() method returning version for which
it was designed. If API changes from PVE side, module is just not
being registered and warnig message is printed do log, so user have
to update module. Until module update, corresponding storage will
just disappear from PVE, so it shall not impose any data damage
because of API change.

This approach works (with some limitations) if plugin works in
generic PVE way: full control of volumes lifecycle. And will not
currently work for custom plugins like iSCSI, which needs to select
pre-existing volumes. Maybe someone will add more flexible way to
pve-manager to select input elements for storage plugins to target
this.

Currently tested with my NetApp plugin.

Signed-off-by: Dmitry Petuhov <mityapetuhov@gmail.com>
2016-08-26 15:44:49 +02:00
Dominik Csapak
f3b3b2a3b7 remove compression option from lvm migration
ssh(1) mentions that compression is only disirable on slow
connections.

since migration from cluster node to cluster node needs a
fast network anyway, we can drop the compression for
a speed improvement

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-08-05 08:36:13 +02:00
Fabian Grünbichler
82fc923fd4 fix spelling / grammar 2016-07-13 13:59:26 +02:00
Wolfgang Link
966ecef2e8 fix #1033 storage_migrate on LVMThin - add die.
This is necessary to ensure the process will proper finished.
2016-06-17 14:55:38 +02:00
Wolfgang Link
e83f7b4095 fix for storage migrate
remove the sparse parameter from dd.
This destroy the lvm volume.

also remove the free_disk this will later be done.
2016-06-08 16:35:27 +02:00
Dietmar Maurer
84252f6772 code cleanups 2016-06-08 09:20:11 +02:00
Dietmar Maurer
76f13c9ee8 cleanup: improve error message 2016-06-08 08:36:18 +02:00
Wolfgang Link
0a29ad6148 Add LVM-thin storage migration
It is now possibel to migrate LVM-thin volumes offline from one node to an other.
Also LVM what is used by Qemu.
2016-06-08 08:21:40 +02:00
Fabian Grünbichler
8898dd7be2 add extract vzdump config methods
extract_vzdump_config_tar is an adapted combination
of tar_archive_search_conf() and the first part of
recover_config(), both from PVE::LXC::Create.

a compressed vma backup file needs special error
handling because vma exits as soon as it found the config
file, which the used decompressors treat as error.
2016-06-03 12:04:26 +02:00
Wolfgang Link
851658c3b0 Change zfs path when link clone are used
The new naming is coherent to Dir plugin.

So if we make an licked clone the parent will be coded in the path of the storage.
2016-04-04 06:38:15 +02:00
Fabian Grünbichler
83d7192ff9 Add write_config, drop cfs_read_file
Use PVE::Storage::config() and the new
PVE::Storage::write_config() instead of cfs_read_file and
cfs_write_file with a hardcoded filename.
2016-03-30 10:42:12 +02:00
Wolfgang Link
986303caf3 Fix LXC migration from local subvol
This patch reconfigured the rsync parameters, so the fs keeps all settings and works recursive.
2016-03-22 09:06:59 +01:00
Wolfgang Link
b650f029d3 Use array to run_command instead of a string. 2016-03-17 07:07:56 +01:00
Wolfgang Link
2d22db9a99 Include all snapshots when migrate storage zfs to zfs. 2016-03-17 07:07:01 +01:00
Wolfgang Bumiller
2d080bb88d storage_migrate: another ipv6 fix for an rsync command 2016-01-28 11:10:56 +01:00
Dietmar Maurer
610798bc2d add lvm thin plugin 2015-11-11 09:14:06 +01:00
Wolfgang Bumiller
323ab5baa8 fix bug #769: migrate: use -p on 'zfs send' to include properties 2015-10-15 10:33:34 +02:00
Dietmar Maurer
b70b0c58b3 complete_volume: avoid large list 2015-10-01 10:56:19 +02:00
Dietmar Maurer
bf7aed2674 implement complete_volume 2015-10-01 07:59:48 +02:00
Dietmar Maurer
98437f4c85 add bash completion for content type 2015-10-01 07:16:59 +02:00
Dietmar Maurer
37ba0aea5b volume_list: moved code from PVE::API2::Storage::Content
For better code reuse.
2015-10-01 06:50:19 +02:00
Dietmar Maurer
746e530f72 white space cleanups: correctly intend code 2015-10-01 06:28:22 +02:00
Dietmar Maurer
180c8b020c complete_storage: correctly pass storage config to storage_ids() 2015-10-01 06:26:35 +02:00
Wolfgang Link
02e797b8e1 extend functionality to (de)activate_volumes with snapshots
this extension provide the capability to activate or deactivate snapshot,
so we can use this e.g. for LXC backup in snapshot mode.
2015-09-22 12:18:09 +02:00
Dietmar Maurer
f7621c0126 improve bash completions 2015-09-18 09:33:09 +02:00
Wolfgang Link
c8943a85c9 remove non used parameter exclusive
This makes no sense because it should always be exclusive.
Also RDB checks it self.
LVM has not possibility to use lvchange.
DRBD is this feature not implemented.
2015-09-17 12:37:27 +02:00
Wolfgang Bumiller
1689e627a6 iSCSI ipv6 support 2015-08-31 15:50:34 +02:00
Dietmar Maurer
48e27f7937 scan_zfs: ignore subvolumes generated by our ZFSPoolPlugin 2015-08-28 11:01:41 +02:00
Wolfgang Bumiller
3932390b11 allow subvolume selection in ZPool storage 2015-08-28 10:56:55 +02:00
Dietmar Maurer
a6f1262677 parse_volname: document return values 2015-08-12 07:34:58 +02:00
Dietmar Maurer
35533c68fb add subvol support for directory storage
This storage type does not support subvol quotas, so we
only allow this if vdisk_alloc is called with size=0.
2015-08-12 06:11:10 +02:00
Dietmar Maurer
dec97937f2 zfs_parse_zvol_list: do not add pool to volname
Else, alloc and list return different volids.
2015-08-10 16:53:19 +02:00
Dietmar Maurer
d73060becd storage_info: fix content filter
List all storages if $content filter is undefined.
2015-08-10 10:05:01 +02:00
Dietmar Maurer
583c2802f8 storage status API: allow to filter multiple content types 2015-08-07 09:46:49 +02:00
Wolfgang Bumiller
afdfbe5594 mask world r and group wx permissions in vdisk_alloc
Avoid world-readable disk files being created as suggested
in #416 by setting an umask to strip world permissions as
well as group write/exec permissions before calling
alloc_image.
2015-07-30 08:49:46 +02:00
Dietmar Maurer
13d2cb7980 allow templates using .xz compression 2015-07-01 10:06:24 +02:00
Wolfgang Link
ee302b1caa Fix nfsscan
Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-06-10 10:55:06 +02:00
Wolfgang Bumiller
c67daeac17 ipv6 support for Storage::resolv_server
While in posix gethostbyname(3) does support ipv6, perl's gethostbyname
usually returns wrong results for names, or no results for ipv6
addresses. Since we provide a getaddrinfo helper already, we now use
that instead.
2015-05-12 10:39:15 +02:00
Wolfgang Link
f5640e7d3b remove running from Storage and check it in QemuServer
It is better to check if a VM is running in QemuServer then in Storage.
for the Storage there is no difference if it is running or not.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-05-06 11:42:38 +02:00