]>
git.ipfire.org Git - thirdparty/mdadm.git/blob - mdctl.h
2 * mdctl - manage Linux "md" devices aka RAID arrays.
4 * Copyright (C) 2001 Neil Brown <neilb@cse.unsw.edu.au>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Email: <neilb@cse.unsw.edu.au>
24 * School of Computer Science and Engineering
25 * The University of New South Wales
30 #define __USE_LARGEFILE64
32 extern __off64_t lseek64
__P ((int __fd
, __off64_t __offset
, int __whence
));
34 #include <sys/types.h>
44 #include <linux/kdev_t.h>
46 #include <sys/ioctl.h>
52 extern char short_options
[];
53 extern struct option long_options
[];
54 extern char Version
[], Usage
[], Help
[], Help_create
[], Help_build
[], Help_assemble
[];
56 /* structures read from config file */
57 /* List of mddevice names and uuids */
58 typedef struct mddev_uuid_s
{
61 struct mddev_uuid_s
*next
;
64 /* List of device names - wildcards expanded */
65 typedef struct mddev_dev_s
{
67 struct mddev_dev_s
*next
;
71 * RAID5 supported algorithms
73 #define ALGORITHM_LEFT_ASYMMETRIC 0
74 #define ALGORITHM_RIGHT_ASYMMETRIC 1
75 #define ALGORITHM_LEFT_SYMMETRIC 2
76 #define ALGORITHM_RIGHT_SYMMETRIC 3
79 extern int Manage_ro(char *devname
, int fd
, int readonly
);
80 extern int Manage_runstop(char *devname
, int fd
, int runstop
);
81 extern int Manage_subdevs(char *devname
, int fd
,
82 int devcnt
, char *devnames
[], int devmodes
[]);
85 extern int Assemble(char *mddev
, int mdfd
,
86 int uuid
[4], int uuidset
,
87 char *conffile
, int scan
,
88 int subdevs
, char *subdev
[],
89 int readonly
, int runstop
,
90 int verbose
, int force
);
92 extern int Build(char *mddev
, int mdfd
, int chunk
, int level
,
94 int subdevs
, char *subdev
[]);
97 extern int Create(char *mddev
, int mdfd
,
98 int chunk
, int level
, int layout
, int raiddisks
, int sparedisks
,
99 int subdevs
, char *subdev
[],
102 extern int Detail(char *dev
);
103 extern int Examine(char *dev
);
105 extern int md_get_version(int fd
);
106 extern int get_linux_version();
107 extern int parse_uuid(char *str
, int uuid
[4]);
109 extern mddev_uuid_t
conf_get_uuids(char *);
110 extern mddev_dev_t
conf_get_devs(char *);