Re: mdadm raid1 lost (my fault)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 02, 2018 at 08:51:02PM -0500, page p wrote:

tldr; what might save you is if you have a backup of your luks
header. See further down here and the cryptsetup FAQ. Plus: I'd ask on
the luks list for help.

Hi,

I have two drives in a raid 1 configuration and used luks crypt on the raid once created.

Meaning: you first created the raid, and then encrypted the
drive. Right?

today i wanted to change the device number from 127 to 0 and can no longer open the array as luks says it is not a valid device.

what i did was:

$ mdadm --stop /dev/md127
$ mdadm --create --verbose /dev/md0 --level=1 --assume-clean --raid-devices=2 /dev/sdb1 /dev/sdc1

And that probably was what shot luks:  "mdadm --create"

"create" means, according to man mdadm, you're writing "metadata
(superblocks)" to the disk - it looks like a not so small write to a disk
that already has data on it, among them the LUKS header (tho I cannot
confirm the latter is at the same disk space as the the metadata are
.. )

from the cryptsetup FAQ (probably on your system,too):

* 5.7 Why is all my data permanently gone if I overwrite the LUKS header?

 Overwriting the LUKS header in part or in full is the most common
reason why access to LUKS containers is lost permanently. Overwriting can be done in a number of fashions, like creating a new
 filesystem on the raw LUKS partition, making the raw partition part
 of a raid array and just writing to the raw partition.

[ Looks you wrote to the raw partition. Later, same paragraph: ]

 If your LUKS container is still open, then it may be possible to
 extract the master key from the running system.  See Item "How do I
 recover the master key from a mapped LUKS container?" in Section
 "Backup and Data Recovery".


But let me guess: your luks container is closed now, and if yes, that
option might be gone:
But if you have a backup of your luks header that might help: Did you
do something like this at some point:

cryptsetup luksHeaderBackup --header-backup-file <file> <device>

(See the mentioned luks FAQ under "6. Backup and Data Recovery")

I cannot give you any hope that your data is recoverable, but you
definitely should go the luks list and ask there about what happened,
because if there's any chance for recovery of your data, it's most
probably there:

Archives:
https://www.saout.de/pipermail/dm-crypt/

"If you want to subscribe just send an empty mail to
dm-crypt-subscribe@xxxxxxxx."
from:
https://gitlab.com/cryptsetup/cryptsetup/wikis/home

The archive, mentioned in the FAQ, seems being offline ...

HTH
Wolfgang
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/message/53USEAJAFSFUZGBFPIK5GH5SAL4C6K5W/



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux