Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Move Gentoo to RAID 0 [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Mon Mar 24, 2008 4:27 pm    Post subject: Move Gentoo to RAID 0 [Solved] Reply with quote

I will be wiping my hard drive and configuring it for RAID0, and was wondering what the best method to do this would be. I have an external hard drive to back the system up to/restore from. Is there a simple tar command that I can use to do this?


-Eric
_________________
AMD 1090T | 2 GB | AMD 890GX | Gentoo x86_64
Core i7-920 | 6 GB | AMD 5850 | Windows 7 Pro


Last edited by ericxx2005 on Tue Aug 19, 2008 7:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Mon Mar 24, 2008 4:55 pm    Post subject: Reply with quote

it is dd that you can use to backup and restore a partition, like
Code:
# dd if=/dev/<your partition> of=<destination on different partition>

and then restore it the other way round with
Code:
# dd if=<path to the backup file> of=/dev/<your new raid 0 destination>

in case you are using xfs you can use xfs_growfs to correct the size of the partition, i am unsure about other filesystems.
there are also howtos out there (e.g. on gentoo-wiki) to do that over the network.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Mar 24, 2008 5:02 pm    Post subject: Reply with quote

You could either tar up the whole system, or cp -a it to the external drive...

Make sure that if you use tar, when you restore it you need to use the -p option or permissions and things like that will be wrecked.

Also, another tip is that instead of just tarring up or copying your / directory, you should do something like "mount -o bind / /mnt/tmp" and then back up /mnt/tmp - this way you get only the root partition and not the other partitions mounted on it (ie, udev, /proc, /sys, etc).

So, a sample command to do the actual backup might be like:
cd /mnt/tmp; tar -cvzf /mnt/external/root.tar.gz .

and then, to restore it (from a livecd or similar),
cd /mnt/tmp; tar -xvzpf /mnt/external/root.tar.gz

You would need to use similar commands to back up other partitions, or manually bind mount (or mount them normally for restoring) them into the proper place in /mnt/tmp before proceeding with the above commands.

Make sure you've got /boot outside of the raid or you'll likely have issues booting from it (I don't think grub handles raid-0).

If you go with a cp -a approach instead of tar, you might be able to have a bootable external drive out of the deal, if you set up grub on it too.

Hope this helps, good luck :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum