From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: MC <darkhat@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: NAS RAID configuration overwritten by ransomware
Date: Mon, 1 Jul 2024 10:58:11 +0200 [thread overview]
Message-ID: <20240701105811.000073e0@linux.intel.com> (raw)
In-Reply-To: <CAF1V9aCeNLS5yiMwhkwtZPbgbpybS0eBxNKtB3p82Lo=WnLkOA@mail.gmail.com>
On Sun, 30 Jun 2024 11:16:34 -0700
MC <darkhat@gmail.com> wrote:
> Hi everyone,
>
> Is there a way to force mdadm to assemble a certain set of drives into
> a particular RAID format? A friend of mine had a NAS that was hit with
> ransomware. His setup was a RAID-5, 64kb chunk size, 4x4TB, XFS
> filesystem setup, while during the attack, they overwrote the config
> to be RAID-0/512kb chunk size (it is a Buffalo NAS, running Linux with
> libmd). He pulled the plug while it was in the process of formatting
> the XFS filesytem. Much of the data I have been able to recover, but
> now it would be a lot nicer for me if I could access a raw /dev device
> assembled as RAID-5/64kb chunk (rather than the current RAID-0
> mdadm/mdstat currently shows), instead of using a tool like UFS
> Explorer to assemble it properly for me. Obviously, minimal
> (preferably none) writes to the disk if possible. I was afraid to
> start throwing mdadm assemble and create commands around. Could
> someone please advise on best path forward?
>
> Thanks in advance,
> Mike
>
Hello Mike,
there is a --build option for mdadm (run array with no metadata). Perhaps this
is option you are looking for:
#mdadm -Ss (stop all existing)
# mdadm --build /dev/md126 <here your raid5 params comes> --assume-clean
use --assume-clean to avoid reconstruction. so far I know, --readonly is not
supported. You can set /sys/block/md126/ro = 1 manually to prevent writes.
Thanks,
Mariusz
prev parent reply other threads:[~2024-07-01 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 18:16 NAS RAID configuration overwritten by ransomware MC
2024-07-01 8:58 ` Mariusz Tkaczyk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701105811.000073e0@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=darkhat@gmail.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.