DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th October 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default move install to new server larger hard drive (raid system)

Hello, ok i have read all the guides for moving cloning an install but none seem be straight forward fro my needs.

I have live server that needs more space, a reinstall is not feasble so some way of cloning drive would be best. The issue is that the server is running raid 5 over 3 disks so the method of just plugging in new drive is a no go.

All partitions will remain the same size except for /home which get the additional space.

As far as i understand it none of the drive clone software, ghost, clonezilla support freebsd!

I was thinking of taking an identical server with bigger drives and doing basic install so partitons are created and bootloader installed and then use livecd to rsync old server data over to new server.

Would this work or is there better way?

Like i said plugging in new drives will not work as it is raid system, though could add a external usb drive to store images that could maybe be created with DD.

cheers
Reply With Quote
  #2   (View Single Post)  
Old 28th October 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Since your previous posts target FreeBSD, I'm moving this thread to the FreeBSD forums. If you truly intended to post in the OpenBSD forums, my apologies. I will move this thread back if necessary.
Reply With Quote
  #3   (View Single Post)  
Old 29th October 2009
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

I used BootIt (shareware ) to clone a dual boot to a larger
drive, keeping just the fstab identical. ( 4 image files total,
one was C: one was d: etc ; two other were each 2 FS ).
I did not know beforehand but it booted up just fine. (In
retrostpect, though, "how did I do that???. I think I posted
it on the extinct freebsd forum site once. )
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs...
Reply With Quote
  #4   (View Single Post)  
Old 29th October 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Are you saying that your RAID controller does not support migrating to larger drives in a RAID5/6 array?

If so, your rsync method will work. That's basically how we restore servers from backups here. Just be sure to use the -H (hard-links) and --numeric-ids options when doing the rsync. Otherwise, bad things will happen. FreeBSD uses hardlinks a lot. Without -H, the restore would be many, many, many times larger than the original.

Alternatively, if you have access to enough drive space either via external drives or network shares, you can also rsync the files off, replace the harddrives with larger ones, and rsync the files back. If things go bad, you can just pop in the old drives.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #5   (View Single Post)  
Old 29th October 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by phoenix View Post
Are you saying that your RAID controller does not support migrating to larger drives in a RAID5/6 array?

Never thought of that!

Will have to check and see, it is an addon raid card (PERC 3/Di) on Dell 1650.

Thanks for the info on rsync options, that looks more like the way i will go.
Reply With Quote
  #6   (View Single Post)  
Old 4th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Ok getting ready for this task this weekend.

Have got new drive and put them in identical server, created raid containers and used freebsd 7.2 livefs to created identicle slice and partition layout except sizes differ.

have also done a base install to get boot loader onto disks and install boots fine.

The plan is to rsync current install to an external usb drive here at home over the net, then go to data center disconnect from web and and do rsync again to external drive, doing it twice so as to save downtime as second one should not take that long.

Then put new drives in server boot from livefs cd and rsync from external drive to new raid drives.

Question, apart from getting rsync options correct is there anything else i need to do?

Also what file system should i have the external drive in, am going to do initail rsync with it connected to my linux workstation so was going to use ext3, should set linux to support ufs and create a ufs file system?

many thanks
Reply With Quote
  #7   (View Single Post)  
Old 5th November 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

UFS write support on Linux is spotty and problematic. Use ext2 (FreeBSD mounts ext3 volumes as ext2).

Be absolutely sure to use --numeric-ids and --hard-links when doing the rsync, otherwise bad things will happen. Can't say that enough times.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #8   (View Single Post)  
Old 10th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Thanks for info, i am trying to do a test run on local server, i have booted into frenzy livecd and mounted installed partitions on /mnt/server and usb drive on /mnt/backup

I recreated all the correct dir and partitions for server and so these are mount fine.

