2008-02-20 15:34:52 +00:00
|
|
|
/*
|
|
|
|
* storage_conf.h: config handling for storage driver
|
|
|
|
*
|
2010-03-01 23:38:28 +00:00
|
|
|
* Copyright (C) 2006-2008, 2010 Red Hat, Inc.
|
2008-02-20 15:34:52 +00:00
|
|
|
* Copyright (C) 2006-2008 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_STORAGE_CONF_H__
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __VIR_STORAGE_CONF_H__
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "util.h"
|
|
|
|
# include "storage_encryption_conf.h"
|
|
|
|
# include "threads.h"
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include <libxml/tree.h>
|
2009-06-22 16:41:34 +00:00
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
/* Shared structs */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStoragePerms virStoragePerms;
|
|
|
|
typedef virStoragePerms *virStoragePermsPtr;
|
|
|
|
struct _virStoragePerms {
|
|
|
|
int mode;
|
|
|
|
int uid;
|
|
|
|
int gid;
|
|
|
|
char *label;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Storage volumes */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* How the volume's data is stored on underlying
|
|
|
|
* physical devices - can potentially span many
|
|
|
|
* devices in LVM case.
|
|
|
|
*/
|
|
|
|
typedef struct _virStorageVolSourceExtent virStorageVolSourceExtent;
|
|
|
|
typedef virStorageVolSourceExtent *virStorageVolSourceExtentPtr;
|
|
|
|
struct _virStorageVolSourceExtent {
|
|
|
|
char *path;
|
|
|
|
unsigned long long start;
|
|
|
|
unsigned long long end;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _virStorageVolSource virStorageVolSource;
|
|
|
|
typedef virStorageVolSource *virStorageVolSourcePtr;
|
|
|
|
struct _virStorageVolSource {
|
|
|
|
int nextent;
|
|
|
|
virStorageVolSourceExtentPtr extents;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* How the volume appears on the host
|
|
|
|
*/
|
|
|
|
typedef struct _virStorageVolTarget virStorageVolTarget;
|
|
|
|
typedef virStorageVolTarget *virStorageVolTargetPtr;
|
|
|
|
struct _virStorageVolTarget {
|
|
|
|
char *path;
|
|
|
|
int format;
|
|
|
|
virStoragePerms perms;
|
2009-06-26 16:18:59 +00:00
|
|
|
int type; /* only used by disk backend for partition type */
|
2009-07-20 22:28:11 +00:00
|
|
|
/* Currently used only in virStorageVolDef.target, not in .backingstore. */
|
|
|
|
virStorageEncryptionPtr encryption;
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStorageVolDef virStorageVolDef;
|
|
|
|
typedef virStorageVolDef *virStorageVolDefPtr;
|
|
|
|
struct _virStorageVolDef {
|
|
|
|
char *name;
|
|
|
|
char *key;
|
2008-11-17 11:19:33 +00:00
|
|
|
int type; /* virStorageVolType enum */
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2009-04-17 19:12:37 +00:00
|
|
|
unsigned int building;
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
unsigned long long allocation;
|
|
|
|
unsigned long long capacity;
|
|
|
|
|
|
|
|
virStorageVolSource source;
|
|
|
|
virStorageVolTarget target;
|
2009-01-27 18:30:03 +00:00
|
|
|
virStorageVolTarget backingStore;
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
2008-10-10 15:13:28 +00:00
|
|
|
typedef struct _virStorageVolDefList virStorageVolDefList;
|
|
|
|
typedef virStorageVolDefList *virStorageVolDefListPtr;
|
|
|
|
struct _virStorageVolDefList {
|
|
|
|
unsigned int count;
|
|
|
|
virStorageVolDefPtr *objs;
|
|
|
|
};
|
2008-02-20 15:34:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Storage pools */
|
|
|
|
|
|
|
|
enum virStoragePoolType {
|
2008-11-17 11:19:33 +00:00
|
|
|
VIR_STORAGE_POOL_DIR, /* Local directory */
|
2008-02-20 15:34:52 +00:00
|
|
|
VIR_STORAGE_POOL_FS, /* Local filesystem */
|
|
|
|
VIR_STORAGE_POOL_NETFS, /* Networked filesystem - eg NFS, GFS, etc */
|
|
|
|
VIR_STORAGE_POOL_LOGICAL, /* Logical volume groups / volumes */
|
|
|
|
VIR_STORAGE_POOL_DISK, /* Disk partitions */
|
|
|
|
VIR_STORAGE_POOL_ISCSI, /* iSCSI targets */
|
|
|
|
VIR_STORAGE_POOL_SCSI, /* SCSI HBA */
|
2009-09-08 13:47:45 +00:00
|
|
|
VIR_STORAGE_POOL_MPATH, /* Multipath devices */
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
VIR_STORAGE_POOL_LAST,
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStoragePool)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2009-04-01 16:03:22 +00:00
|
|
|
enum virStoragePoolDeviceType {
|
|
|
|
VIR_STORAGE_DEVICE_TYPE_DISK = 0x00,
|
|
|
|
VIR_STORAGE_DEVICE_TYPE_ROM = 0x05,
|
|
|
|
|
|
|
|
VIR_STORAGE_DEVICE_TYPE_LAST,
|
|
|
|
};
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
|
|
|
|
enum virStoragePoolAuthType {
|
|
|
|
VIR_STORAGE_POOL_AUTH_NONE,
|
|
|
|
VIR_STORAGE_POOL_AUTH_CHAP,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolAuthChap virStoragePoolAuthChap;
|
|
|
|
typedef virStoragePoolAuthChap *virStoragePoolAuthChapPtr;
|
|
|
|
struct _virStoragePoolAuthChap {
|
|
|
|
char *login;
|
|
|
|
char *passwd;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For remote pools, info on how to reach the host
|
|
|
|
*/
|
|
|
|
typedef struct _virStoragePoolSourceHost virStoragePoolSourceHost;
|
|
|
|
typedef virStoragePoolSourceHost *virStoragePoolSourceHostPtr;
|
|
|
|
struct _virStoragePoolSourceHost {
|
|
|
|
char *name;
|
|
|
|
int port;
|
|
|
|
int protocol;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-06-26 16:18:59 +00:00
|
|
|
/*
|
|
|
|
* For MSDOS partitions, the free area
|
|
|
|
* is important when creating
|
|
|
|
* logical partitions
|
|
|
|
*/
|
|
|
|
enum virStorageFreeType {
|
|
|
|
VIR_STORAGE_FREE_NONE = 0,
|
|
|
|
VIR_STORAGE_FREE_NORMAL,
|
|
|
|
VIR_STORAGE_FREE_LOGICAL,
|
|
|
|
VIR_STORAGE_FREE_LAST
|
|
|
|
};
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
/*
|
|
|
|
* Available extents on the underlying storage
|
|
|
|
*/
|
|
|
|
typedef struct _virStoragePoolSourceDeviceExtent virStoragePoolSourceDeviceExtent;
|
|
|
|
typedef virStoragePoolSourceDeviceExtent *virStoragePoolSourceDeviceExtentPtr;
|
|
|
|
struct _virStoragePoolSourceDeviceExtent {
|
|
|
|
unsigned long long start;
|
|
|
|
unsigned long long end;
|
2009-06-26 16:18:59 +00:00
|
|
|
int type; /* free space type */
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
2010-01-21 11:50:52 +00:00
|
|
|
typedef struct _virStoragePoolSourceInitiatorAttr virStoragePoolSourceInitiatorAttr;
|
|
|
|
struct _virStoragePoolSourceInitiatorAttr {
|
|
|
|
/* Initiator IQN */
|
|
|
|
char *iqn;
|
|
|
|
};
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
/*
|
|
|
|
* Pools can be backed by one or more devices, and some
|
|
|
|
* allow us to track free space on underlying devices.
|
|
|
|
*/
|
|
|
|
typedef struct _virStoragePoolSourceDevice virStoragePoolSourceDevice;
|
|
|
|
typedef virStoragePoolSourceDevice *virStoragePoolSourceDevicePtr;
|
|
|
|
struct _virStoragePoolSourceDevice {
|
|
|
|
int nfreeExtent;
|
|
|
|
virStoragePoolSourceDeviceExtentPtr freeExtents;
|
|
|
|
char *path;
|
|
|
|
int format; /* Pool specific source format */
|
2009-06-26 16:18:59 +00:00
|
|
|
/* When the source device is a physical disk,
|
|
|
|
the geometry data is needed */
|
|
|
|
struct _geometry {
|
|
|
|
int cyliders;
|
|
|
|
int heads;
|
|
|
|
int sectors;
|
|
|
|
} geometry;
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolSource virStoragePoolSource;
|
|
|
|
typedef virStoragePoolSource *virStoragePoolSourcePtr;
|
|
|
|
struct _virStoragePoolSource {
|
|
|
|
/* An optional host */
|
|
|
|
virStoragePoolSourceHost host;
|
|
|
|
|
|
|
|
/* And either one or more devices ... */
|
|
|
|
int ndevice;
|
|
|
|
virStoragePoolSourceDevicePtr devices;
|
|
|
|
|
|
|
|
/* Or a directory */
|
|
|
|
char *dir;
|
|
|
|
|
|
|
|
/* Or an adapter */
|
|
|
|
char *adapter;
|
|
|
|
|
2008-09-02 14:15:42 +00:00
|
|
|
/* Or a name */
|
|
|
|
char *name;
|
|
|
|
|
2010-01-21 11:50:52 +00:00
|
|
|
/* Initiator IQN */
|
|
|
|
virStoragePoolSourceInitiatorAttr initiator;
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
int authType; /* virStoragePoolAuthType */
|
|
|
|
union {
|
|
|
|
virStoragePoolAuthChap chap;
|
|
|
|
} auth;
|
|
|
|
|
|
|
|
int format; /* Pool type specific format such as filesystem type, or lvm version, etc */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolTarget virStoragePoolTarget;
|
|
|
|
typedef virStoragePoolTarget *virStoragePoolTargetPtr;
|
|
|
|
struct _virStoragePoolTarget {
|
|
|
|
char *path; /* Optional local filesystem mapping */
|
|
|
|
virStoragePerms perms; /* Default permissions for volumes */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolDef virStoragePoolDef;
|
|
|
|
typedef virStoragePoolDef *virStoragePoolDefPtr;
|
|
|
|
struct _virStoragePoolDef {
|
|
|
|
/* General metadata */
|
|
|
|
char *name;
|
|
|
|
unsigned char uuid[VIR_UUID_BUFLEN];
|
|
|
|
int type; /* virStoragePoolType */
|
|
|
|
|
|
|
|
unsigned long long allocation;
|
|
|
|
unsigned long long capacity;
|
|
|
|
unsigned long long available;
|
|
|
|
|
|
|
|
virStoragePoolSource source;
|
|
|
|
virStoragePoolTarget target;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolObj virStoragePoolObj;
|
|
|
|
typedef virStoragePoolObj *virStoragePoolObjPtr;
|
|
|
|
|
|
|
|
struct _virStoragePoolObj {
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutex lock;
|
2008-12-04 22:00:14 +00:00
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
char *configFile;
|
|
|
|
char *autostartLink;
|
|
|
|
int active;
|
|
|
|
int autostart;
|
2009-04-17 19:12:37 +00:00
|
|
|
unsigned int asyncjobs;
|
2008-02-20 15:34:52 +00:00
|
|
|
|
|
|
|
virStoragePoolDefPtr def;
|
|
|
|
virStoragePoolDefPtr newDef;
|
|
|
|
|
2008-10-10 15:13:28 +00:00
|
|
|
virStorageVolDefList volumes;
|
|
|
|
};
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2008-10-10 15:13:28 +00:00
|
|
|
typedef struct _virStoragePoolObjList virStoragePoolObjList;
|
|
|
|
typedef virStoragePoolObjList *virStoragePoolObjListPtr;
|
|
|
|
struct _virStoragePoolObjList {
|
|
|
|
unsigned int count;
|
|
|
|
virStoragePoolObjPtr *objs;
|
2008-02-20 15:34:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virStorageDriverState virStorageDriverState;
|
|
|
|
typedef virStorageDriverState *virStorageDriverStatePtr;
|
|
|
|
|
|
|
|
struct _virStorageDriverState {
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutex lock;
|
2008-12-04 21:40:42 +00:00
|
|
|
|
2008-10-10 15:13:28 +00:00
|
|
|
virStoragePoolObjList pools;
|
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
|
|
|
};
|
|
|
|
|
2008-10-23 11:39:53 +00:00
|
|
|
typedef struct _virStoragePoolSourceList virStoragePoolSourceList;
|
|
|
|
typedef virStoragePoolSourceList *virStoragePoolSourceListPtr;
|
|
|
|
struct _virStoragePoolSourceList {
|
2008-11-04 21:54:21 +00:00
|
|
|
int type;
|
2008-10-23 11:39:53 +00:00
|
|
|
unsigned int nsources;
|
|
|
|
virStoragePoolSourcePtr sources;
|
|
|
|
};
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2008-02-20 15:34:52 +00:00
|
|
|
static inline int virStoragePoolObjIsActive(virStoragePoolObjPtr pool) {
|
|
|
|
return pool->active;
|
|
|
|
}
|
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define virStorageReportError(code, ...) \
|
2010-02-10 11:42:56 +00:00
|
|
|
virReportErrorHelper(NULL, VIR_FROM_STORAGE, code, __FILE__, \
|
2010-03-01 23:38:28 +00:00
|
|
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2010-02-10 11:42:56 +00:00
|
|
|
int virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
2008-10-10 15:13:28 +00:00
|
|
|
const char *configDir,
|
|
|
|
const char *autostartDir);
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2008-10-10 15:13:28 +00:00
|
|
|
virStoragePoolObjPtr virStoragePoolObjFindByUUID(virStoragePoolObjListPtr pools,
|
2008-02-20 15:34:52 +00:00
|
|
|
const unsigned char *uuid);
|
2008-10-10 15:13:28 +00:00
|
|
|
virStoragePoolObjPtr virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
|
2008-02-20 15:34:52 +00:00
|
|
|
const char *name);
|
|
|
|
|
|
|
|
virStorageVolDefPtr virStorageVolDefFindByKey(virStoragePoolObjPtr pool,
|
|
|
|
const char *key);
|
|
|
|
virStorageVolDefPtr virStorageVolDefFindByPath(virStoragePoolObjPtr pool,
|
|
|
|
const char *path);
|
|
|
|
virStorageVolDefPtr virStorageVolDefFindByName(virStoragePoolObjPtr pool,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
void virStoragePoolObjClearVols(virStoragePoolObjPtr pool);
|
|
|
|
|
2010-02-10 11:42:56 +00:00
|
|
|
virStoragePoolDefPtr virStoragePoolDefParseString(const char *xml);
|
|
|
|
virStoragePoolDefPtr virStoragePoolDefParseFile(const char *filename);
|
|
|
|
virStoragePoolDefPtr virStoragePoolDefParseNode(xmlDocPtr xml,
|
2009-06-22 16:41:34 +00:00
|
|
|
xmlNodePtr root);
|
2010-02-10 11:42:56 +00:00
|
|
|
char *virStoragePoolDefFormat(virStoragePoolDefPtr def);
|
2008-02-20 15:34:52 +00:00
|
|
|
|
2010-02-10 11:42:56 +00:00
|
|
|
virStorageVolDefPtr virStorageVolDefParseString(virStoragePoolDefPtr pool,
|
2009-06-22 16:41:34 +00:00
|
|
|
const char *xml);
|
2010-02-10 11:42:56 +00:00
|
|
|
virStorageVolDefPtr virStorageVolDefParseFile(virStoragePoolDefPtr pool,
|
2009-06-22 16:41:34 +00:00
|
|
|
const char *filename);
|
2010-02-10 11:42:56 +00:00
|
|
|
virStorageVolDefPtr virStorageVolDefParseNode(virStoragePoolDefPtr pool,
|
2009-06-22 16:41:34 +00:00
|
|
|
xmlDocPtr xml,
|
|
|
|
xmlNodePtr root);
|
2010-02-10 11:42:56 +00:00
|
|
|
char *virStorageVolDefFormat(virStoragePoolDefPtr pool,
|
2008-02-20 15:34:52 +00:00
|
|
|
virStorageVolDefPtr def);
|
|
|
|
|
2010-02-10 11:42:56 +00:00
|
|
|
virStoragePoolObjPtr virStoragePoolObjAssignDef(virStoragePoolObjListPtr pools,
|
2008-02-20 15:34:52 +00:00
|
|
|
virStoragePoolDefPtr def);
|
|
|
|
|
2010-02-10 11:42:56 +00:00
|
|
|
int virStoragePoolObjSaveDef(virStorageDriverStatePtr driver,
|
2008-02-20 15:34:52 +00:00
|
|
|
virStoragePoolObjPtr pool,
|
|
|
|
virStoragePoolDefPtr def);
|
2010-02-10 11:42:56 +00:00
|
|
|
int virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool);
|
2008-02-20 15:34:52 +00:00
|
|
|
|
|
|
|
void virStorageVolDefFree(virStorageVolDefPtr def);
|
2008-10-23 11:39:53 +00:00
|
|
|
void virStoragePoolSourceFree(virStoragePoolSourcePtr source);
|
2008-02-20 15:34:52 +00:00
|
|
|
void virStoragePoolDefFree(virStoragePoolDefPtr def);
|
|
|
|
void virStoragePoolObjFree(virStoragePoolObjPtr pool);
|
2008-10-10 15:13:28 +00:00
|
|
|
void virStoragePoolObjListFree(virStoragePoolObjListPtr pools);
|
|
|
|
void virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
|
2008-02-20 15:34:52 +00:00
|
|
|
virStoragePoolObjPtr pool);
|
|
|
|
|
2009-10-15 15:41:53 +00:00
|
|
|
virStoragePoolSourcePtr
|
2010-02-10 11:42:56 +00:00
|
|
|
virStoragePoolDefParseSourceString(const char *srcSpec,
|
2009-10-15 15:58:35 +00:00
|
|
|
int pool_type);
|
|
|
|
virStoragePoolSourcePtr
|
2010-02-10 11:42:56 +00:00
|
|
|
virStoragePoolSourceListNewSource(virStoragePoolSourceListPtr list);
|
|
|
|
char *virStoragePoolSourceListFormat(virStoragePoolSourceListPtr def);
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2008-12-04 20:53:20 +00:00
|
|
|
void virStoragePoolObjLock(virStoragePoolObjPtr obj);
|
|
|
|
void virStoragePoolObjUnlock(virStoragePoolObjPtr obj);
|
|
|
|
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
enum virStoragePoolFormatFileSystem {
|
|
|
|
VIR_STORAGE_POOL_FS_AUTO = 0,
|
|
|
|
VIR_STORAGE_POOL_FS_EXT2,
|
|
|
|
VIR_STORAGE_POOL_FS_EXT3,
|
|
|
|
VIR_STORAGE_POOL_FS_EXT4,
|
|
|
|
VIR_STORAGE_POOL_FS_UFS,
|
|
|
|
VIR_STORAGE_POOL_FS_ISO,
|
|
|
|
VIR_STORAGE_POOL_FS_UDF,
|
|
|
|
VIR_STORAGE_POOL_FS_GFS,
|
|
|
|
VIR_STORAGE_POOL_FS_GFS2,
|
|
|
|
VIR_STORAGE_POOL_FS_VFAT,
|
|
|
|
VIR_STORAGE_POOL_FS_HFSPLUS,
|
|
|
|
VIR_STORAGE_POOL_FS_XFS,
|
2009-10-14 15:03:22 +00:00
|
|
|
VIR_STORAGE_POOL_FS_OCFS2,
|
2008-11-17 11:19:33 +00:00
|
|
|
VIR_STORAGE_POOL_FS_LAST,
|
|
|
|
};
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStoragePoolFormatFileSystem)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
enum virStoragePoolFormatFileSystemNet {
|
|
|
|
VIR_STORAGE_POOL_NETFS_AUTO = 0,
|
|
|
|
VIR_STORAGE_POOL_NETFS_NFS,
|
2009-07-08 09:46:25 +00:00
|
|
|
VIR_STORAGE_POOL_NETFS_GLUSTERFS,
|
2008-11-17 11:19:33 +00:00
|
|
|
VIR_STORAGE_POOL_NETFS_LAST,
|
|
|
|
};
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStoragePoolFormatFileSystemNet)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
enum virStoragePoolFormatDisk {
|
|
|
|
VIR_STORAGE_POOL_DISK_UNKNOWN = 0,
|
|
|
|
VIR_STORAGE_POOL_DISK_DOS = 1,
|
|
|
|
VIR_STORAGE_POOL_DISK_DVH,
|
|
|
|
VIR_STORAGE_POOL_DISK_GPT,
|
|
|
|
VIR_STORAGE_POOL_DISK_MAC,
|
|
|
|
VIR_STORAGE_POOL_DISK_BSD,
|
|
|
|
VIR_STORAGE_POOL_DISK_PC98,
|
|
|
|
VIR_STORAGE_POOL_DISK_SUN,
|
|
|
|
VIR_STORAGE_POOL_DISK_LVM2,
|
|
|
|
VIR_STORAGE_POOL_DISK_LAST,
|
|
|
|
};
|
|
|
|
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStoragePoolFormatDisk)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
enum virStoragePoolFormatLogical {
|
|
|
|
VIR_STORAGE_POOL_LOGICAL_UNKNOWN = 0,
|
|
|
|
VIR_STORAGE_POOL_LOGICAL_LVM2 = 1,
|
|
|
|
VIR_STORAGE_POOL_LOGICAL_LAST,
|
|
|
|
};
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStoragePoolFormatLogical)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* XXX these are basically partition types.
|
|
|
|
*
|
|
|
|
* fdisk has a bazillion partition ID types
|
|
|
|
* parted has practically none, and splits the
|
|
|
|
* info across 3 different attributes.
|
|
|
|
*
|
|
|
|
* So this is a semi-generic set
|
|
|
|
*/
|
|
|
|
enum virStorageVolFormatDisk {
|
|
|
|
VIR_STORAGE_VOL_DISK_NONE = 0,
|
|
|
|
VIR_STORAGE_VOL_DISK_LINUX,
|
|
|
|
VIR_STORAGE_VOL_DISK_FAT16,
|
|
|
|
VIR_STORAGE_VOL_DISK_FAT32,
|
|
|
|
VIR_STORAGE_VOL_DISK_LINUX_SWAP,
|
|
|
|
VIR_STORAGE_VOL_DISK_LINUX_LVM,
|
|
|
|
VIR_STORAGE_VOL_DISK_LINUX_RAID,
|
|
|
|
VIR_STORAGE_VOL_DISK_EXTENDED,
|
|
|
|
VIR_STORAGE_VOL_DISK_LAST,
|
|
|
|
};
|
2008-12-17 21:09:44 +00:00
|
|
|
VIR_ENUM_DECL(virStorageVolFormatDisk)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2009-06-26 16:18:59 +00:00
|
|
|
enum virStorageVolTypeDisk {
|
|
|
|
VIR_STORAGE_VOL_DISK_TYPE_NONE = 0,
|
|
|
|
VIR_STORAGE_VOL_DISK_TYPE_PRIMARY,
|
|
|
|
VIR_STORAGE_VOL_DISK_TYPE_LOGICAL,
|
|
|
|
VIR_STORAGE_VOL_DISK_TYPE_EXTENDED,
|
|
|
|
VIR_STORAGE_VOL_DISK_TYPE_LAST,
|
|
|
|
};
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2009-06-26 16:18:59 +00:00
|
|
|
/*
|
|
|
|
* Mapping of Parted fs-types
|
|
|
|
* MUST be kept in the same order
|
|
|
|
* as virStorageVolFormatDisk
|
|
|
|
*/
|
|
|
|
enum virStoragePartedFsType {
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_NONE = 0,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_LINUX,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_FAT16,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_FAT32,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_LINUX_SWAP,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_LINUX_LVM,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_LINUX_RAID,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_EXTENDED,
|
|
|
|
VIR_STORAGE_PARTED_FS_TYPE_LAST,
|
|
|
|
};
|
|
|
|
VIR_ENUM_DECL(virStoragePartedFsType)
|
2008-11-17 11:19:33 +00:00
|
|
|
|
2008-10-23 11:39:53 +00:00
|
|
|
#endif /* __VIR_STORAGE_CONF_H__ */
|