Hi,
My setup:
Linux green 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04.2 LTS
mdadm -V
mdadm - v3.3 - 3rd September 2013
I have only one disk from a RAID1 array and I would like to read data from
one of the partitions. This there a way to mount this and read the data?
Thanks,
Pete
Am 16.03.2017 um 23:18 schrieb Peter Sangas:
My setup:
Linux green 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04.2 LTS
mdadm -V
mdadm - v3.3 - 3rd September 2013
I have only one disk from a RAID1 array and I would like to read data from
one of the partitions. This there a way to mount this and read the data?
you only need one disk to start a RAID1
RAID1 are ust mirrors
just assemble the RAID1 or most likely you can mount the partitions as
they are
From: Peter Sangas [mailto:pete@wnsdev.com]
I have only one disk from a RAID1 array and I would like to read data from
one of the
partitions. This there a way to mount this and read the data?
This worked for me:
mdadm --create /dev/md10 -l 1 -n 2 /dev/sda missing md10 is chosen to
avoid conflicts with existing RAID1
mount /dev/md10 /mnt
On 17/03/17 23:17, Peter Sangas wrote:
quoted
From: Peter Sangas [mailto:pete@wnsdev.com]
I have only one disk from a RAID1 array and I would like to read data from
one of the
quoted
partitions. This there a way to mount this and read the data?
This worked for me:
mdadm --create /dev/md10 -l 1 -n 2 /dev/sda missing md10 is chosen to
avoid conflicts with existing RAID1
mount /dev/md10 /mnt
NEVER NEVER NEVER use --create !!!
YOU WERE LUCKY !!!
Use something like --assemble --force, which will set up a working array
if it can. If that had been an old array, with a different offset or
superblock or the like, you would have trashed the superblock and
created a new array, which thought that the data in the array was
somewhere other than where it really was.
At which point, it would have been "go to your backups" or a major
forensic recovery.
Cheers,
Wol
From: Wols Lists [mailto:antlists@youngman.org.uk]
NEVER NEVER NEVER use --create !!!
Use something like --assemble --force, which will set up a working array
if it can.
OK, I tried this command but received an error:
mdadm --assemble --force /dev/md10 /dev/sdc
"Cannot assemble mbr metadata in /dev/sdc, no superblock"
What command do you suggest...?
If that had been an old array, with a different offset or superblock or
the like...
by "old" do you mean an array created using a different superblock format
other than 1.2?
Thanks,
Pete
On 20/03/17 17:37, Peter Sangas wrote:
quoted
From: Wols Lists [mailto:antlists@youngman.org.uk]
NEVER NEVER NEVER use --create !!!
Use something like --assemble --force, which will set up a working array
if it can.
OK, I tried this command but received an error:
mdadm --assemble --force /dev/md10 /dev/sdc
"Cannot assemble mbr metadata in /dev/sdc, no superblock"
What command do you suggest...?
That makes it sound like something had trashed the superblock, or maybe
it was sdc1, or something. Anyways, it worked for you, so hopefully the
question is academic.
quoted
If that had been an old array, with a different offset or superblock or
the like...
by "old" do you mean an array created using a different superblock format
other than 1.2?
Yes. The superblock format is v1. Whether it's v1.0, v1.1 or v1.2
depends on where the superblock is found. So if, for example, the array
had been created with a v1.0 superblock, the data would probably have
started at offset 2048, with the superblock at the end of the disk. v1.2
puts the superblock near the start, maybe offset 4096? So you would have
smashed some of your data, and also told the array to look in the wrong
place for the start of the data.
That's why --create is so dangerous - pick the wrong version and you can
damage the data, but even if you pick the right version, all the default
offsets and things have changed over the years (that's assuming they
haven't also been modified by general array management), so you can
easily lose where the data area starts.
Cheers,
Wol