-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
142 lines (102 loc) · 4.77 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
DanZFS - Release v0.2.1 on XX/05/2013
=====================================
Link: http://code.google.com/p/danzfs/
For license and copyright, please see the LICENSE file.
Preface
=======
DanZFS is a set of Python scripts which allows you check the status of ZFS pools providing a standard frontend. We call the core ZFS executables, libzfs is NOT used.
We only need a base install of Python to function and of course a working implementation of ZFS.
I created this project as I needed a standard way of checking ZFS pools via Python.
Please use the examples (in the "examples" directory) as a guide on using DanZFS.
*** WARNING: This code is in a very ALPHA status, it's very likely to contain nasty bugs - use at your own risk! ***
Notes
=====
v0.2.1 - XXX May 2013
^^^^^^^^^^^^^^^^^^^^^
1. Fixed a potential issue with Replicationd where it could generate the same checksum for two different endpoints. Run replicationd with the mode "rename" and it will give you the old and the new GUIDs so you can rename them. Please note that changing the destination type argument will result in a new checksum.
2. Replicationd now has an additional mode called "state" which will tell you the state of the replication.
v0.2.0 - 1st April 2013
^^^^^^^^^^^^^^^^^^^^^^^
1. Now uses DanLog (class is inside of DanZFS to avoid version conflicts later on) - my own logger for Python.
2. Snapshots can now be created, destroyed, and renamed.
3. New replication script which uses snapshots to move data around - replicationd. Supports one-to-one and one-to-many style replication, take a look at the example config files as well as it's own README file.
v0.1.2 - 3rd June 2012
^^^^^^^^^^^^^^^^^^^^^^
1. Didn't correctly make a new copy of the ZFS command list, instead it referenced it. This has now been corrected.
2. New example code showing how I use date-based snapshots and cleanup.
v0.1.1 - 26th May 2012
^^^^^^^^^^^^^^^^^^^^^^
1. "Status" field added from "zpool status" - example code updated.
2. "Action" field added from "zpool status" - example code updated.
3. "See" field added from "zpool status" - example code updated.
4. "zpool iostat" - New example code.
5. "zfs list -t snapshot" - New example code.
6. "zfs list -t volume" - New example code.
7. "zfs get all" - New example code.
8. You can now filter for a specific dataset with the majority of the commands which support this feature, the specific examples will mention this if this is available.
v0.1.0 - 22nd May 2012
^^^^^^^^^^^^^^^^^^^^^^
1. Initial version which just provides basic information.
Usage
=====
On the command line: -
% python snapshot_cleanup.py
% python zfs_get.py
% python zfs_list_everything.py
% python zfs_list_filesystems.py
% python zfs_list_snapshots.py
% python zfs_list_volumes.py
% python zpool_iostat.py
% python zpool_list.py
% python zpool_status.py
% python replicationd.py
Current Features
================
1. zfs get all.
2. zfs list -t filesystem.
3. zfs list -t snapshot.
4. zfs list -t volume.
5. zfs status.
6. zpool iostat.
7. zpool list.
8. zpool status.
9. Date-based snapshots.
10. zfs set.
11. Replication using snapshots.
Installation
============
FreeBSD
^^^^^^^
Here are the packages I've currently got installed for DanZFS to work: -
================================================================================================================================
Name | Download From | Directory
================+===================+===========================================================================================
python27 | Ports | /usr/ports/lang/python/
================================================================================================================================
You can install them in any order, you might want to make sure the your ports collection is up-to-date. Python 2.7 is normally installed by default so don't worry about that one.
Linux
^^^^^
Untested - But no problems are expected.
MacOS
^^^^^
Untested - But no problems are expected.
Solaris
^^^^^^^
Untested - But no problems are expected.
Microsoft Windows
^^^^^^^^^^^^^^^^^
Not available on this platform.
FAQ
===
Q. What are the dependencies for this program?
A. Python v2.7 or greater. That's it, just a base install of Python is needed as DanZFS will call the ZFS executables ("zfs" and "zpool").
Q. What operating systems does it support?
A. I develop and test DanZFS with FreeBSD 9.1 with ZFS v28. But it should work on other OS'es which provide ZFS like Solaris and Linux.
Q. Can I create (port) of DanZFS?
A. By all means! Be sure to read the LICENSE as your port will inherit the license.
Q. I would like a feature that's not in DanZFS...
A. I'm currently not accepting feature requests.
Legal
=====
I am in no way affiliated or in partnership with either Google, Sun, Oracle, Microsoft, or anyone else.
<EOF>