LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2012, 05:06 PM   #1
sam_nyc
Member
 
Registered: Aug 2009
Posts: 41

Rep: Reputation: 1
moving Linux servers


Hi All,

We are in the process of moving from building A to building B. We have close to 100 Linux servers. It can take close to two hours just to shut each of the server down. I was thinking about writing cronjob to shut the server down.

This will be in the file.


netstat -rn > /root/netstat_info.txt
ps -ef > /root/psef_info.txt
shutdown -h 5

Anything else I need?
 
Old 07-11-2012, 05:26 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Quote:
Originally Posted by sam_nyc View Post

Anything else I need?
Thats a question we really cant answer, but a simple power off/power on shouldn't be too big of a change. I make a copy of pretty much everything when doing patching or refreshing a server to new hardware.

I would suggest you look at using at or specifying the shutdown command with a specific time as opposed to scheduling a cron, the point being here is that if you forget to remove one of the cron entries on one of your servers at some point in time it will run the cron again and shut it down.
 
Old 07-12-2012, 10:06 AM   #3
sam_nyc
Member
 
Registered: Aug 2009
Posts: 41

Original Poster
Rep: Reputation: 1
another quick question, for the crontab Does this looks correct? I want to do this on July 21 at 6 AM.

00 06 21 07 05 /root/move_shutdown.sh
 
Old 07-12-2012, 11:56 AM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
You could use a cron for this but the "best practice" would be to not use cron here.

Code:
at -f /root/move_shutdown.sh 6:00 July 21
Would do what you want and it would only run it that one time, no need to remember to remove the crontab entry.
 
Old 07-12-2012, 12:27 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Just to add something that's bitten me in the past (and something you're probably already doing)...make absolutely SURE you have good, verified backups before doing a shutdown.

I have suffered at the hands of thermal shock twice. Hard drives that are up and spinning 24/7 for a long time, heat up, and naturally wear. A quick reboot is fine...but off for several hours, being moved, and brought into a cool new server room, can cause the drives to seize, and not come back up. We recovered once by heating an array with a hair-dryer, and things started working, but the other time, data was lost. Just FYI.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Moving servers... ProtoformX Linux - Virtualization and Cloud 9 05-28-2012 04:29 PM
Moving servers with basic port redirect MrSparky Linux - Server 7 08-15-2008 05:31 PM
Moving Data From Servers via LAN? carlosinfl Linux - Server 9 02-26-2008 10:02 PM
Moving user passwords across servers wheel Linux - General 2 04-04-2006 11:29 AM
LXer: Us bank sees savings by moving to Linux servers LXer Syndicated Linux News 0 01-20-2006 03:01 AM


All times are GMT -5. The time now is 08:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration