linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* recover linear mode raid howto
@ 2012-06-26  6:26 Костырев Александр Алексеевич
  2012-06-26 17:38 ` keld
  0 siblings, 1 reply; 2+ messages in thread
From: Костырев Александр Алексеевич @ 2012-06-26  6:26 UTC (permalink / raw)
  To: linux-raid

Hello!
I'm trying to figure out how one can recover from linear mode crash.
I'm aware that from this type of mode I can recover only part of data, there's no redundancy in linear mode and that's ok for me.
I'm ok with part of it.

so far I'm trying to get it work in VM for now.


I've added two 50M disks to my VM.

and partiotioned them like this:
Device Boot      Start     End      Blocks  Id  System
/dev/vdb1        2048      102399   50176   fd  Linux raid autodetect
Device Boot      Start     End      Blocks  Id  System
/dev/vdc1        2048      102399   50176   fd  Linux raid autodetect

mdadm --create --verbose /dev/md0 --level linear --raid-disks 2 /dev/vdb1 /dev/vdc1
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

mkfs.xfs /dev/md0 
mount /dev/md0 /mnt/linear/

mkdir /mnt/linear/etc
mkdir /mnt/linear/etc2
mkdir /mnt/linear/etc3

filled with some data
cp -r /etc/* /mnt/linear/etc/
cp -r /etc/* /mnt/linear/etc2/
cp -r /etc/* /mnt/linear/etc3/

df -h /dev/md0
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0               92M   69M   23M  76% /mnt/linear

then I remove one disk from my VM

umount /mnt/linear
mdadm --stop /dev/md0

I've added another clear disk image 50M.

make partitions on new disk
sfdisk -d /dev/vdb | sfdisk /dev/vdc

how should I proceed ?

thanks a lot!

--
С уважением,
Костырев Александр
системный администратор
ЗАО "Сервер-Центр"
тел.: (423) 262-02-62 (доб. 2037)


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: recover linear mode raid howto
  2012-06-26  6:26 recover linear mode raid howto Костырев Александр Алексеевич
@ 2012-06-26 17:38 ` keld
  0 siblings, 0 replies; 2+ messages in thread
From: keld @ 2012-06-26 17:38 UTC (permalink / raw)
  To: ???????? ????????? ??????????; +Cc: linux-raid

On Tue, Jun 26, 2012 at 05:26:53PM +1100, ???????? ????????? ?????????? wrote:
> Hello!
> I'm trying to figure out how one can recover from linear mode crash.
> I'm aware that from this type of mode I can recover only part of data, there's no redundancy in linear mode and that's ok for me.
> I'm ok with part of it.
> 
> so far I'm trying to get it work in VM for now.
> 
> 
> I've added two 50M disks to my VM.
> 
> and partiotioned them like this:
> Device Boot      Start     End      Blocks  Id  System
> /dev/vdb1        2048      102399   50176   fd  Linux raid autodetect
> Device Boot      Start     End      Blocks  Id  System
> /dev/vdc1        2048      102399   50176   fd  Linux raid autodetect
> 
> mdadm --create --verbose /dev/md0 --level linear --raid-disks 2 /dev/vdb1 /dev/vdc1
> mdadm --detail --scan >> /etc/mdadm/mdadm.conf
> 
> mkfs.xfs /dev/md0 
> mount /dev/md0 /mnt/linear/
> 
> mkdir /mnt/linear/etc
> mkdir /mnt/linear/etc2
> mkdir /mnt/linear/etc3
> 
> filled with some data
> cp -r /etc/* /mnt/linear/etc/
> cp -r /etc/* /mnt/linear/etc2/
> cp -r /etc/* /mnt/linear/etc3/
> 
> df -h /dev/md0
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/md0               92M   69M   23M  76% /mnt/linear
> 
> then I remove one disk from my VM
> 
> umount /mnt/linear
> mdadm --stop /dev/md0
> 
> I've added another clear disk image 50M.
> 
> make partitions on new disk
> sfdisk -d /dev/vdb | sfdisk /dev/vdc
> 
> how should I proceed ?
> 
> thanks a lot!


Thaks for the effort. Maybe, when you have found a robust way to do it, then
you could add the description to our wiki, at https://raid.wiki.kernel.org/

(BTW, the wiki looks like it is open again for editing).

best regards
keld

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-26 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26  6:26 recover linear mode raid howto Костырев Александр Алексеевич
2012-06-26 17:38 ` keld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).