FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-30-2011, 11:20 PM
Franz Waldmüller
 
Default help with recover data from software raid 1

Hi,

I want to recover files from a disk which has been part of a raid1
array. I don't want to mount it degraded, as all operations must be read
only.


Can I mount the partiton of the disk as an ext4 filesystem (the raid was
formatted as ext4.)?


Background:
In my server to harddisks are used in mirrored array to save all
important data.

/dev/sdb1 and /dev/sdc1

today I created another md-device with the created partitions /dev/sdb2
and /dev/sdc2. Unfortunately I didn't edit the /etc/mdadm/mdadm.conf
file properly.

When I rebooted the server I checked /proc/mdstat
and saw the following resync process:

md1 : active raid1 sdc[1] sdb2[0]
391382976 blocks [2/2] [UU]
[>....................] resync = 0.1% (745088/391382976)

That is wrong, as the first device is sdc, but it should be sdc2.
I halted the server and now have to recover the files from /dev/sdb1.
/dev/sdc1 could have suffered damage from the resync process.


I hope that you can help me with your advice.

Franz

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-02-2011, 01:59 AM
Luis Paulo
 
Default help with recover data from software raid 1

2011/7/31 Franz Waldmüller <waldbauernbub@gmx.at>:
> Hi,
>
> I want to recover files from a disk which has been part of a raid1 array. I
> don't want to mount it degraded, as all operations must be read only.
>
> Can I mount the partiton of the disk as an ext4 filesystem (the raid was
> formatted as ext4.)?
>
> Background:
> In my server to harddisks are used in mirrored array to save all important
> data.
> /dev/sdb1 and /dev/sdc1
>
> today I created another md-device with the created partitions /dev/sdb2 and
> /dev/sdc2. Unfortunately I didn't edit the /etc/mdadm/mdadm.conf file
> properly.
> When I rebooted the server I checked /proc/mdstat
> and saw the following resync process:
>
> md1 : active raid1 sdc[1] sdb2[0]
> * * *391382976 blocks [2/2] [UU]
> * * *[>....................] *resync = *0.1% (745088/391382976)
>
> That is wrong, as the first device is sdc, but it should be sdc2.
> I halted the server and now have to recover the files from /dev/sdb1.
> /dev/sdc1 could have suffered damage from the resync process.
>
> I hope that you can help me with your advice.
>
> Franz


I don't understand why you don't want to assemble the array as degraded.

The way I'll recover the array will be clearing the super-block of
/dev/sdc1, assemble the array as degraded with dev/sdb1 and then add
/dev/sdc1 (using mdadm commands). At least this is the general idea, I
may (and you must before trying it) look more carefully into it.
After a resync, the array would be functional again.

Regards
Luis

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-02-2011, 02:19 AM
Jeffrey Gray
 
Default help with recover data from software raid 1

And as always, best practice would tell you that you should clone
before anything. Grab another drive of equal or larger LBA and bit
for bit clone the drive.

On Mon, Aug 1, 2011 at 8:59 PM, Luis Paulo <luis.barbas@gmail.com> wrote:
> 2011/7/31 Franz Waldmüller <waldbauernbub@gmx.at>:
>> Hi,
>>
>> I want to recover files from a disk which has been part of a raid1 array. I
>> don't want to mount it degraded, as all operations must be read only.
>>
>> Can I mount the partiton of the disk as an ext4 filesystem (the raid was
>> formatted as ext4.)?
>>
>> Background:
>> In my server to harddisks are used in mirrored array to save all important
>> data.
>> /dev/sdb1 and /dev/sdc1
>>
>> today I created another md-device with the created partitions /dev/sdb2 and
>> /dev/sdc2. Unfortunately I didn't edit the /etc/mdadm/mdadm.conf file
>> properly.
>> When I rebooted the server I checked /proc/mdstat
>> and saw the following resync process:
>>
>> md1 : active raid1 sdc[1] sdb2[0]
>> * * *391382976 blocks [2/2] [UU]
>> * * *[>....................] *resync = *0.1% (745088/391382976)
>>
>> That is wrong, as the first device is sdc, but it should be sdc2.
>> I halted the server and now have to recover the files from /dev/sdb1.
>> /dev/sdc1 could have suffered damage from the resync process.
>>
>> I hope that you can help me with your advice.
>>
>> Franz
>
>
> I don't understand why you don't want to assemble the array as degraded.
>
> The way I'll recover the array will be clearing the super-block of
> /dev/sdc1, assemble the array as degraded with dev/sdb1 and then add
> /dev/sdc1 (using mdadm commands). At least this is the general idea, I
> may (and you must before trying it) look more carefully into it.
> After a resync, the array would be functional again.
>
> Regards
> Luis
>
> --
> ubuntu-users mailing list
> ubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-02-2011, 07:45 AM
Avi Greenbury
 
