Solved

Moving System data from single disk to RAID...how?

Posted on 2004-10-12
10
204 Views
Last Modified: 2010-04-20
I need to move all the data and setup form a single disk server to a new RAID server. How can I do this easily and quickly?

Thanks,
0
Comment
Question by:operatr
  • 4
  • 4
  • 2
10 Comments
 
LVL 6

Expert Comment

by:blkline
Comment Utility
When you say RAID, do you mean software RAID or a RAID controller?
0
 
LVL 6

Expert Comment

by:admin0
Comment Utility
If it is the same server, you can mount the raid partition and issue a cp -a to move all the data.
If it is a new server, you can use a cross-over-cable to join the 2 servers {faster data transfer, secure}, and run NFS or rsync  to copy all data from the one disk system to the raid system.

If the new raid server is up and running, and if the linux is the same version in both, you can simply do rsync  and copy everything .. even the binaries if you wish.

If the linux version is different, you can safely copy passwords, group and shadow files and the associated home directories and other entries.


Cheers,

0
 

Author Comment

by:operatr
Comment Utility
Ok I mean RAID controller setup.

And to admin0 ... so can you give me a few more details on this method if the Versions are not the same. I need mainly the /var  , /etc  ...and all the user info (home, passwords, etc.)
0
 
LVL 6

Expert Comment

by:blkline
Comment Utility
Since you mean a RAID controller then you'll have nothing special to do in terms of prep... that's why I asked.

The contents of /home, /etc/passwd, /etc/group and /etc/shadow should be transportable except 1 caveat:  Different distros use different user names for different purposes.    So if distro A (where you're coming from) has user "foo", but distro B (where you're going to) doesn't, then you'll have problems if you just replace one passwd/shadow file with another.  What I usually do is compare the passwd files between the source and target system, them add the missing entries on the target system.  You can simply cut-and-paste from one to another if you like.  Be careful that you ensure that users who appear on both systems have the same UID/GID or you'll be in for some fun!

Also, be careful moving bulk moving directories over.   Once again, you can run into problems replacing all of /var on the new system from the old system.

What I typically do is move over /home (relatively safe, assuming that I've not created any new users on the new system) and re-establish my users and groups.  Once they are successfully restored, I then move over /usr/local and /opt, which should be simple since they are supposed to be used only by the local admin for custom software.

Having taken care of the light work I then compare the '/var' directories, moving over what is missing.  Finally, I get my configurations moved over, carefully inspecting the differences between configurations on the old and new.

BTW, when you do this do yourself a favor and keep track of what you had to do.  I keep notebooks on all of my systems in which I make notations to what I did to them so that when I upgrade I can quickly do what I need to do.
0
 

Author Comment

by:operatr
Comment Utility
Thanks blkline... I will try your way this weekend. I keeo a notebook of everyting I do also, I find it does come in handy...especially after learning something the hard way.

Until monday, thanks all!
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 6

Expert Comment

by:admin0
Comment Utility
Can you provide a brief background of the old server ? like how it is being used and the services running?
that will help to provide the accurate and step by step process of what to do.


Cheers,
0
 

Author Comment

by:operatr
Comment Utility
Sure! admino...here we go.
The old server is really just a desktop PC running Fedora Core 1. It has three users, runs apache web server,  Mysql server, PHP, Perl, Webmin, and some custom scripts.  Some stuff in the /etc directory has been modified, so I will need to get that info transfered also.
If you need more, please ask. I appreciate all the help everyone is giving.
I am currently installing Fedora Core 1 to the new server, and I will need it to do the same thing the old server is doing...which is why I am here. LOL

Thanks,
0
 
LVL 6

Accepted Solution

by:
admin0 earned 250 total points
Comment Utility
Hi,

Since you are running fedora core1 on both the systems, it is safe to copy the files from one server to another .. including the binaries.

Since you have just 3 users, there are 3 ways how you can do this.

first, you need to copy the /etc/passwd. /etc/shadow and /etc/group
then tar/copy or rsync the /home files to the new server..

so far so good.. the users can login with their same username and password and also, the permissions on the home directory and their files will be the exact same.

Now, you can stop mysql on the old server, and then either use mysqldump to backup and move the mysql databases to the new server, or you can just simly copy the mysql files and it will start working.

you can then copy the apache conf files and your other custom files.

way 2:

since both servers are on fedora, you can rsync everything frol the old server to the new server.



way 3:

since you  have just a few users in the system, you can just add users like you add first, ,, useradd and manually copy the files using tar and then fix and chmod and chown in the new server.
mysql also using mysqldump

for apache conf, you can check the difference in the conf files and just add the entry manually.



Hope this helps..


CHeers,

0
 

Author Comment

by:operatr
Comment Utility
If anyone still looks at this I have one question. When I did the rsync like this:

rsync -e ssh -avz root@192.168.1.121:/ /

Which, in my rookie way, is the only way i knew to do it.  It did some copying, but on a reboot, it crashed with a kernel panic.

Is this because it is a different type of machine, yet running the same OS???

Thanks
0
 
LVL 6

Expert Comment

by:admin0
Comment Utility
Hi,

If you are not using a custom kernel or some specific hardware specific drivers to load, it will work without errors.
Since you are using hardware raid, and not software raid, the kernel will just see it as sda.

Can you paste the specific error that u are getting?

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now