mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +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.
47 lines
981 B
C
47 lines
981 B
C
/*
|
|
* Copyright (C) 2001 Sistina Software (UK) Limited.
|
|
*
|
|
* This file is released under the LGPL.
|
|
*
|
|
*/
|
|
|
|
#ifndef _LVM_VGCACHE_H
|
|
#define _LVM_VGCACHE_H
|
|
|
|
#include <sys/types.h>
|
|
#include <asm/page.h>
|
|
#include "dev-cache.h"
|
|
#include "list.h"
|
|
#include "uuid.h"
|
|
#include "toolcontext.h"
|
|
|
|
struct vgname_entry {
|
|
struct list pvdevs;
|
|
char *vgname;
|
|
char vgid[ID_LEN + 1];
|
|
struct format_type *fmt;
|
|
};
|
|
|
|
struct pvdev_list {
|
|
struct list list;
|
|
struct device *dev;
|
|
};
|
|
|
|
int vgcache_init();
|
|
void vgcache_destroy();
|
|
|
|
/* Return list of PVs in named VG */
|
|
struct list *vgcache_find(const char *vg_name);
|
|
struct format_type *vgcache_find_format(const char *vg_name);
|
|
struct list *vgcache_find_by_vgid(const char *vgid);
|
|
|
|
/* FIXME Temporary function */
|
|
char *vgname_from_vgid(struct cmd_context *cmd, struct id *vgid);
|
|
|
|
/* Add/delete a device */
|
|
int vgcache_add(const char *vg_name, const char *vgid, struct device *dev,
|
|
struct format_type *fmt);
|
|
void vgcache_del(const char *vg_name);
|
|
|
|
#endif
|