* Read data from disk that was part of RAID1 array @ 2017-03-16 22:18 Peter Sangas 2017-03-16 22:31 ` Reindl Harald 2017-03-17 23:17 ` Peter Sangas 0 siblings, 2 replies; 6+ messages in thread From: Peter Sangas @ 2017-03-16 22:18 UTC (permalink / raw) To: linux-raid 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Read data from disk that was part of RAID1 array 2017-03-16 22:18 Read data from disk that was part of RAID1 array Peter Sangas @ 2017-03-16 22:31 ` Reindl Harald 2017-03-17 23:17 ` Peter Sangas 1 sibling, 0 replies; 6+ messages in thread From: Reindl Harald @ 2017-03-16 22:31 UTC (permalink / raw) To: Peter Sangas, linux-raid 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Read data from disk that was part of RAID1 array 2017-03-16 22:18 Read data from disk that was part of RAID1 array Peter Sangas 2017-03-16 22:31 ` Reindl Harald @ 2017-03-17 23:17 ` Peter Sangas 2017-03-19 10:18 ` Wols Lists 1 sibling, 1 reply; 6+ messages in thread From: Peter Sangas @ 2017-03-17 23:17 UTC (permalink / raw) To: linux-raid, pete > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Read data from disk that was part of RAID1 array 2017-03-17 23:17 ` Peter Sangas @ 2017-03-19 10:18 ` Wols Lists 2017-03-20 17:37 ` Peter Sangas 0 siblings, 1 reply; 6+ messages in thread From: Wols Lists @ 2017-03-19 10:18 UTC (permalink / raw) To: Peter Sangas, linux-raid On 17/03/17 23:17, Peter Sangas wrote: > > >> 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 > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Read data from disk that was part of RAID1 array 2017-03-19 10:18 ` Wols Lists @ 2017-03-20 17:37 ` Peter Sangas 2017-03-20 19:33 ` Wols Lists 0 siblings, 1 reply; 6+ messages in thread From: Peter Sangas @ 2017-03-20 17:37 UTC (permalink / raw) To: 'Wols Lists', linux-raid > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Read data from disk that was part of RAID1 array 2017-03-20 17:37 ` Peter Sangas @ 2017-03-20 19:33 ` Wols Lists 0 siblings, 0 replies; 6+ messages in thread From: Wols Lists @ 2017-03-20 19:33 UTC (permalink / raw) To: Peter Sangas, linux-raid On 20/03/17 17:37, Peter Sangas wrote: >> 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. > > >> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-20 19:33 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-16 22:18 Read data from disk that was part of RAID1 array Peter Sangas 2017-03-16 22:31 ` Reindl Harald 2017-03-17 23:17 ` Peter Sangas 2017-03-19 10:18 ` Wols Lists 2017-03-20 17:37 ` Peter Sangas 2017-03-20 19:33 ` Wols Lists
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox