recover linear mode raid howto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux