installer: Downgrade RAID metadata format to 1.0.

This commit is contained in:
Michael Tremer
2014-08-12 15:14:45 +02:00
parent bee06cd410
commit 7b4790d3fc
2 changed files with 6 additions and 2 deletions

View File

@@ -811,10 +811,12 @@ int hw_umount_filesystems(struct hw_destination* dest, const char* prefix) {
int hw_setup_raid(struct hw_destination* dest) {
char* cmd = NULL;
int r;
assert(dest->is_raid);
asprintf(&cmd, "echo \"y\" | /sbin/mdadm --create --verbose --metadata=1.2 %s", dest->path);
asprintf(&cmd, "echo \"y\" | /sbin/mdadm --create --verbose --metadata=%s --auto=mdp %s",
RAID_METADATA, dest->path);
switch (dest->raid_level) {
case 1:
@@ -843,7 +845,7 @@ int hw_setup_raid(struct hw_destination* dest) {
return r;
}
int r = mysystem(cmd);
r = mysystem(cmd);
free(cmd);
// Wait a moment until the device has been properly brought up

View File

@@ -48,6 +48,8 @@
#define HW_FS_DEFAULT HW_FS_EXT4
#define RAID_METADATA "1.0"
#define BYTES2MB(x) ((x) / 1024 / 1024)
#define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024)