4 This section describes basic Archipelago management and configuration.
6 Archipelago installation
7 ************************
9 Archipelago consists of the following packages:
11 * ``libxseg0``: libxseg used to communicate over shared memory segments
12 * ``python-xseg``: python bindings for libxseg
13 * ``archipelago-kernel-dkms``: contains archipelago kernel modules to provide
14 block devices to be used as vm disks
15 * ``archipleago-modules-source``: contains archipelago kernel modules source, to
16 build deb packages with the help of module assistant
17 * ``python-archipelago``: archipelago python module. Includes archipelago and
19 * ``archipelago``: user space tools and peers for the archipelago management and
21 * ``archipelago-rados``: user space storage driver to enable RADOS support
22 * ``archipelago-ganeti``: ganeti ext storage scripts, that enable ganeti to
23 provision VMs over archipelago
27 Installing ``archipelago-ganeti`` from the apt repository should fetch all the
28 necessary dependencies, based on the dkms infrastructure. Install also
29 ``archipelago-rados`` to enable RADOS storage backend.
32 .. code-block:: console
34 $ apt-get install archipelago-ganeti archipelago-rados
36 .. tip:: Archipelago does not start automatically after installation. Please
37 review the configuration file, make any appropriate changes to the
38 default configuration (e.g. default max segment size) and start it
41 If a dkms based install is not desired, build your own archipelago-modules
42 package by installing archipelago-modules-source and performing:
44 .. code-block:: console
46 $ m-a build --text-mode --kvers-list "target kernel to build" archipelago-modules
48 .. note:: Kernel modules need linux-kernel >= 3.2
50 .. warning:: Archipelago currently supports only x86_64 architecture.
52 Archipelago configuration
53 *************************
55 Archipelago configuration file is located to :
56 ``/etc/archipelago/archipelago.conf``
60 **Description** : Max number of ports in the segment.
63 **Description** : Shared memory size, used for IPC.
66 **Description** : Start port of xsegbd peers
69 **Description** : End port of xsegbd peers
72 **Description** : Start port of vlmc tool.
75 **Description** : End port of vlmc tool.
78 **Description** : A list of (role_name, role_type) tuples, which is used to
79 deploy the archipelago user space peers. Order matters.
81 ``role_name { 'setting': value }``
82 **Description** : A python dictionary which holds the parameters of they
86 * ``portno_start``: Start port of the peer.
87 * ``portno_end``: End port of the peer.
88 * ``log_level``: Loggging lever for the peer. Available logging levers 0-3.
89 * ``nr_ops``: Number of ops, each peer can have flying.
94 Filed specific options:
95 * ``nr_threads``: Number of I/O threads to server requests.
96 * ``archip_dir``: Directory where the files will reside.
97 * ``fdcache``: Number of file descriptors to be kept open.
99 Rados specific options:
100 * ``nr_threads``: Number of threads to server requests.
101 * ``pool``: RADOS pool where the objects will be stored.
103 Mapper specified options:
104 * ``blockerb_port``: Port for communication with the blocker responsible for
106 * ``blockerm_port``: Port for communication with the blocker responsible for
109 Vlmc specific options:
110 * ``blocker_port``: Port for communication with the blocker responsible for the
112 * ``mapper_port``: Port for communication with the mapper.
117 ``archipelago`` provides basic functionality for archipelago.
121 .. code-block:: console
123 $ archipelago [-u] command
126 Currently it supports the following commands:
129 Starts archipelago or the specified peer.
131 Stops archipelago or the specified peer.
133 Restarts archipelago or the specified peer.
135 Show the status of archipelago.
137 ``role`` is one of the roles defined on the configuration file.
140 ``start``, ``stop``, ``restart`` can be combined with the ``-u / --user`` option
141 to affect only the userspace peers supporting archipelago.
143 Archipelago advanced commands
144 *****************************
146 The ``vlmc`` tool provides a way to interact with archipelago volumes
150 .. code-block:: console
152 $ vlmc command [args]
156 * **map**: maps the volume to a xsegbd device
158 Usage: ``$ vlmc map <volumename>``
160 * **unmap**: unmaps the specified device from the system.
162 Usage: ``vlmc unmap </dev/xsegbd[1-..]>``
164 * **create**: creates a new volume with an optional specified size from an optional
167 Usage: ``vlmc create <volumename> --snap <snapname> --size <size>``
169 Usage: ``vlmc create <volumename> --snap <snapname>``
171 Usage: ``vlmc create <volumename> --size <size>``
173 The ``--snap`` and ``--size`` are both optional, but at least one of them is
174 mandatory. If snap is not specified, then a blank volume with the specified
175 size is created. If size is not specified, the new volume inherits the size
178 * **remove**: removes the volume.
180 Usage: ``vlmc remove <volumename>``
182 This does not actually delete the blocks, just make the volume inaccessible
183 for usage. The actual blocks are removed later, when a garbage collection is
186 * **list**: Provides a list of archipelago volume currently found on storage
190 * **info**: shows volume information. Currently returns only the volume size.
192 Usage: ``vlmc info <volumename>``
194 * **open**: opens an archipelago volume. That is, taking all the necessary locks
195 and also make the rest of the infrastructure aware of the operation.
197 Usage: ``vlmc open <volumename>``
199 This operation succeeds if the volume is alread opened by the current host.
201 * **close**: closes an archipelago volume. That is, performing all the necessary
202 functions in the insfrastrure to successfully release the volume. Also
203 releases all the acquired locks.
205 Usage: ``vlmc close <volumename>``
207 A explicit ``close`` command should be invoked an explicit ``open``, to
208 release the volume, unless another action triggered an implicit ``close``.
210 * **lock**: locks a volume. This step allow the administrator to lock an
211 archipelago volume, independently from the rest of the infrastructure.
213 Usage: ``vlmc lock <volumename>``
215 The locks are idempotent for the current owner of the lock. That is, a lock
216 operation will succeed when the volume is already locked by the same blocker.
218 * **unlock**: unlocks a volume. This allow the administrator to unlock a volume,
219 independently from the rest of the infrastructure.
221 Usage: ``vlmc unlock [-f] <volumename>``
223 The unlock option can be performed only by the blocker that acquired the lock
224 in the first place. To unlock a volume from another blocker, ``-f`` option
225 must be used to break the lock.
227 Archipelago volume locking system
228 *********************************
230 Archipelago uses volume storage based locks, to get exclusive access to volumes.
231 Since a volume can be active in only one VM, locks are used to ensure that
232 restriction. But since locks are storage based, they are permanent and
233 independent from the process or subsystem that acquired them. So, if a process,
234 an archipelago deployment on a node misbehaves or crashes, or even a hypervisor
235 management software (e.g. ganeti) fails to perform a migration, there might be an
236 inconsistency. Knowledge of locking behavior in archipelago is necessary in
237 order to surpass these problems.
241 locking is cached on mapper
243 Persistent locks. held if a process/blocker stops/fails/crashes
245 lock is acquired with best effort mode:
247 * reads: try to get it, but do not fail if not able to. just don't cache anything
248 * writes: try to get it, and wait until the owner free it.
249 * snapshot/remove/create etc: Try to get it. Fail if not able to.
251 during migrations: blah blah