Code:
/dev/da0s1d on /mnt/backup (ufs, local)
/dev/aacd0s1a on /mnt/server (ufs, local)
/dev/aacd0s1d on /mnt/server/tmp (ufs, local, soft-updates)
/dev/aacd0s1e on /mnt/server/usr (ufs, local, soft-updates)
/dev/aacd0s1f on /mnt/server/usr/local/pgsql (ufs, local, soft-updates)
/dev/aacd0s1g on /mnt/server/var (ufs, local, soft-updates)
/dev/aacd0s1h on /mnt/server/var/db (ufs, local, soft-updates)
/dev/aacd0s2d on /mnt/server/var/qmail (ufs, local, soft-updates)
/dev/aacd0s2e on /mnt/server/hsphere (ufs, local, soft-updates)
I am trying to do a local rysnc with following option but it fails.

rsync -avRrnH --numeric-ids /mnt/server/* /mnt/backup/cp
Code:
/mnt/server/usr/compat/linux/usr/lib/locale/ar_AE.utf8/LC_NUMERIC => mnt/server/usr/compat/linux/usr/lib/locale/ar_YE.utf8/LC_NUMERIC
/mnt/server/usr/compat/linux/usr/lib/locale/ar_YE.utf8/LC_TELEPHONE
rsync: stat "/mnt/backup/cp/mnt/server/usr/compat/linux/usr/lib/locale/ar_SD.utf8/LC_TIME" failed: No such file or directory (2)
/mnt/server/usr/compat/linux/usr/lib/locale/ar_YE.utf8/LC_MESSAGES/
rsync: stat "/mnt/backup/cp/mnt/server/usr/compat/linux/usr/lib/locale/ar_SD.utf8/LC_MESSAGES/SYS_LC_MESSAGES" failed: No such file or directory (2)
/mnt/server/usr/compat/linux/usr/lib/locale/ar_YE/
/mnt/server/usr/compat/linux/usr/lib/locale/ar_YE/LC_ADDRESS
rsync: stat "/mnt/backup/cp/mnt/server/usr/compat/linux/usr/lib/locale/ar_SD/LC_COLLATE" failed: No such file or directory (2)
rsync: connection unexpectedly closed (26849 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) [sender=3.0.2]

I included the -R options as read this should create the dir?

any ideas where going wrong?

cheers
Reply With Quote
  #9   (View Single Post)  
Old 10th November 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Try it without Rrn or *.

rsync --verbose --archive --hard-links --numeric-ids /mnt/backup/ /mnt/server/
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 11th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Thanks for reply, seem it is the -n option that give error.

I have successfully done a test transfer with minimum install, rsync to USB drive, new drives installed and rsync from usb drive to new drives.

It boot and all seems ok but did see following in /var.log/messages but this is not something to worry about?

Code:
ct 17 02:28:40 cp kernel: aacd0: <RAID 5> on aac0
Oct 17 02:28:40 cp kernel: aacd0: 139997MB (286714368 sectors)
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1a is ufsid/3f8f4255de668c63.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1d is ufsid/3f8f4282d2c2a193.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1e is ufsid/3f8f42a31acc0796.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1f is ufsid/3f8f43b11502262d.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1g is ufsid/3f8f43b8f2999428.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1h is ufsid/3f8f43daf65d0d22.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s2d is ufsid/3f8f44277daf7cd3.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s2e is ufsid/3f8f445164b9fcf4.
Oct 17 02:28:40 cp kernel: SMP: AP CPU #1 Launched!
Oct 17 02:28:40 cp kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Oct 17 02:28:40 cp kernel: da0: <WDC WD32 00AAKS-00L9A0 > Fixed Direct Access SCSI-2 device
Oct 17 02:28:40 cp kernel: da0: 1.000MB/s transfers
Oct 17 02:28:40 cp kernel: da0: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C)
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider da0s1 is ufsid/3f87993b1e238a1c.
Oct 17 02:28:40 cp kernel: Trying to mount root from ufs:/dev/aacd0s1a
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f4255de668c63 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1a is ufsid/3f8f4255de668c63.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f445164b9fcf4 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s2e is ufsid/3f8f445164b9fcf4.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f4282d2c2a193 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1d is ufsid/3f8f4282d2c2a193.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f42a31acc0796 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1e is ufsid/3f8f42a31acc0796.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43b11502262d removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1f is ufsid/3f8f43b11502262d.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43b8f2999428 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1g is ufsid/3f8f43b8f2999428.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43daf65d0d22 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s1h is ufsid/3f8f43daf65d0d22.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f44277daf7cd3 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label for provider aacd0s2d is ufsid/3f8f44277daf7cd3.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f4255de668c63 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f445164b9fcf4 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f4282d2c2a193 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f42a31acc0796 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43b11502262d removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43b8f2999428 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f43daf65d0d22 removed.
Oct 17 02:28:40 cp kernel: GEOM_LABEL: Label ufsid/3f8f44277daf7cd3 removed.

Just need to try this on rsync from live server.
Reply With Quote
Old 11th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Ok done a test on live server to local drive and it completed but some files were not transferred.

Code:
sent 9331696 bytes  received 4097218247 bytes  324128.81 bytes/sec
total size is 12157123006  speedup is 2.96
rsync error: some files could not be transferred (code 23) at main.c(1497) [generator=3.0.2]

any ideas?

cheers
Reply With Quote
Old 14th November 2009
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Add -v to get more verbose output, including which files couldn't be transferred.

As for the GEOM_LABEL messages, you can ignore them. They're debugging leftovers that were supposed to be disabled before the 7.2 release. They'll disappear after an upgrade to 7.3 (once it's released).
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 14th November 2009
windependence's Avatar
windependence windependence is offline
Real Name: Tim
Shell Scout
 
Join Date: May 2008
Location: Phoenix, Arizona
Posts: 116
Thanked 4 Times in 3 Posts
Default

I don't understand why you can't replace drives one at a time and let each rebuild before doing the next one. Then, go in and expand the array. I've done this on Perc3 controllers sucessfully. It takes a while, but it works. Of course, you want to take a good backup before you start. :-)

-Tim
__________________
www.windependence.org
Get your Windependence today!
Reply With Quote
Old 18th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Thanks I will try the -v option.

I will look into the expand array option but the problem is time, this is a live web server so downtime must be minimal.
Reply With Quote
Old 18th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Opps just notice i was using --verbose which is same as -v but did not give failed files?

Tried it with -v and also did not give failed, think this just as server is live, once mounted in livecd and rsync to usb drive should not be an issue.. i hope !

that said i wonder is this is files not transfered

rsync: failed to set times on "/mnt/server/var/empty": Operation not permitted (1)
var/empty/

Last edited by carpman; 18th November 2009 at 08:46 PM.
Reply With Quote
Old 18th November 2009
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

This is how I remember using BootIt ($35 I think)
c: (clone to img set)
/, /tmp (clone to img set) partition /w 2 newfs
/var, /usr (clone to img set) partition /w 2 newfs
d: e: etc (fat-extended) EACH clone to img set)
new drive:
in BootIt, create partitions (c, bsd, bsd, extended, d: e: )
(if BSD does not show in the dropdown, use "165/A5h: BSD")
in BootIt , restore from image c> c empty d> d empty etc.
I remember the BSD images > to bsd space-empty's creating
larger filesystems, but not how the split was managed. So
if I had to, I could probably do it again, but would spend
several hours figuring out how to restore (what worked then,
seemingly is missing a crucial detail...) ...
(*maybe* just the c: increased space automatically, but
I do not remember "dump restore" but do remember
"image restore" and larger space resulting)...
.........
If the post(s) above solved the problem already, apologies.
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs...
Reply With Quote
Old 24th November 2009
carpman carpman is offline
Shell Scout
 
Join Date: Jul 2008
Posts: 94
Thanked 0 Times in 0 Posts
Default

Just an update, i did this using rsync external usb drive and it seem to have work ok, no issues so far and server is running well.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I move this system? Randux FreeBSD Installation and Upgrading 7 3rd February 2009 09:01 AM
Did I fry my hard drive? JMJ_coder General Hardware 7 23rd December 2008 10:38 PM
CF as a *BSD hard drive? JMJ_coder General Hardware 26 31st July 2008 05:13 PM


All times are GMT. The time now is 03:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick