Forum

O-T Linux Help - drive cloning

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

O-T Linux Help - drive cloning

Postby Cobalt » Mon May 25, 2015 4:39 pm

Sorry for the O-T post but all my usual Linux Help sources seem dead with no responses, and I know there are alot of smart people here that probably know Linux Extremely well and could offer help.

I have a server running the latest version of Ubuntu with a 250GB standard issue Westen digital drive, I believe an SATA.
I have a new server thats the same hardware as the old one that I want to run this drive on. The currrent drive has the latest Version of Ubuntu and I believe a
100MB partition for the boot partition as part of the 250GB drive.

The new machine is identical all HW except it has a 500GB raid system attached for the hdd.

If I were to clone the 250GB drive to a USB drive then install the USB drive
to the new machine, the destination drive would not be the same size. So can
I repartition it to (2) 250GB drives or will the RAID system not like that?

Or would I be better off just cloning the boot partition first, copying that
over, then do just a file copy of the 250GB drive onto the rest of the space
on the 500GB drive left after the boot partition is cloned?

I also have read a little of "Clone a Hard Drive over the Network" but not
sure if this is possible in this case. Any sugguestions or feedback
appreciated.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: O-T Linux Help - drive cloning

Postby Spirit » Mon May 25, 2015 4:52 pm

Is it really necessary? Most of it surely is data which you can move independently of the OS.
It's worth getting to know your configuration files and knowing what exactly you changed from the defaults. Unless you run gazillions of things, you can probably start fresh, install packages, configure them.

The OS is really just files on Linux so instead of cloning the harddisk you rather want to copy it on a file basis (including all the permissions etc).

https://wiki.archlinux.org/index.php/Fu ... with_rsync
http://www.rackspace.com/knowledge_cent ... and-line-0
http://olivier.sessink.nl/publications/hotcloning/
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1025
Joined: Sat Nov 20, 2004 9:00 pm

Re: O-T Linux Help - drive cloning

Postby Cobalt » Tue May 26, 2015 6:00 pm

Yea one of the websites on the server is pretty complex and I rather not spend time setting it up fresh.

There is a boot partition of about 100MB as well and being its a RAID system on the new machine, was not sure if that complicates things when cloning...they arent the same size drives.

The 250GB drive has a 100MB standard Linux boot partition, so I guess I could make one on the destination drive then just copy the files on the old to the new one? The old drive just had a problem with Grub not working, so we had to change grub so it could find the other partition, it was somehting called a "kernel panic". Im pretty sure it was the hard drive flaking out, as I got about 2 years out of the last drive like this one before it started acting up , and it was the same time around May like it is now when the last HDD was changed to this one.



Spirit wrote:Is it really necessary? Most of it surely is data which you can move independently of the OS.
It's worth getting to know your configuration files and knowing what exactly you changed from the defaults. Unless you run gazillions of things, you can probably start fresh, install packages, configure them.

The OS is really just files on Linux so instead of cloning the harddisk you rather want to copy it on a file basis (including all the permissions etc).

https://wiki.archlinux.org/index.php/Fu ... with_rsync
http://www.rackspace.com/knowledge_cent ... and-line-0
http://olivier.sessink.nl/publications/hotcloning/
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: O-T Linux Help - drive cloning

Postby revelator » Tue May 26, 2015 8:29 pm

this might help http://www.miray.de/products/sat.hdclone.html#free i use it myself allthough the free version has a few limits it works quite nicely.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2518
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: O-T Linux Help - drive cloning

Postby xaGe » Sun May 31, 2015 1:07 am

There are so many ways in Linux to do it. dd or cat would most likely work as well if the new hard drive was the same size or larger, but being a raid I'm not sure. I think http://clonezilla.org/ is a good choice being powerful and free and does have support for raid, but again I haven't dealt with raid systems. I usually just copy my home folder contents to use in a new hard drive install.

Are you planning on just using a RAID 1 (Mirroring raid)? If the raid is set up correctly the system would most likely detect it as 1 drive. I know CZ supports raid 1 at least, but it might depend on if its a hardware or software raid. Wish I had more experience to help. Good luck.
User avatar
xaGe
 
Posts: 461
Joined: Wed Mar 01, 2006 8:29 am
Location: Upstate, New York

Re: O-T Linux Help - drive cloning

Postby Cobalt » Sun May 31, 2015 7:50 am

Well my ops guy cloned the 250GB drive to the USB drive they attached and now its on the new server. We just mounted it today but unfortunately something is causing the new servers net connection to randomly crap out, almost the same as what was happening on the old server. The new server has a completely new OS installed , we didnt even get a chance to move files from the USB yet and this happened. Im not sure if its related but all I did was copy the Quake server folder to the new server to see how the new one does with Quake. While the problem was happening, I took down the Quake server and closed all the Quake ports that were open in the fw, but the problem persisted.

