Recovering data from an incorrectly re-created mdadm RAID1 array
I had a functioning mdadm RAID1 array in an old server, but in my efforts to relocate it in a new server erroneously used --create instead of --assemble. I realised within minutes that it wouldn't mount and stopped the resync and have subsequently removed one of the drives while I try to recover data.
The array will start (I'm keeping it degraded and read-only for now) but /dev/md0 isn't recognised by dumpe2fs.
Looking at other questions here I see indication that if the new array was created with the same metadata version then it should be possible to recover, but as far as I can tell both old and new servers used 1.2, so that's proved a dead end.
However, if I use testdisk on /dev/sdb1 (the RAID partition), a deep search can find my ext4 partition data and allows me to list the files I would expect to see. For example:
Disk /dev/sdb1 - 3000 GB / 2794 GiB - CHS 364801 255 63
Partition Start End Size in sectors
P Linux md 1.x RAID 0 0 1 364784 189 21 5860266888 [fileserver:0]
P ext4 16 80 63 364801 47 52 5860268936
>P ext4 16 81 2 364801 47 54 5860268936
Structure: Ok.
Keys T: change type, P: list files,
Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB, 3000 GB / 2794 GiB
... where the selected result shows me files if I hit "P".
I think what I'd like to do next is try to mount that filesystem (readonly) and see what is there, and maybe image it then e2fcsk it. However I can't convert testdisk's CHS values into something useful for dumpe2fs -o.
Am I taking the right approach? I need to get dumpe2fs to look at the filesystem that testdisk is showing me.
Note that I initially started this as another question; if asking a new question when the subject substantially moves on is bad form please advise.
https://unix.stackexchange.com/questions/468536/mdadm-autocreated-md126-md127-arrays-fine-but-corrupt-when-rebuilt-as-md0-md1
ext4 mdadm testdisk
add a comment |
I had a functioning mdadm RAID1 array in an old server, but in my efforts to relocate it in a new server erroneously used --create instead of --assemble. I realised within minutes that it wouldn't mount and stopped the resync and have subsequently removed one of the drives while I try to recover data.
The array will start (I'm keeping it degraded and read-only for now) but /dev/md0 isn't recognised by dumpe2fs.
Looking at other questions here I see indication that if the new array was created with the same metadata version then it should be possible to recover, but as far as I can tell both old and new servers used 1.2, so that's proved a dead end.
However, if I use testdisk on /dev/sdb1 (the RAID partition), a deep search can find my ext4 partition data and allows me to list the files I would expect to see. For example:
Disk /dev/sdb1 - 3000 GB / 2794 GiB - CHS 364801 255 63
Partition Start End Size in sectors
P Linux md 1.x RAID 0 0 1 364784 189 21 5860266888 [fileserver:0]
P ext4 16 80 63 364801 47 52 5860268936
>P ext4 16 81 2 364801 47 54 5860268936
Structure: Ok.
Keys T: change type, P: list files,
Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB, 3000 GB / 2794 GiB
... where the selected result shows me files if I hit "P".
I think what I'd like to do next is try to mount that filesystem (readonly) and see what is there, and maybe image it then e2fcsk it. However I can't convert testdisk's CHS values into something useful for dumpe2fs -o.
Am I taking the right approach? I need to get dumpe2fs to look at the filesystem that testdisk is showing me.
Note that I initially started this as another question; if asking a new question when the subject substantially moves on is bad form please advise.
https://unix.stackexchange.com/questions/468536/mdadm-autocreated-md126-md127-arrays-fine-but-corrupt-when-rebuilt-as-md0-md1
ext4 mdadm testdisk
add a comment |
I had a functioning mdadm RAID1 array in an old server, but in my efforts to relocate it in a new server erroneously used --create instead of --assemble. I realised within minutes that it wouldn't mount and stopped the resync and have subsequently removed one of the drives while I try to recover data.
The array will start (I'm keeping it degraded and read-only for now) but /dev/md0 isn't recognised by dumpe2fs.
Looking at other questions here I see indication that if the new array was created with the same metadata version then it should be possible to recover, but as far as I can tell both old and new servers used 1.2, so that's proved a dead end.
However, if I use testdisk on /dev/sdb1 (the RAID partition), a deep search can find my ext4 partition data and allows me to list the files I would expect to see. For example:
Disk /dev/sdb1 - 3000 GB / 2794 GiB - CHS 364801 255 63
Partition Start End Size in sectors
P Linux md 1.x RAID 0 0 1 364784 189 21 5860266888 [fileserver:0]
P ext4 16 80 63 364801 47 52 5860268936
>P ext4 16 81 2 364801 47 54 5860268936
Structure: Ok.
Keys T: change type, P: list files,
Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB, 3000 GB / 2794 GiB
... where the selected result shows me files if I hit "P".
I think what I'd like to do next is try to mount that filesystem (readonly) and see what is there, and maybe image it then e2fcsk it. However I can't convert testdisk's CHS values into something useful for dumpe2fs -o.
Am I taking the right approach? I need to get dumpe2fs to look at the filesystem that testdisk is showing me.
Note that I initially started this as another question; if asking a new question when the subject substantially moves on is bad form please advise.
https://unix.stackexchange.com/questions/468536/mdadm-autocreated-md126-md127-arrays-fine-but-corrupt-when-rebuilt-as-md0-md1
ext4 mdadm testdisk
I had a functioning mdadm RAID1 array in an old server, but in my efforts to relocate it in a new server erroneously used --create instead of --assemble. I realised within minutes that it wouldn't mount and stopped the resync and have subsequently removed one of the drives while I try to recover data.
The array will start (I'm keeping it degraded and read-only for now) but /dev/md0 isn't recognised by dumpe2fs.
Looking at other questions here I see indication that if the new array was created with the same metadata version then it should be possible to recover, but as far as I can tell both old and new servers used 1.2, so that's proved a dead end.
However, if I use testdisk on /dev/sdb1 (the RAID partition), a deep search can find my ext4 partition data and allows me to list the files I would expect to see. For example:
Disk /dev/sdb1 - 3000 GB / 2794 GiB - CHS 364801 255 63
Partition Start End Size in sectors
P Linux md 1.x RAID 0 0 1 364784 189 21 5860266888 [fileserver:0]
P ext4 16 80 63 364801 47 52 5860268936
>P ext4 16 81 2 364801 47 54 5860268936
Structure: Ok.
Keys T: change type, P: list files,
Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB, 3000 GB / 2794 GiB
... where the selected result shows me files if I hit "P".
I think what I'd like to do next is try to mount that filesystem (readonly) and see what is there, and maybe image it then e2fcsk it. However I can't convert testdisk's CHS values into something useful for dumpe2fs -o.
Am I taking the right approach? I need to get dumpe2fs to look at the filesystem that testdisk is showing me.
Note that I initially started this as another question; if asking a new question when the subject substantially moves on is bad form please advise.
https://unix.stackexchange.com/questions/468536/mdadm-autocreated-md126-md127-arrays-fine-but-corrupt-when-rebuilt-as-md0-md1
ext4 mdadm testdisk
ext4 mdadm testdisk
edited 2 hours ago
Rui F Ribeiro
39.5k1479132
39.5k1479132
asked Sep 13 '18 at 11:36
Mark RogersMark Rogers
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f468773%2frecovering-data-from-an-incorrectly-re-created-mdadm-raid1-array%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f468773%2frecovering-data-from-an-incorrectly-re-created-mdadm-raid1-array%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