-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphobos.spec.in
More file actions
510 lines (444 loc) · 19.9 KB
/
phobos.spec.in
File metadata and controls
510 lines (444 loc) · 19.9 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
Name: @PACKAGE@
Version: @VERSION@
Release: @PHOBOS_RELEASE@%{?dist}
Summary: Parallel Heterogeneous OBject-Oriented Storage
Group: Applications/System
License: LGPLv2.1
URL: http://www-hpc.cea.fr
Source0: %{name}-%{version}.tar.gz
%define phobosdocdir %{_docdir}/%{name}
# build options || .rpmmacros options || change to default action
# ============== ==================== ===========================
# --with rados || %%_with_rados 1 || build the rados libraries
%bcond_with rados
%define __python /usr/bin/python3
%if 0%{?rhel} >= 8
%global python_prefix python3
%global postgres_prefix postgresql
%else
%global python_prefix python36
%global postgres_prefix postgresql94
%endif
BuildRequires: %{postgres_prefix}-devel
# g_ptr_array_find needs glib2 2.54
BuildRequires: glib2-devel >= 2.54
BuildRequires: %{python_prefix}-devel
BuildRequires: jansson-devel >= 2.5
BuildRequires: libattr-devel
BuildRequires: libini_config-devel
BuildRequires: openssl-devel
BuildRequires: sg3_utils-devel
BuildRequires: protobuf-c-devel
BuildRequires: systemd
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: make
BuildRequires: openssl-devel >= 0.9.7
BuildRequires: xxhash-devel
BuildRequires: libcmocka-devel
BuildRequires: libuuid-devel
BuildRequires: python3-argcomplete
BuildRequires: python3-sphinx
Requires: %{postgres_prefix}-server
Requires: %{postgres_prefix}-contrib
Requires: glib2 >= 2.54
Requires: jansson
Requires: libini_config
Requires: openssl
Requires: attr
Requires: libattr
Requires: %{python_prefix}
%if 0%{?rhel} < 8
Requires: python-argparse
%endif
Requires: %{python_prefix}-PyYAML
Requires: %{python_prefix}-clustershell
Requires: %{python_prefix}-psycopg2
Requires: %{python_prefix}-tabulate
%if 0%{?rhel} > 8
Requires: %{python_prefix}-setuptools
%endif
Requires: protobuf
Requires: protobuf-c
Requires: openssl >= 0.9.7
Requires: xxhash-libs
Requires: libuuid
%description
Phobos aims to implement high performance distributed object storage on a wide
variety of media including tapes, POSIX file systems, other object stores...
This initial version is however limited to a single host. It can manage tapes
in a SCSI library and local directories.
%package devel
Summary: C API for Phobos Object Store.
Requires: phobos
Requires: glib2-devel >= 2.54
Requires: jansson-devel >= 2.5
Requires: libattr-devel
%description devel
This package contains header files and required libraries to access Phobos
object store from a C program.
%if %{with rados}
%package rados-adapters
Summary: RADOS adapters for Phobos
BuildRequires: librados2-devel
Requires: phobos
Requires: librados2
%description rados-adapters
This package contains required libraries to use Ceph/RADOS as a Phobos storage
backend. Verify that the Phobos configuration file has been updated to support
RADOS functionalities.
%endif
%prep
%setup -q
%build
CONFIGURE_OPTIONS=""
%if %{with rados}
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-rados"
%endif
%if 0%{?rhel} < 8
export PKG_CONFIG_PATH=/usr/pgsql-9.4/lib/pkgconfig
%endif
%configure $CONFIGURE_OPTIONS
make %{?_smp_mflags}
%install
%make_install
install -D -p -m 0640 doc/cfg/template.conf %{buildroot}/%{_sysconfdir}/phobos.conf
# create another copy of configuration in documentation directory
install -D -p -m 0640 doc/cfg/template.conf %{buildroot}/%{phobosdocdir}/template.conf
install -p -m 0640 README.md %{buildroot}/%{phobosdocdir}/README.md
rm -f $RPM_BUILD_ROOT/%{_libdir}/phobos/libpho_*.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/phobos/libpho_*.la
mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d/
echo "%{_libdir}/phobos" > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/phobos.conf
mkdir %{buildroot}/%{_sysconfdir}/bash_completion.d
register-python-argcomplete phobos > %{buildroot}/%{_sysconfdir}/bash_completion.d/phobos-argcomplete.sh
mkdir -p %{buildroot}/%{_sharedstatedir}/phobos
%files
%{_libdir}/libphobos_store.so*
%{_libdir}/libphobos_admin.so*
%{_libdir}/phobos/libpho_core.so*
%{_libdir}/phobos/libpho_*_dir.so*
%{_libdir}/phobos/libpho_*_tape.so*
%{_libdir}/phobos/libpho_*_ltfs.so*
%{_libdir}/phobos/libpho_*_posix.so*
%{_libdir}/phobos/libpho_*_raid1.so*
%{_libdir}/phobos/libpho_*_raid4.so*
%{_libdir}/phobos/libpho_*_dummy.so*
%{_libdir}/phobos/libpho_*_scsi.so*
%{_sbindir}/pho_*_helper
%{_sbindir}/phobos_db
%{python_sitearch}/phobos/*
%{python_sitearch}/phobos-*-py?.?.egg-info
%{_bindir}/phobos
%{_sbindir}/phobosd
%{_unitdir}/phobosd.service
%{_sysconfdir}/ld.so.conf.d/phobos.conf
%{_sbindir}/phobos_tape_library_test
%{_sbindir}/phobos_tape_library_test.bash
%{_sbindir}/phobos_tape_library_mtx_test.bash
%{_sbindir}/phobos_tlc
%{_unitdir}/phobos_tlc.service
%{_sbindir}/phobos_hsm_sync_dir
%{_sbindir}/phobos_hsm_release_dir
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/phobos.conf
%config %{_sysconfdir}/bash_completion.d/phobos-argcomplete.sh
%dir %{phobosdocdir}
%doc %{phobosdocdir}/README.md
%doc %{phobosdocdir}/template.conf
%dir %{_sharedstatedir}/phobos
%files devel
%{_includedir}/pho_attrs.h
%{_includedir}/pho_cfg.h
%{_includedir}/pho_comm.h
%{_includedir}/pho_common.h
%{_includedir}/pho_dss.h
%{_includedir}/pho_dss_wrapper.h
%{_includedir}/pho_ldm.h
%{_includedir}/pho_types.h
%{_includedir}/phobos_store.h
%{_includedir}/phobos_admin.h
%{_libdir}/libphobos_store.la
%{_libdir}/libphobos_admin.la
%post
ldconfig
%if %{with rados}
%files rados-adapters
%{_libdir}/phobos/libpho_*rados*.so*
%post rados-adapters
ldconfig
%endif
%changelog
* Thu Mar 26 2026 - Patrice Lucas <patrice.lucas@cea.fr> - 3.3.1-1
- WARNING: the `--orphan` from `phobos extent list` changed to `--state`. It
allows the filtering of the extents with their states.
- Add `phobos_admin_extent_list` in the store API to list only the extents
- Add a "--force" option to "phobos dir delete" to delete dir even if the
local path does not exist.
- Add size column to deprecated object list query
- HSM improvements: split configuration per copies couple, log errors into a
file, stdout only mode with grouping and metadata with base64
- Profile of the default copy name is now taken into account
- Cleanup put param filling
- CLI: allow object list with UUID and without OID
* Fri Feb 13 2026 - Patrice Lucas <patrice.lucas@cea.fr> - 3.3.0-1
- WARNING: the db schema moves from 3.2 to 3.3 and a migration is needed
- Metrology is now available
- TLC can be secured by the use of multiple devices
- Add a way to mark a tape as lost
- LRS is strengthened against client error. LRS releases the resources on
client disconnection. LRS is resistant to client crash when sending message.
- Store clients support input file size errors
- Add grouping_on_dir configuration parameter to disengage dir from grouping
- Add sort option to dss_extent_get, and delete dss_get_extents_order_by_ctime
function
- Lock update management
- hsm sync by grouping option
- hsm sync does not update the sync time on error
- Fix locate with grouping by adding grouping copy to media info duplication
* Thu Nov 13 2025 - Patrice Lucas <patrice.lucas@cea.fr> - 3.2.0-1
- WARNING: the db schema moves from 3.0 to 3.2 and a migration is needed
- WARNING: change the `phobos ping [phobosd|tlc]` command to
`phobos phobosd ping` and `phobos tlc ping`
- New phobos_hsm_sync_dir command to copy objects from local dir to other
media
- ctime ordered grouped read
- ctime ordered repack
- We manage a last locate timestamp and the corresponding delay in the LRS to
prevent after locate resource starvation.
- Added object size to object table in DSS. Same field is added to deprecated
objects.
- adding creation_time to extent table into DSS. This ctime is inherited from
the corresponding existing copy creation_time.
- store: existing object grouping is now taken into account when creating a
copy
- fix management of extent and object registration on partial release failure
- prevent negative physical space free update
- scale orphan extent detection at repack
- lrs: make some fields of the lrs_dev and pho_resource structures atomic to
prevent data races between a scheduler thread and a device thread using these
structures.
- sched gets new medium health only on the chosen medium
- add 'adm_status' to phobos drive status output
- make global 'phobos_context' thread-safe
- make 'libpho_core' a shared library
- Added macros to get the version Phobos from the API (major, minor and patch)
and macros to check the current version is higher than a given one
* Mon Jun 23 2025 - Patrice Lucas <patrice.lucas@cea.fr> - 3.1.0-1
- limited number of write per grouping: the new "fifo_max_write_per_grouping"
configuration parameter allows to limit the number of concurrent writes per
grouping on one phobosd instance. The default 0 value reproduces the
previous unlimited behaviour.
- fix large sends (e.g. during a 'lib scan" with over 1500 slots)
- handle external command errors better by using the glib2
spawn_check_wait_status function
- use the io_block_size parameter to set the write size of new objects on media
* Tue May 27 2025 - Patrice Lucas <patrice.lucas@cea.fr> - 3.0.0-1
- WARNING: the db schema moves from 2.2 to 3.0 and a migration is needed
- WARNING: TLC section names in the configuration file are changed from
[tlc_libname] to [tlc "libname"]
- WARNING: phobos_locate has a new argument: the copy_name. The API
compatibility is broken. (The lhsm_phobos copytool must be also updated.)
- object copy create/list/delete is available, with "--copy-name" at locate,
put and get, "get_preferred_order" configuration option taken into account at
get
- config man page is now available
- autocompletion is added to CLI (check the README.md for more information on
how to activate it)
- the CLI arguments are homogenized between commands operating on the same
target
- fix client crash on "del --hard"
- cli,api: default library for lib scan/refresh and ldm open is available
- lrs: fix fifo find_write_device for unloaded tape without grouping
- raid: check the real size of an extent against the expected size
- locate: avoid locking media not compatible
- fix miscellaneous memory leaks fix
- bugfix: incomplete set of orphan extents when deleting with several replicas
- lrs: bugfix when requeuing a format request
- lrs: do not decrement the health counter without TLC
* Tue Jan 14 2025 - Patrice Lucas <patrice.lucas@cea.fr> - 2.2.0-1
- WARNING: the db schema moves from 2.1 to 2.2 and a migration is needed
- WARNING: XFER structure is modified to old N objects and the API
compatibility is broken. (For example, the lhsm_phobos copytool must be
also updated to version 1.3 or greater.)
- WARNING: the `alias` feature is renamed `profile`. In that extent, all
`-a`/`--alias` options are renamed `-p`/`--profile`.
- WARNING: the `-p` option, standing for `--lyt-params`, is uppercased, thus
changed to `-P`.
- WARNING: the mput is replaced by `put --file`
- WARNING: tlc daemon is renamed phobos_tlc
- grouping: this new feature is available to group objects on similar media.
- no-split: we add a new `no-split` mode to put a list of object on the same
medium.
- `--new-library`: this new admin option is available to change the library of
a drive, a dir, a tape or a rados pool.
- `library` parameter is added to alias.
- `distutils` dependency is changed to `setuptools`.
- `io_block_size` parameter is extended by family.
- `dir_full_threshold` and `rados_pool_full_threshold` options complete the
`tape_full_threshold` option.
- `listen_interface` setting is added for tlc.
- `--library` option is added to phobos extent list.
- `--errors` option is added to clear logs.
- `--status` option is added to `phobos media list` and `phobos drive list`.
* Mon Oct 14 2024 - Patrice Lucas <patrice.lucas@cea.fr> - 2.1.0-1
- WARNING: the db schema moves from 2.0 to 2.1 and a migration is needed
- Multilibrary: Resource (tape or drive for example) can now belong to
different libraries. Default libraries per family must be set in phobos.conf.
- Rename: we can change the object id of an existing object.
- Repack: we can copy non deprecated object of one tape
to a new one and format the old tape to remove deprecated objects.
- RAID4: a new 2+1 layout is available. Object is split on two media and a
third one contains XOR.
- --sort/--rsort: phobos extent/media/drive/object lists can be sorted.
- Empty dir/tape/rados_pool deletion: medium without any extent can be deleted.
- LTFS release: a phobos cli command is available to release the ltfs lock
of one drive.
- Hard deletion: --hard option is added to the delete command.
- Object creation and access times are managed by phobos.
- path normalization: dir path normalization (trailing "/" or relative path
for example) are managed by phobos CLI and API.
* Fri May 17 2024 - Patrice Lucas <patrice.lucas@cea.fr> - 2.0.0-1
- WARNING: the db schema moves from 1.95 to 2.0 and a migration is needed
- Device, medium: errors are now logged into the DSS and managed through a
health counter
- TLC: Library is now accessed through the Tape Library Controler
- Extent migration between tapes is now ready and paves the road for the future
tape repack feature.
- Tape import: we can now import into a Phobos system a tape from an other
Phobos system (recovery or transfer).
* Wed Nov 29 2023 - Guillaume Courrier <guillaume.courrier@cea.fr> - 1.95.1-2
- Add missing pho_ldm.h in installed headers
* Fri Nov 24 2023 - Patrice Lucas <patrice.lucas@cea.fr> - 1.95.1-1
- ltfs: improve ltfs log with serial number
- ltfs: return an error if labels are different at mount operation
- store, admin, cli: fix store and admin global context share
- LRS : fix unloading a tape from a source which is not a slot
- compilation : fix gcc compilation warning on RHEL 9 based system
- doc : add documentation for the currently_dedicated_to option
* Thu Oct 19 2023 - Patrice Lucas <patrice.lucas@cea.fr> - 1.95-2
- Phobos-devel requires libattr-devel
* Thu Sep 21 2023 - Yoann Valeri <yoann.valeri@cea.fr> - 1.95-1
- Release 1.95 (Tethys)
- WARNING: the db schema moves from 1.93 to 1.95 and a migration is needed.
- Added early locking when locating an object
- Improved locate to check whether an object can be read with the current
resources (unlocked driver/tapes, driver/tape generation compatibility)
- Creation of I/O schedulers for efficient request handling: FIFO, Group Read,
Fair Share.
- Added the "sched fair_share" command to configure the Fair Share algorithm
- Created library tests to certify Phobos can work on the target library
- Calculate MD5 and/or XXH128 (if available) as extent checksum when putting
objects
- Retrieve MD5 and XXH128 checksums at extent listing
- Added SCSI logs into DSS
* Mon Nov 7 2022 - Yoann Valeri <yoann.valeri@cea.fr> - 1.94.1-1
- Added RADOS as data storage backend
- Added module-loader to manage io, fs, dev, lib and layout adapters dynamically
- Modified drive lock API and command
- Added drive migrate command
- Improved command documentation
- Internal LRS parallelization (read, write and format managed by device
threads)
- Added locate modification design
* Tue Apr 19 2022 - Yoann Valeri <yoann.valeri@cea.fr> - 1.94-1
- Release 1.94 (Rhea)
- Improved documentation on setup, admin commands, object management, listing
commands
- Added thresholds for when to synchronize a medium (time, number of requests
and written size). Synchronizations are now done all at once, not one by one
- LRS is now composed of the duo of threads:
* communication and scheduler threads, for communicating with clients and
managing a specific family of device/media;
* device threads, to manage a device and basic operations regarding a
medium. Multiple device/medium can now operate in parallel for operations
like mount/umount/load/unload and formats, which do not block the
execution of read and write requests anymore
- Media don't unload when terminating the LRS
- LRS will wait for every I/O completion before terminating
- LRS won't stop when a client is disconnected
- New commands:
* drive delete
* drive status
* lock clean
- Format manage multiple formats at the same time, and added a parameter to
limit the number of concurrent formats
- Added max-width and no-truncate arguments to object list
* Tue Nov 30 2021 - Patrice Lucas <patrice.lucas@cea.fr> - 1.93-1
- LRS lock refactoring
- Added layout parameters to migration
- Removed layout simple and added simple alias
- Limited sync to write operations
* Fri Jul 2 2021 - Yoann Valeri <yoann.valeri@cea.fr> - 1.92-1
- Locate command
- Uuid and version options to get command
* Mon May 17 2021 - Yoann Valeri <yoann.valeri@cea.fr> - 1.91.2-1
- Modified concurrency lock management in DSS
- Modified DB schema
- Pattern option to extent and object list
- Ping command
- Configurable block size when writing data
- Put overwrite
- Added phobos locate command's design documentation
* Wed Mar 3 2021 - Sebastien Gougeaud <sebastien.gougeaud@cea.fr> - 1.91.1-1
- Delete and undelete commands for objects
- Extent path generation now considers uuid and version of objects
* Wed Jan 13 2021 - Sebastien Gougeaud <sebastien.gougeaud@cea.fr> - 1.91.0-1
- Release 1.91 (Japet)
- Python3 port
- New DB version towards the future deletion mechanism
- Alias feature to specify storage class of service
- Media set-access command to control permitted medium operations
- Daemon management optimization (ressource locks, etc.)
* Thu Sep 10 2020 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.90.0-1
- Release 1.90 (Hi'iaka): 1.9x is the release cycle towards 2.0
- Phobos now runs a daemon (phobosd) on each IO node to manage devices and
schedule IOs
- Object and extent listing and filtering commands
- Layout and family selection from (m)put command line
- Split too large extents on multiple media
- Port to RHEL/CentOS8
- Various fixes and refactoring
* Fri Jan 10 2020 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.3.1-1
- Pass 'scsi generic' devices to LTFS instead of 'scsi tape'.
* Tue Nov 26 2019 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.3.0-1
- Release 1.3 (Vala)
- Now uses LTFS 2.4. No longer requires lin_tape.
- Media list filter by tag, e.g. "phobos tape list -T foo,bar"
- Drive list filter by model, e.g. "phobos drive list -m ULTRIUM-TD6"
- Fix various memory leaks and wrong behaviors
* Thu Jul 18 2019 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.2.0-1
- Final 1.2 release (Echo)
- New features:
* Dual logging (stderr and syslog)
* phobos lib scan (improved 'mtx status')
* phobos_db tool (DB schema management, DB migration)
* retry when the number of concurrent PUT/GET > nb drives
* media tag management
* manage drive-tape compatibility rules (WIP)
* Mon Jan 15 2018 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.1-4
- Minor refresh with latest patches
* Fri Sep 08 2017 - Henri Doreau <henri.doreau@cea.fr> - 1.1-3
- Propery set LGPL headers to the project files
- Reimplement CLI using ctypes instead of SWIG
- Fix a bug where errors on flush would trigger an assertion failure
- Misc packaging improvements to meet ocean quality standards
* Fri Aug 04 2017 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.1-2
- Change DB conversion script to properly convert JSON integers
- Make DSS resilient to missing stats fields in JSONs
- Fix default commands for ltfs mount/umount/format
- Don't leave a drive busy when its filesystem is full
- Fix invalid write intent size of 0
- Set rpath to load layout modules
- SCSI library: check target slot is empty before move
- Make tape move resilient to invalid slot
* Wed Jun 21 2017 - Thomas Leibovici <thomas.leibovici@cea.fr> - 1.1-1
- Generic Layout management + 2 implementations: 'simple' and 'raid1'.
- Configuration changes. See installed template (see /etc/phobos.conf.rpmnew).
- Set filesystem label at format time, and check it at mount time.
- Improved management of full devices (set R/O, tag full...)
- SCSI library: when needed, search free slot to unload a tape to.
- Phobos 1.0 to phobos 1.1 DB conversion script.
- New DSS filter API (no change in commands or user interface).
- Miscellaneous bug fixes