I suppose a virus on the other server could have dropped onto the USB while cloning, but stragely, the old server has not exhibitted any issues since it failed to reboot several days ago, which led me to bleive it had a hw issue so we decided to move to a new server and use the same OS and panel. they did get the grub boot loader repaired which got the old server back up and its been ok since.

This issue happening completely soaks the internet connection dry for periods of random time length. The other server had a similar problem but it never soaked the connection up completely, it would gradually lag up and up for long periods of time, then go back to normal for a while then the process would recur randomly over long spaces of time. Though this new issue is not exactly the same it does have a similar feel to it.


xaGe wrote:There are so many ways in Linux to do it. dd or cat would most likely work as well if the new hard drive was the same size or larger, but being a raid I'm not sure. I think http://clonezilla.org/ is a good choice being powerful and free and does have support for raid, but again I haven't dealt with raid systems. I usually just copy my home folder contents to use in a new hard drive install.

Are you planning on just using a RAID 1 (Mirroring raid)? If the raid is set up correctly the system would most likely detect it as 1 drive. I know CZ supports raid 1 at least, but it might depend on if its a hardware or software raid. Wish I had more experience to help. Good luck.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: O-T Linux Help - drive cloning

Postby Spirit » Sun May 31, 2015 8:13 am

Install some system monitoring like Munin and see if you can spot the problems. Also for network debugging on the server things like netstat or iptraf can help.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1025
Joined: Sat Nov 20, 2004 9:00 pm

Re: O-T Linux Help - drive cloning

Postby Bluntz » Fri Jun 26, 2015 2:17 am

Run top in the terminal and look at your procs when this is happening,may give some clues.
GL Coby.
User avatar
Bluntz
 
Posts: 10
Joined: Wed Jun 22, 2011 4:08 pm

Re: O-T Linux Help - drive cloning

Postby Cobalt » Sat Jul 18, 2015 3:52 pm

Thanks to all who tried to help.

Turns out the new server was for the most part pretty quiet after Installing Ubuntu fresh on the new server, didnt bother with cloning.

This odd lag problem still came and went, but at a much harder consistency to be able to study for any length of time.

The ops people kept the ticket open, but they kept asking me to plot graphs from my side, which was suspicious, as if maybe the whole intent of the problem was something they were doing to maybe somehow
get a fix on my internet locaitons or maybe just be plain idiots, I dont know. All in all, I wound up calling my CC company and disputing the months charges for the server, since they could not find the trouble, and
rebooting the old server indiated a grub problem at which point I said perhaps the server HW is hosed, so they did a chassis swap, but this was alot of work for me with aloot of down time...so I felt I ought to get something for it.

They didnt fight the reversal, but the next month they rebilled me for that, plus $78.43 on top for who knows what.

I opened up another ticket and of course me being very upset and angry I made racial slurs and I guess what is now calleed "homophobic" remarks and indicated that someone there needs a good asskicking.

Within minutes - and this is the fastest I have ever seen them take action by the way, the server was disabled and taken completely offline.

Reasoning was violation of terms of service, threatening content not tolerated :)
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: O-T Linux Help - drive cloning

Postby Ace12GA » Thu Aug 06, 2015 1:22 am

I'm way late to this show, but I would make one suggestion; don't use Ubuntu as a server OS. I know, they have a server edition, it's super "easy" to use, etc, etc. My professional career involves working with a lot of different Linux and Unix based servers and desktops, and in every single case, as a server OS, Ubuntu is broken. I'm not going to argue the merits as a desktop OS, but as a server, it is garbage. I'm talking about core functionality. You would be much better off with Debian, if you like that package management system, or Redhat (not Fedora; actually Scientific Linux is what I would suggest, as you can gets updates without a RHEL network subscription, and its a direct source rebuild of RHEL). The real world is dominated by RHEL for a reason.

In regards to your issues, and the transfer of data from one server to another, you can easily use the tar command to create an exact backup of your data with permissions and ownerships preserved. The only catch here is that you need to make the same accounts exist on the new system as the old. That includes UID and GID's matching usernames and groupnames. You can copy the passwd and group files over from the old server and merge them with the existing and then use tar to transfer the home folder. That should sync up the users. Once you're done with that, how you move your data is straight forward. Tar and gzip to a file, or use a NFS network export that you can mount locally and pipe tar through itself to copy the data with preserved permissions and ownership. There are other copy tools you can use, and certainly faster than tar, but tar is a tried and trued method to accomplish this. You can also use rsync where a direct copy is involved. The main pro of using rsync is raw performance over using tar; rysnc is much faster.
Ace12GA
 
Posts: 56
Joined: Sat Jan 28, 2012 12:08 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest