How to create raid1 mirror for existing mdadm raid0 - without overwriting data
I created a /dev/md1 raid0 across two drives, added ext4 filesystem, and it's mountable and working fine.
I created a /dev/md2 raid0 across two drives, added ext4 filesystem, and it's also mountable and working fine.
When I try to make a /dev/md0 raid1 using devices /dev/md1 and /dev/md2 it changes the filesystem to linux raid member, and cannot be mounted.
If I add ext4 to the raid1, will it overwrite the underlying raid0 data, or will it apply only to the raid1? I don't understand how the filesystem interacts with mdadm builds.
linux raid raid-1 ext4 raid-0
add a comment |
I created a /dev/md1 raid0 across two drives, added ext4 filesystem, and it's mountable and working fine.
I created a /dev/md2 raid0 across two drives, added ext4 filesystem, and it's also mountable and working fine.
When I try to make a /dev/md0 raid1 using devices /dev/md1 and /dev/md2 it changes the filesystem to linux raid member, and cannot be mounted.
If I add ext4 to the raid1, will it overwrite the underlying raid0 data, or will it apply only to the raid1? I don't understand how the filesystem interacts with mdadm builds.
linux raid raid-1 ext4 raid-0
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40
add a comment |
I created a /dev/md1 raid0 across two drives, added ext4 filesystem, and it's mountable and working fine.
I created a /dev/md2 raid0 across two drives, added ext4 filesystem, and it's also mountable and working fine.
When I try to make a /dev/md0 raid1 using devices /dev/md1 and /dev/md2 it changes the filesystem to linux raid member, and cannot be mounted.
If I add ext4 to the raid1, will it overwrite the underlying raid0 data, or will it apply only to the raid1? I don't understand how the filesystem interacts with mdadm builds.
linux raid raid-1 ext4 raid-0
I created a /dev/md1 raid0 across two drives, added ext4 filesystem, and it's mountable and working fine.
I created a /dev/md2 raid0 across two drives, added ext4 filesystem, and it's also mountable and working fine.
When I try to make a /dev/md0 raid1 using devices /dev/md1 and /dev/md2 it changes the filesystem to linux raid member, and cannot be mounted.
If I add ext4 to the raid1, will it overwrite the underlying raid0 data, or will it apply only to the raid1? I don't understand how the filesystem interacts with mdadm builds.
linux raid raid-1 ext4 raid-0
linux raid raid-1 ext4 raid-0
asked Jan 2 at 15:35
gboonegboone
32
32
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40
add a comment |
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40
add a comment |
1 Answer
1
active
oldest
votes
Linux Software RAID member devices do not have filesystems, they are block devices. Once you create the RAID1 using the two underlying devices, the existing ext4 filesystems on those devices are basically not relevant.
You would only create a filesystem once, on top of the RAID1 device.
The only filesystem that would be mounted is the one on top of the RAID1 device.
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389824%2fhow-to-create-raid1-mirror-for-existing-mdadm-raid0-without-overwriting-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Linux Software RAID member devices do not have filesystems, they are block devices. Once you create the RAID1 using the two underlying devices, the existing ext4 filesystems on those devices are basically not relevant.
You would only create a filesystem once, on top of the RAID1 device.
The only filesystem that would be mounted is the one on top of the RAID1 device.
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
add a comment |
Linux Software RAID member devices do not have filesystems, they are block devices. Once you create the RAID1 using the two underlying devices, the existing ext4 filesystems on those devices are basically not relevant.
You would only create a filesystem once, on top of the RAID1 device.
The only filesystem that would be mounted is the one on top of the RAID1 device.
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
add a comment |
Linux Software RAID member devices do not have filesystems, they are block devices. Once you create the RAID1 using the two underlying devices, the existing ext4 filesystems on those devices are basically not relevant.
You would only create a filesystem once, on top of the RAID1 device.
The only filesystem that would be mounted is the one on top of the RAID1 device.
Linux Software RAID member devices do not have filesystems, they are block devices. Once you create the RAID1 using the two underlying devices, the existing ext4 filesystems on those devices are basically not relevant.
You would only create a filesystem once, on top of the RAID1 device.
The only filesystem that would be mounted is the one on top of the RAID1 device.
answered Jan 2 at 15:44
Dan StonerDan Stoner
411
411
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
add a comment |
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
So to clarify from a raid build standpoint, I thought it was possible to "add" a mirror. Assuming I am correct (please confirm, thanks) then, in this case, it's not possible to do that because there is not ALREADY an existing raid1? Something like that?
– gboone
Jan 2 at 16:03
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
I believe "add a mirror" means add to an existing RAID1. When the RAID1 is first created it has a single member, so "add" means add the second member (and possibly a standby, etc.). Filesystems get created on top of (after) RAID devices. So for your 4 drives total, you could 1. make two RAID0 devices 2. make a RAID1 device on top of the RAID0 devices 3. create a filesystem on top of the RAID1 device.
– Dan Stoner
Jan 2 at 20:58
Fantastic thanks!
– gboone
Jan 3 at 4:09
Fantastic thanks!
– gboone
Jan 3 at 4:09
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389824%2fhow-to-create-raid1-mirror-for-existing-mdadm-raid0-without-overwriting-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Just like you had to partition and format your raid 0, you have to partition and format your raid 1. Whatever is currently on the raid 0 volumes will be destroyed as is the case when creating any RAID.
– Appleoddity
Jan 2 at 15:40