Skip to content

Commit

Permalink
Introduce D label prefix for scratch raids
Browse files Browse the repository at this point in the history
Rationale:

SW-RAIDs are assembled by serials,
Serials are kept in a database,
thus they need a uniqe label.

Since this applies also for level-0 scratch raids, and a clash with
decent SW-RAIDs (M-prefix) is unwanted, they get the D-prefix.
  • Loading branch information
thomas committed Mar 14, 2018
1 parent 28c7f01 commit 2879b17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mxmount
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ sub parse_data {
if (!$data[3]) {
$D->{noexport} = 1;
}
} elsif($D->{label} =~ /^D/) { # D: scratch software raid (mdadm)
$D->{mountpoint} = 'D/' . $D->{label};
$D->{label} = lc($D->{label});
} elsif($D->{label} =~ /^M/) { # M: decent software raid (mdadm)
$D->{mountpoint} = 'M/' . $D->{label};
$D->{label} = lc($D->{label});
Expand Down

0 comments on commit 2879b17

Please sign in to comment.