Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Moving from RAID 0 array to smaller single drive with instal
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
thender
Tux's lil' helper
Tux's lil' helper


Joined: 26 Aug 2013
Posts: 125

PostPosted: Tue Dec 16, 2014 6:59 am    Post subject: Moving from RAID 0 array to smaller single drive with instal Reply with quote

Is there a simple way to move my OS install, as is, to a newer smaller drive if it will fit? I would like to be able to copy everything over to a new drive, change my fstab & tell grub to boot from a root on a different device and be done, but this is proving difficult!

I installed gentoo on a raid 0 array of two 512 GB SSDs. I use about 140 GB of that space right now after cleaning/backing up.

I want to repurpose those two SSDs and put a single 500 GB hard drive in here. Problem is, I can't figure out how. I tried using a liveCD & gparted to shrink the partition on the raid array, but no dice. After three hours of “scanning for errors”, it gets nowhere.

I tried rsync -a to the new drive. The problem here is that it loops infinitely. If I mount the new drive on /newdrive and rsync -a /* /newdrive, it just infinitely copies my mata into /newdrive/newdrive/newdrive, etc, ad nauseum, and even if I stop it after it has copied everything **else**, it won't boot. I get all sorts of errors about ext4-fs not being able to read /dev/sda2 as an ext3 partition because of incompatible features, even though /etc/fstab says /dev/sda2 root is an ext4 partition.

I'm at my wits end. I really don't want to compile everything from scratch and go through the hassle of figuring out all the bugs and quirks to get my system the way I want, but it seems like that may actually take less time.

Thank you!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7101

PostPosted: Tue Dec 16, 2014 1:30 pm    Post subject: Reply with quote

Look for a stage4 (or 5), this is how i have switch my system to another array times ago.
Back to top
View user's profile Send private message
thender
Tux's lil' helper
Tux's lil' helper


Joined: 26 Aug 2013
Posts: 125

PostPosted: Tue Dec 16, 2014 2:20 pm    Post subject: Reply with quote

for some reason gentoo minimal install allows me to rsync just fine while systemrescuecd messes up like crazy trying to mount my raid array. lesson learned, keep a usb of gentoo plain install handy at all times!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7101

PostPosted: Tue Dec 16, 2014 2:30 pm    Post subject: Reply with quote

So it must be software raid and i think i saw people spoke about raid assembling change because of some revision or something (honestly i'm not quiet sure about the issue, except the general idea is that people have trouble re-assembling the array because of some autodetection failure).

Just to point you might have avoid the issue with the minimal install cd, but the issue remain, and you will get trouble again as the new raid handling introduce that trouble, you may fall again into it faster than you think.
You should look at the lesson that spoke about "understanding and fixing the issue" :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43586
Location: 56N 3W

PostPosted: Tue Dec 16, 2014 7:07 pm    Post subject: Reply with quote

thender,

There are several issues to address and copying the install over is the easy one.

First, some background. Not eveything you need is inside a filesystem, so you can't make a bootable copy just with filesystem tools.
Parts af grub install in the MBR and in the 'wasted' space before the first partition.

Boot with somthing like system rescue cd because copying a live filesystem can be a verybadthing, as you have found out.
Mount your existing install at /mnt/old but use the -o ro option everywhere to prevent accidents in later steps.
Do not mount /proc, /dev, /sys or /tmp here.

Partition your new drive and make your filesystems all as you would for a new install.
Mount all the parts at /mnt/gentoo as if you wer doing a new install.
Do not fetch a stage3, instead, copy over your old install, however you want.

Mount /proc, /dev ... as if you were continuing the install.
Do the chroot steps into /mnt/gentoo

You are now in the copy of your install but its missing a bootloader.
Install the bootloader of your choice.
Edit /etc/fstab.
Change /etc/conf.d/hostname (for testing only)
Set up the bootloader configuration.

Reboot to test. If you want to boot from the new drive, you will hawe to change the boot order in the BIOS.

If it all works, the login screen will show your new hostname.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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