mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
25b733809a
Lots of changes/very little testing so far => there'll be bugs! Use 'vgcreate -M text' to create a volume group with its metadata stored in text files. Text format metadata changes should be reasonably atomic, with a (basic) automatic recovery mechanism if the system crashes while a change is in progress. Add a metadata section to lvm.conf to specify multiple directories if you want (recommended) to keep multiple copies of the metadata (eg on different filesystems). e.g. metadata { dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"] } Plenty of refinements still in the pipeline.
40 lines
1013 B
C
40 lines
1013 B
C
/*
|
|
* Copyright (C) 2001 Sistina Software (UK) Limited.
|
|
*
|
|
* This file is released under the LGPL.
|
|
*/
|
|
|
|
#ifndef _LVM_FORMAT_TEXT_H
|
|
#define _LVM_FORMAT_TEXT_H
|
|
|
|
#include "lvm-types.h"
|
|
#include "metadata.h"
|
|
#include "uuid-map.h"
|
|
|
|
/*
|
|
* Archives a vg config. 'retain_days' is the minimum number of
|
|
* days that an archive file must be held for. 'min_archives' is
|
|
* the minimum number of archives required to be kept for each
|
|
* volume group.
|
|
*/
|
|
int archive_vg(struct volume_group *vg,
|
|
const char *dir,
|
|
const char *desc,
|
|
uint32_t retain_days,
|
|
uint32_t min_archive);
|
|
|
|
/*
|
|
* Displays a list of vg backups in a particular archive directory.
|
|
*/
|
|
int archive_list(struct cmd_context *cmd, struct uuid_map *um,
|
|
const char *dir, const char *vg);
|
|
|
|
/*
|
|
* The text format can read and write a volume_group to a file.
|
|
*/
|
|
struct format_type *create_text_format(struct cmd_context *cmd);
|
|
void *create_text_context(struct format_type *fmt, const char *path,
|
|
const char *desc);
|
|
|
|
#endif
|