Dos and Don’ts of Linux

I got myself a dedicated server recently. Was certainly good. However, since getting the server, we’ve had Hard Drive issues. The first drive, a SATA drive, wouldn’t install with the OS we planned to use. So we bailed on that idea, and a 20GB IDE was used temporarily, until we could solve the 80GB SATA issue.

We decided to use an 80GB IDE drive instead, same drive, different connection.

The drive was installed last night. But, a new dilemma is left. That server serves a few purposes. Whilst on the 20GB drive, I attempted to move to it, and we’d later cop a bit of downtime and copy to the new 80GB IDE.

All seemed sound in theory, however, reality is so much different.

The 80GB IDE was installed, the 20GB IDE was made slave. I mounted the 20GB this morning. We now had an issue. I had to get the server’s radius server, asterisk server, mysql server and http server back up.

I already spent hours doing this on the 20GB drive, and it was fully intact, so the obvious came to me.

Let’s copy it all over, with permissions, etc, from one drive to another. All sounded good in theory. All files come across, reboot server, server comes back, as it were before moving to the 80GB drive, and then leave the 20GB unmounted and get it removed at some point later on (it was causing the server to crash).

So, I began executing the created command after reading the cp –help file.

Here is the command:
cp -R -f -v -p –preserve=all –reply=yes –force –target-directory=/ /drive2/lib lib

Here is the result:
`/drive2/lib/libcrypto.so.0.9.7a’ -> `/lib/libcrypto.so.0.9.7a’

That module is used for something, something.. important to a remote server.. Any guesses on what it is?

No?

It’s SSH’s encryption module. Replacing it whilst SSH’ed causes SSHd to crash, and leaves us without any SSH access.

Not only that though, the server hasn’t been rebooted yet, but it is suspected, after reboot, it’ll likely cause the system to not start. Here is why.

The /etc/ folder contains a file called fstab. That is what defines filesystems. And with the older drive being a 20GB, and this drive being a 80GB (partitioned that way to), it might mean that the system will not boot, due to a mismatch on the filesystem table (partition is bigger then filesystem). It could work too. Maybe it will. Anyway. The copy command isn’t the best way to move from one drive to another.

Ghost is the new idea, hopefully a ghost of the drive to the other drive will see us up and running with the 80GB drive.

Note to self: Don’t take the easy way out. It’s just too easy.

This entry was posted in Linux. Bookmark the permalink.

One Response to Dos and Don’ts of Linux

Leave a Reply

Your email address will not be published. Required fields are marked *