LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Server down, troubleshooting help needed (https://www.linuxquestions.org/questions/red-hat-31/server-down-troubleshooting-help-needed-303597/)

longnshortofit 03-19-2005 01:08 PM

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

cylix 03-19-2005 01:52 PM

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.

longnshortofit 03-19-2005 03:22 PM

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

longnshortofit 03-19-2005 06:16 PM

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

cylix 03-19-2005 06:36 PM

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.


All times are GMT -5. The time now is 03:56 AM.