Moving Whole OS Centos Server


 
Thread Tools Search this Thread
Operating Systems Linux Moving Whole OS Centos Server
# 1  
Old 12-28-2011
Moving Whole OS Centos Server

I currently have a web server its on a small harddrive I didn't know my site would grow so fast but now I need a bigger hard drive. Instead of adding another harddrive (host charge monthly of how many hard drives connected to server) is there anyway to just move the whole os to a bigger hard drive and i could just tell my host to remove the old smaller hard drive.Smilie
# 2  
Old 12-31-2011
Well you need to have physical access to the hard drive if you follow the steps I am going to advice you. Is it possible for you? If yes, then add the hard drive (of course you have to shutdown the running CentOS server) to another Linux box and issue the following command:

Code:
dd if=/dev/sdb of=/dev/sdc

Here /dev/sdb is the hard drive to be cloned and /dev/sdc id the new hard drive. The drive name may change depending on the availability of hard drives. Be sure to check if the OS is working well with the new hard disc.

NOTE: I have not tested anything like this with dd command. But as per the logic, it will copy the partition table too. So you will have lots of unused space on the new disk and this free space might be detected. I would not go for a hard disk cloning by any chance.

But if you really want to have a flaw less migration of whole OS while it's running, you would need to use a measure like P2V and V2P (physical to virtual and virtual to physical) migration solutions from the virtualization software vendors like VMware.
# 3  
Old 12-31-2011
You can DD them, however, that will possibly rely on you resizing partitions. I suggest you do the 2nd hard drive and use LVM. That way, should this ever come up again, it is a much faster fix.

Alternately, you can P2V your box and make it into a VM where the host OS would allow you to be more flexible with the larger drive. CentOS on a new drive using KVM would allow that, and you can use the P2V converter from VMware or other ways of making a snapshot of your OS.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Build NFS Server on CentOS

Dear All, I'm using AWS EC2 instance for my application. My application is high disk I/O based and EFS could not be used in my case. So, i need to build my own NFS server on Ec2 instance. I'm looking for High availability solution for my disk which i shared for NFS. Looking for builtin... (5 Replies)
Discussion started by: Bala
5 Replies

2. UNIX for Beginners Questions & Answers

FreeBSD vs CentOS as server

I have a HP Proliant server with centOS. This is the software that I run: - SSH + SFTP - NGINX - PHP7 - Bitcoind - MYSQL Would you recommend FreeBSD or CentOS for this software. Also how hard is it to set this up with FreeBSD compaired to CentOS? I never used FreeBSD before, is it hard... (3 Replies)
Discussion started by: jwz104
3 Replies

3. Red Hat

Moving boot SSD from a dead server to a new server

Hi all, We have a disk array that has the boot drive on an OCZ SSD on a PCIe card. Well, the motherboard died and we got a new motherboard. We moved the controllers, NICs, etc, to the exact same slots on the new motherboard, except now it won't boot. I guess it doesn't recognize the OS on the... (1 Reply)
Discussion started by: glowe57
1 Replies

4. Web Development

Building LAMP server from scratch (build a server with compiled LAMP from CentOS mini)

Hello everyone, I would like to setup a lamp server from a minimal distro and to compile PHP, MySQL and Apache myself. I have chosen CentOS minimal for the OS and I am trying to build the stack by hand... But well, it appears I need some help! First: I am looking for good and recent... (3 Replies)
Discussion started by: freddie50
3 Replies

5. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

6. Red Hat

On CentOS, moving space from large free directory to another

Hi. My "/usr" folder is running out of space. My "/home" folder is quite large and has a lot of free space. As follows: Filesystem Type Size Used Avail Use% Mounted on ... /dev/sda5 ext3 9.7G 2.6G 6.7G 28% / /dev/sda7 ext3 152G 16G 128G 11% /home /dev/sda3 ... (7 Replies)
Discussion started by: pkiula
7 Replies

7. Solaris

Key Points when Moving from Server A to Server B??

Hi Everyone, I'm still learning daily about UNIX (specifically Solaris 10). I'm tasked with moving my current application and database from Datacenter A to Datacenter B. There will be no updates and no changes other than a new server and new location. So far, I have Solaris... (3 Replies)
Discussion started by: smckech1972
3 Replies

8. UNIX for Advanced & Expert Users

Mail server in centos!!

Hi all!! 1. I am totally new to Mail server but now in our management decided to run own mail server, still now we are running our mail server using godaddy!! if we transfer all mail accounts to here means what are the steps i need to do?? 2. I have basic idea in postfix , which... (2 Replies)
Discussion started by: anishkumarv
2 Replies

9. Shell Programming and Scripting

Moving files from one server to another server every 5 min

HI All, I am trying to automate my stuff to make 'to-do-easier'. I am new to shell scripting. I need help to you regarding the below problem. I have one directory in my server, frequently files will store in that directory. I want to move that files into another server on every 5... (5 Replies)
Discussion started by: ravvamohan
5 Replies
Login or Register to Ask a Question