Default help with recover data from software raid 1

Franz Waldmüller wrote:
> Hi,
>
> I want to recover files from a disk which has been part of a raid1
> array. I don't want to mount it degraded, as all operations must be
> read only.

Why not just mount it degraded and read-only?

The 'obvious' method, to me, would be to flatten the metadata on sdb2
and just re-add it into the same array, getting back to where you were
before this happened.

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-07-2011, 07:54 PM
Franz Waldmüller
 
Default help with recover data from software raid 1

Hi Luis,

Am 2011-08-02 03:59, schrieb Luis Paulo:

2011/7/31 Franz Waldmüller<waldbauernbub@gmx.at>:

Hi,

I want to recover files from a disk which has been part of a raid1 array. I
don't want to mount it degraded, as all operations must be read only.

Can I mount the partiton of the disk as an ext4 filesystem (the raid was
formatted as ext4.)?

Background:
In my server to harddisks are used in mirrored array to save all important
data.
/dev/sdb1 and /dev/sdc1

today I created another md-device with the created partitions /dev/sdb2 and
/dev/sdc2. Unfortunately I didn't edit the /etc/mdadm/mdadm.conf file
properly.
When I rebooted the server I checked /proc/mdstat
and saw the following resync process:

md1 : active raid1 sdc[1] sdb2[0]
391382976 blocks [2/2] [UU]
[>....................] resync = 0.1% (745088/391382976)

That is wrong, as the first device is sdc, but it should be sdc2.
I halted the server and now have to recover the files from /dev/sdb1.
/dev/sdc1 could have suffered damage from the resync process.

I hope that you can help me with your advice.

Franz



I don't understand why you don't want to assemble the array as degraded.

The way I'll recover the array will be clearing the super-block of
/dev/sdc1, assemble the array as degraded with dev/sdb1 and then add
/dev/sdc1 (using mdadm commands). At least this is the general idea, I
may (and you must before trying it) look more carefully into it.
After a resync, the array would be functional again.

Regards
Luis



Thank you for your advice.
I am not sure about two things:
Does this output from mdadm mean, that data is read from sdc and written
to sdb2?

md1 : active raid1 sdc[1] sdb2[0]
391382976 blocks [2/2] [UU]
[>....................] resync = 0.1% (745088/391382976)
In this case everything would be fine, as sdb2 was empty. If it is the
other way round things are more severe as it would mean writing zeros
from sdb2 to sdc.


The other option with mounting as degraded is good, too but I as soon as
I noticed this strange resync process I shut the server down
immediately. It was the only thing I could think at this moment.


The harddisk are connect by usb and up to now I don't know how to find
out which disk is sdb and which sdc? I attached the disk now to another
workstation (backup all data). But is there a possibility look the
serial number of the drives up in the server logs?


Thanks for your help
Franz



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-07-2011, 07:56 PM
Franz Waldmüller
 
Default help with recover data from software raid 1

Hi Avi,

Am 2011-08-02 09:45, schrieb Avi Greenbury:

Franz Waldmüller wrote:

Hi,

I want to recover files from a disk which has been part of a raid1
array. I don't want to mount it degraded, as all operations must be
read only.


Why not just mount it degraded and read-only?

The 'obvious' method, to me, would be to flatten the metadata on sdb2
and just re-add it into the same array, getting back to where you were
before this happened.



I detached the two drives from the server. Now I looking for a way to
find out which drive was sdb and which was sdc?

Then I would just use sdb and everything would be fine.

