.BR summaries ,
.BR uuid ,
.BR name ,
+.BR homehost ,
.BR resync ,
.BR byteorder ,
or
of the array as stored in the superblock. This is only supported for
version-1 superblocks.
+The
+.B homehost
+option will change the
+.I homehost
+as recorded in the superblock. For version-0 superblocks, this is the
+same as updating the UUID.
+For version-1 superblocks, this involves updating the name.
+
The
.B resync
option will cause the array to be marked
continue;
if (strcmp(update, "name")==0)
continue;
+ if (strcmp(update, "homehost")==0)
+ continue;
if (strcmp(update, "byteorder")==0) {
if (ss) {
fprintf(stderr, Name ": must not set metadata type with --update=byteorder.\n");
sb->state &= ~(1<<MD_SB_CLEAN);
sb->recovery_cp = 0;
}
+ if (strcmp(update, "homehost") == 0 &&
+ homehost) {
+ uuid_set = 0;
+ update = "uuid";
+ info->uuid[0] = sb->set_uuid0;
+ info->uuid[1] = sb->set_uuid1;
+ }
if (strcmp(update, "uuid") == 0) {
if (!uuid_set && homehost) {
unsigned char *hash = SHA1((unsigned char*)homehost,
memcpy(bm->uuid, info->uuid, 16);
}
}
+ if (strcmp(update, "homehost") == 0 &&
+ homehost) {
+ char *c;
+ update = "name";
+ c = strchr(sb->set_name, ':');
+ if (c)
+ strncpy(info->name, c+1, 31 - (c-sb->set_name));
+ else
+ strncpy(info->name, sb->set_name, 32);
+ info->name[33] = 0;
+ }
if (strcmp(update, "name") == 0) {
if (info->name[0] == 0)
sprintf(info->name, "%d", info->array.md_minor);