mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 01:42:58 +02:00
installer: Downgrade RAID metadata format to 1.0.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user