Thank you for your help
Franz

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-07-2011, 07:58 PM
Franz Waldmüller
 
Default help with recover data from software raid 1

Hi Jeffrey,

Am 2011-08-02 04:19, schrieb Jeffrey Gray:

And as always, best practice would tell you that you should clone
before anything. Grab another drive of equal or larger LBA and bit
for bit clone the drive.

Thank you for your advice. I have been offline this week due to an
network error.
I purchased a spare drive and copied the content of the drives. Still I
am trying to find out which drive is sdb and which sdc.

Is there somekind of UUID for disks?
Franz


On Mon, Aug 1, 2011 at 8:59 PM, Luis Paulo<luis.barbas@gmail.com> wrote:

2011/7/31 Franz Waldmüller<waldbauernbub@gmx.at>:

Hi,

I want to recover files from a disk which has been part of a raid1 array. I
don't want to mount it degraded, as all operations must be read only.

Can I mount the partiton of the disk as an ext4 filesystem (the raid was
formatted as ext4.)?

Background:
In my server to harddisks are used in mirrored array to save all important
data.
/dev/sdb1 and /dev/sdc1

today I created another md-device with the created partitions /dev/sdb2 and
/dev/sdc2. Unfortunately I didn't edit the /etc/mdadm/mdadm.conf file
properly.
When I rebooted the server I checked /proc/mdstat
and saw the following resync process:

md1 : active raid1 sdc[1] sdb2[0]
391382976 blocks [2/2] [UU]
[>....................] resync = 0.1% (745088/391382976)

That is wrong, as the first device is sdc, but it should be sdc2.
I halted the server and now have to recover the files from /dev/sdb1.
/dev/sdc1 could have suffered damage from the resync process.

I hope that you can help me with your advice.

Franz



I don't understand why you don't want to assemble the array as degraded.

The way I'll recover the array will be clearing the super-block of
/dev/sdc1, assemble the array as degraded with dev/sdb1 and then add
/dev/sdc1 (using mdadm commands). At least this is the general idea, I
may (and you must before trying it) look more carefully into it.
After a resync, the array would be functional again.

Regards
Luis

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users






--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-07-2011, 08:05 PM
"compdoc"
 
Default help with recover data from software raid 1

>md1 : active raid1 sdc[1] sdb2[0]
> 391382976 blocks [2/2] [UU]
> [>....................] resync = 0.1% (745088/391382976)
>In this case everything would be fine, as sdb2 was empty. If it is the
>other way round things are more severe as it would mean writing zeros
>from sdb2 to sdc.

If it synced the wrong way would not both drives appear empty now? Did you
allow the sync to complete?




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-08-2011, 04:52 PM
Franz Waldmüller
 
Default help with recover data from software raid 1

Am 2011-08-07 22:05, schrieb compdoc:

md1 : active raid1 sdc[1] sdb2[0]
391382976 blocks [2/2] [UU]
[>....................] resync = 0.1% (745088/391382976)
In this case everything would be fine, as sdb2 was empty. If it is the
other way round things are more severe as it would mean writing zeros
from sdb2 to sdc.


If it synced the wrong way would not both drives appear empty now? Did you
allow the sync to complete?

No I stopped the sync process immediately once I discovered it. =
shortly after the about /proc/mdstat output has been created.


Franz

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-08-2011, 05:37 PM
"compdoc"
 
Default help with recover data from software raid 1

>> If it synced the wrong way would not both drives appear empty now? Did
you
>> allow the sync to complete?
>
>No I stopped the sync process immediately once I discovered it. =
>shortly after the about /proc/mdstat output has been created.


So you have one drive that has actual data, and one that probably has
directories and some files, but is missing most of the data. You just need
to look to see which drive is holding more.

Ubuntu these days always creates UUID's whenever you prepare a drive. I'm
not sure if it creates the UUID when you create the partitions or when you
format them, but it will retain the UUID until its redone/reformatted later.


I believe madam also changes the UUID when you start using it, but I don't
use madam so maybe someone else can help you there.

Once you figure out which drive is the valid one, you can recreate the raid
if that's what you want to do. No need to worry which drive has which UUID.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org