LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-19-2005, 01:08 PM   #1
longnshortofit
LQ Newbie
 
Registered: Mar 2005
Distribution: RH 7.2 and 8
Posts: 9

Rep: Reputation: 0
Server down, troubleshooting help needed


Greetings,

I'm running RH 7.2 with Kernel 2.4.7

The built in LogWatch sent me an email this morning with these:

################## LogWatch 2.6 Begin #####################

--------------------- ModProbe Begin ------------------------

Can't locate these modules:
ppp0: 18 Time(s)

---------------------- ModProbe End -------------------------
and
--------------------- SSHD Begin ------------------------

SSHD Started: 1 Time(s)

**Unmatched Entries**
error: Bind to port 22 on 0.0.0.0 failed: Address already in use.fatal: Cannot bind any address.

---------------------- SSHD End -------------------------


I verified that I can't log in by SSH, then I rebooted.
The reboot hangs during the echo stage, after

sethostname shop.globalshoppingtrip.com [ ]

I think it is hanging on the next line, although I'm not sure what the next line is trying to initialize.

I suppose I could reboot a different server and find out what it is trying to do.

Any suggestions?

This server is a webserver and a mysql server. The web files are saved on another workstation, so those are retrievable. But the mysql files are not backed up.

One idea I had was to put the hd from this box into another working server. I have a fresh RH8 installation that would be a good candidate. I've never installed a 2nd drive, so would need advice on how to procede. No advice needed on the hardware side.

Any help would be appreciated.

Thanks,

Gordon
 
Old 03-19-2005, 01:52 PM   #2
cylix
Member
 
Registered: Dec 2004
Location: Ohio
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
Alrighty,

Say it with me, "It's recovery time!" (Also, it's important to make a striking motion with your hand...)

Certainly the easiest thing would be to pull the drive, change the jumpers and boot in another linux box.

To mount the drive you will have to issue a command...

mount /dev/hdXy /mnt/drive

(or really anything you want to name the last directory... you must create the drive directory or just be lazy and use /mnt)

X is the letter of the drive as it lives on the IDE chain.

"a" is primary master, "b" is primary slave, "c" is secondary master and "d" is secondary slave.

Now, you can't just mount /dev/hdb under /mnt/drive... those drives are partitioned into sections. Partions are designatied by a number (this was determined, created and formatted during install most likely).

Now, if you don't know which partition you want to mount, you can simply use fdisk to view the partition structure.

fdisk /dev/hdb

and then use p for print, m for help and q for quit.

This will simply show the partitions created and won't detail where it was used. Worse case scenario, you simply mount the partitions individually and pick through them.

mount /dev/hdb1 /mnt/partition1
mount /dev/hdb2 /mnt/partition2
mount /dev/hdb3 .... you get the idea (don't forget to mkdir /mnt/partitionX)

You might also have to run a disk check before hand if you have file system problems... ala "e2fsck /dev/hdXy" (don't check a mounted partition!!!)

Now, you could do all that, but if you really suspect it's just some goofed script, you can always bypass just about everything and take a peek.

Go go gadget boot loader options!

Now, my lilo is a little rusty, but you should able to interupt the boot process with left shift.

There you can press tab to list the available kernels

So then type "kernel name init=/bin/bash root=/dev/hdaX "

(Uh oh, we ran into that nasty partition problem again... if you don't know your root partition... which could be /dev/hda1 or /dev/hda2 or anything really... you can always guess!)

Now, this will simply load your kernel and drop you into a bash shell. Everything is going to be read-only and there is nothing else mounted. No proc, no nothing other then /bin/bash kicked in. To make things a little more troublesome you are going to be in a read-only environment as well.

To fix that, remount your root or / drive as read-write.
mount -n -o remount,rw /

You won't have much available, but with vi you can take care of most problems.
 
Old 03-19-2005, 03:22 PM   #3
longnshortofit
LQ Newbie
 
Registered: Mar 2005
Distribution: RH 7.2 and 8
Posts: 9

Original Poster
Rep: Reputation: 0
Wow, Thanks

And thanks for the quick reply.

I now have the old drive mounted as hdb2

Now redirecting apache to the new location...

Then add the other box's IP

wondering how to get things to find the proper mysql...

lots to do...I'll be back with more questions, I'm sure

..but many thanks for your help so far!

Gordon
 
Old 03-19-2005, 06:16 PM   #4
longnshortofit
LQ Newbie
 
Registered: Mar 2005
Distribution: RH 7.2 and 8
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, got the IP on the box, and apache setup for all the old websites. Very nice....

I'm not sure what the best way to deal with mysql is

1. set up mysql fresh on hda
2. figure out how to start and call to the mysql on hdb.

Any suggestions?

Thanks again!

Gordon
 
Old 03-19-2005, 06:36 PM   #5
cylix
Member
 
Registered: Dec 2004
Location: Ohio
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
Am not a mysql db kinda guy... prefer the relational flavour ala postgres and pervasive. (pervasive costs money QQ). That doesn't mean I haven't used it, but I just haven't kept up.

What's the deal with ancient distro's?!? (Note, I have vendor box's that ship them with redhat 7.2... quite an upgrade from their version of 6)

If it's an old box, just keep the install and services to a minimum, but that's a different post and a different thread.

Say it with me, "It's recovery time!" (note, if you didn't say it before, I don't know how you got this far)

Ok, I have no idea where your mysql db files are located.

I'm going to ask the magic 8 ball...

He says, /var/lib/mysql/databasename

or you can du -a /mounted/location | grep dbname or worse just grep mysql

Now, if you are running the same version of mysql, you might get away with a copy operation. (copy the database folder to your new mysql database location) This is only going to work if the architecture remained the same, but if little has changed it could also possibly handle a small jump in mysql versions.

I dug up a handy reference for you for dumping and such. This might prove a bit helpful. Note, your old tools may not work with the libraries present since you went to a new version. The best strategy might be to fix what's broken.

http://dev.mysql.com/doc/mysql/en/up...g-to-arch.html

Of course, there is probably someone here more familiar with advanced recovery options in mysql. (between versions possibly as well).

Please post them some info on whats changed.
 
  


Reply



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
Terminal Server Help Needed trickle Linux - General 2 08-22-2005 01:48 AM
Troubleshooting A Gateway Server enderjm Linux - Networking 3 08-17-2005 11:26 PM
Troubleshooting VNC server (specifically "-inetd" flavor) theophilus Linux - Software 2 02-06-2004 05:13 PM
Troubleshooting x-server "Can't Open Display" rno451 Linux - Software 1 11-12-2003 08:10 PM
e-mail server help needed Hotwire Linux - Software 2 08-08-2003 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:17 AM.

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
Open Source Consulting | Domain Registration