diff options
author | NeilBrown <neilb@suse.de> | 2009-05-11 15:46:46 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-11 15:46:46 +1000 |
commit | 0ac91628b93b31636979b637c1ac7258064dea4e (patch) | |
tree | 88971a9e037c1519a8db205e8d6d1338ddfe8131 /mdadm.h | |
parent | 603f24a05f48063a7239e323e2aeab497cb0feb6 (diff) | |
download | mdadm-0ac91628b93b31636979b637c1ac7258064dea4e.tar.gz mdadm-0ac91628b93b31636979b637c1ac7258064dea4e.tar.xz mdadm-0ac91628b93b31636979b637c1ac7258064dea4e.zip |
Allow homehost to be largely ignored when assembling arrays.
If mdadm.conf contains
HOMEHOST <ignore>
or commandline contains
--homehost=<ignore>
then the check that array metadata mentions the given homehost is
replace by a check that the name recorded in the metadata is not
already used by some other array mentioned in mdadm.conf.
This allows more arrays to use their native name rather than having
an _NN suffix added.
This should only be used during boot time if all arrays required for
normal boot are listed in mdadm.conf.
If auto-assembly is used to find all array during boot, then the
HOMEHOST feature should be used to ensure there is no room for
confusion in choosing array names, and so it should not be set
to <ignore>.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -724,7 +724,7 @@ extern int Assemble(struct supertype *st, char *mddev, mddev_ident_t ident, mddev_dev_t devlist, char *backup_file, int readonly, int runstop, - char *update, char *homehost, + char *update, char *homehost, int require_homehost, int verbose, int force); extern int Build(char *mddev, int chunk, int level, int layout, @@ -755,7 +755,8 @@ extern int Wait(char *dev); extern int WaitClean(char *dev, int verbose); extern int Incremental(char *devname, int verbose, int runstop, - struct supertype *st, char *homehost, int autof); + struct supertype *st, char *homehost, int require_homehost, + int autof); extern int Incremental_container(struct supertype *st, char *devname, int verbose, int runstop, int autof, int trustworthy); @@ -795,9 +796,12 @@ extern void set_conffile(char *file); extern char *conf_get_mailaddr(void); extern char *conf_get_mailfrom(void); extern char *conf_get_program(void); -extern char *conf_get_homehost(void); +extern char *conf_get_homehost(int *require_homehostp); extern char *conf_line(FILE *file); extern char *conf_word(FILE *file, int allow_key); +extern int conf_name_is_free(char *name); +extern int devname_matches(char *name, char *match); + extern void free_line(char *line); extern int match_oneof(char *devices, char *devname); extern void uuid_from_super(int uuid[4], mdp_super_t *super); |