How to configure hardware RAID in Dell Servers

One of the Dell Servers, Dell PowerEdge 2850, in our Cyber Jaya DC had hard disk issues, so I had to replace it. For some reason, I had a little bit of trouble setting up and configuring hardware RAID. Mostly because the terms used in the configuration menus and the menu itself is kinda confusing

So here’s a note to myself on how to make raid in dell servers:

  1. While booting the server, enter PERC/CERC BIOS Configuration Utility by pressing Control + M key.
  2. From the Management menu select Configure option.
  3. Select Clear Configuration from the Configure menu, Select Yes when prompted. At this point we have deleted all existing arrays and/or logical drives. Pressing Escape button go to Management menu.
  4. Go to Clear option in Management menu. Select drives by pressing spacebar and when you see READY status flashing you press F10 button. Select Yes and you will be reformatting those drives. This will take some time depending on your drive capacity. With my drives (2×73GB) it took around 1hour ++. When it’s done press escape and reboot your server
  5. Repeat Step 1.
  6. Select Easy Configuration from Configure menu. Make sure all drives are in GREEN and READY state.
  7. Using arrow keys select the drives one by one and press spacebar. This will change drives status from READY to ONLINE A00-00. Repeat this step for as much hard drives you have.
  8. If you want to make a hot spare, select a hard drive you wanna make hot spare and press F4.
  9. Select all ONLINE status drives and press F10. This will bring you Select Configurable Array(s) dialog. Now pressing spacebar you get A-00 window, here you should get Span-1. Press F10 key to verify your logical drive settings. Here you will get options of RAID-0 and RAID-1. When you made your mind and set your RAID configs go to Accept option and press enter. When prompted select YES.
  10. Now it’s time to make our logical drive bootable. In Configure menu go to Specify Boot Drive and select Specify a Logical Drive as BootDrive. The number in Logical BootDrive set to 0. (This will change according to your drive configs). And press enter.
  11. Pressing Escape button you quit from the menus and go to Exit dialog. Reboot your server and you are set to install your preferred OS now!

This note is for RAID-1 with 2×73GB SCSI hard drives. For your case it might be slightly different but the overall process should be something like this.

Enjoy!

UPDATE: Here’s a snapshot of the PERC/CERC BIOS Configuration Utility

PERC/CERC BIOS Configuration Utility

Finally, my ADSL at home is up and running!

After almost 2 months of time, thanks Streamyx!, my internet line is up. No wonder they call it screamyx. You really wanna scream when using it, getting their lousy support and the best part in installation.

However, there’s not much choice in regards to broadband internet connection over here. Yes, I know about Celcom’s 3G, Maxis broadband and Jaring as well, but I think they aren’t yet ready to compete with Streamyx. It’s kinda monopoly.

On the positive note, the WiMAX is coming to Malaysia soon. So I hope it will make things get better at Telekom Malaysia, if it happens.

Streamyx = Screamyx!

How to rotate apache logs in Linux

Here’s a little shell hack we did with synack last week. Basically instead of logrotate for apache we wrote this shell script which gives us more control over the logs. If you look into the codes you will see that it grabs all the apache log files, zips them, clear the logs, move the zipped file into different directory and if needed ftp/ssh file into different server. At the end, it restarts apache to enable new logs.

So enjoy!

[php]
#!/bin/sh
# log-apache.sh
#
# Copyright 2007 Arstan Jusupov
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Exporting paths
PATH=$PATH:/usr/local/sbin:/sbin:/usr/sbin

# Assign variables
LOGS_FILE_ZIP=`date +%Y%m%d`_logs.zip
LOGS_DIR=/var/log/httpd
LOGS_BACKUPS_DIR=/var/logs_backups
FTP_BACKUPS_DIR=/path/to/backup/`date +%Y%m`
APACHECTL=`which apachectl` # or hard-code full path

FTP_USER=”backup”
FTP_PASSWD=”backup”
FTP_SERVER=”192.168.x.x”

# Check if we can access $LOGS_DIR
if [ ! -d $LOGS_DIR ]; then
echo $LOGS_DIR does not exists or cannot be accessed.
break
fi

# Check if $LOGS_BACKUPS_DIR exists, if not create.
if [ ! -d $LOGS_BACKUPS_DIR ]; then
mkdir -p $LOGS_BACKUPS_DIR
fi

# Rotate the log files
for X in `ls $LOGS_DIR | grep log`; do
mv $LOGS_DIR/$X $LOGS_DIR/$(date +%Y%m%d)_$X
done

# Archive log files
zip $LOGS_BACKUPS_DIR/$LOGS_FILE_ZIP $LOGS_DIR/$(date +%Y%m%d)*

# Verification for successful zipping and removal of old log files.
if [ $? = 0 ]; then
rm $LOGS_DIR/$(date +%Y%m%d)*
fi

# Re-create the log files
for X in access_log error_log ssl_error_log ssl_request_log modsec_audit_log modsec_debug_log; do
touch $LOGS_DIR/$X
done

# Finally, restarting apache or if you want $APACHECTL graceful
$APACHECTL restart

# Off-system transfer of the log files
# Change local dir
cd $LOGS_BACKUPS_DIR

ftp -n $FTP_SERVER <
user $FTP_USER $FTP_PASSWD
binary

# create the remote backup dir in %Y%m format, if exists wont hurt
# I dont know how to do: if [ -d $DIR ]; then
mkdir $FTP_BACKUPS_DIR

cd $FTP_BACKUPS_DIR
put $LOGS_FILE_ZIP

bye
End-Of-Session
echo Done
exit 0
[/php]

Introducing new theme for my blog

Did you know that Darren and John, two big pro bloggers introduced new designs for their blogs? Both of them hired/paid for web designers to design themes for them.

I’m not a designer, but I tried to do something out of Silhouette theme originally designed by Brian Gardner. I liked Silhouette for its plain and web2.0 look design(not so much!). Also it was very easy to customize.

Hats off to Nurba for sending me the link!

For those who are new here is old theme screen shot. Compare it with the new one and leave your comments! Jusupov.com v1

Is Ubuntu Server safe?

Recently 5 out of 8 Ubuntu servers(LoCo) sponsored by Canonical were compromised. This can create a doubt in the community on the safety of Ubuntu Linux Server Editions. Are they really safe? Can we use them for production?

Here’s the explanation from James Troup, Canonical sysadmin team leader:
a) the servers, especially zambezi were running an incredible amount of web software (over 15 packages[1] that we recognised) and of all the ones where it’s trivial to determine a version, they were without exception out-of-date and missing security patches. An attacker could have gotten a shell through almost any of these sites.

b) FTP (not sftp, without SSL) was being used to access the machines, so an attacker (in the right place) could also have gotten access by sniffing the clear-text passwords.

c) The servers have not been upgraded past breezy due to problems with the network card and later kernels. This probably allowed the attacker to gain root.

So, based on this I can say that this has nothing to do with the Ubuntu Servers security. I think it was the poor management of the servers. The compromise has taken place because sysadmins were lazy(or may be too busy with other stuff) to install relevant patches and upgrades.

Well, anyways this thing happened, so let’s read what are they doing to prevent another hacking.

Move the servers to Canonical Data Centers or move the servers to managed/outsourced hosting companies.

This incident one more time proves that at some point, any OS(Operating System) or any software will be hacked. To be secure, you need to always watch out for patches/upgrades, advisories from the vendors, research and stay alert!

Next Page →

Categories


Clicky Web Analytics