• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Project: Rackmount Overkill

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
So, got the drives "installed" and building. I had to ghetto mod it. The one hole does line up with the drive fine, but the threading on the drives are different than what the trays came with. This means that no screw I have will sit flush with the bottom of the tray (like it is supposed to) and consequently won't fit in the server. I wasn't about to be defeated, so I thought of some alternatives. I could drill the holes, but that is messy and I'm not good at lining things up. Superglue! No, too sticky and with as good a hold as those drives would have, I wouldn't be able to remove them from the trays without twisting them all to hell. I kept looking...THERMAL TAPE! Ah ha, genius! Put tape on the bottom (the edges touched the tray itself) and screwed in the drive to get the "final position". I then removed the screw and I have drives attached with no screws! Did that for all three drives, hooked up the data cables and created the RAID array. I can't believe this is all falling into place like this.

Going to fire up the server and do some speed tests on the new drives, then figure out how to move the partitions to the RAID array.
 
Last edited:
Just finished getting everything up and running. I reinstalled the OS to make it easier than trying to resize and copy the disc completely.
 
Last edited:
Here are some more pictures because I'm bored and XZed (of overclocker.net) reminded me that I forgot!

wire_manage1.JPG


wire_manage2.JPG


wire_manage3.JPG


wire_manage4.JPG
 
Last edited:
So, got the drives "installed" and building. I had to ghetto mod it. The one hole does line up with the drive fine, but the threading on the drives are different than what the trays came with. This means that no screw I have will sit flush with the bottom of the tray (like it is supposed to) and consequently won't fit in the server. I wasn't about to be defeated, so I thought of some alternatives. I could drill the holes, but that is messy and I'm not good at lining things up. Superglue! No, too sticky and with as good a hold as those drives would have, I wouldn't be able to remove them from the trays without twisting them all to hell. I kept looking...THERMAL TAPE! Ah ha, genius! Put tape on the bottom (the edges touched the tray itself) and screwed in the drive to get the "final position". I then removed the screw and I have drives attached with no screws! Did that for all three drives, hooked up the data cables and created the RAID array. I can't believe this is all falling into place like this.
That is a good idea thid. But since there are no screws in place, just make sure the metal shell of the HDD is somehow connected to the metal in the case - this way any static electricity gets grounded.
 
That is a good idea thid. But since there are no screws in place, just make sure the metal shell of the HDD is somehow connected to the metal in the case - this way any static electricity gets grounded.
The PCB is grounded through the SATA connectors (which is to the case) and the PCB is also grounded to the hard drive casing itself. ;)

Good idea, didn't think of it. I'm covered though.
 
The PCB is grounded through the SATA connectors (which is to the case) and the PCB is also grounded to the hard drive casing itself. ;)

Good idea, didn't think of it. I'm covered though.
Are you sure? Because the computer case, power supply shell and HDD shell should be connected to earth ground and not to the 0V of the power supply.
 
Just found that I have a local place that will have a rack for $400! Free shipping is awesome. I should hopefully have one soon.
 
Thid,

Man I go away for a few months and you get all sorts of goodies in place, did I hear correct that a rack is coming as well?

Closed side, open, telco, what kind of rack? Give us specs on the rack!

Question on Astaro, does it have an IDS, and does it use Snort? Smoothwall and IPcop natively are using a 2yr old out of date version of Snort and I would LIKE to have better security then that.

BTW, I hate you for beating me to the fully rackmounted life.
 
Thid,

Man I go away for a few months and you get all sorts of goodies in place, did I hear correct that a rack is coming as well?
Yup yup, get reading! Going to call the place right now to see what they got.

Closed side, open, telco, what kind of rack? Give us specs on the rack!
Undecided, but most likely a 4 post, completely open rack. The price skyrockets when you start adding panels.

Question on Astaro, does it have an IDS, and does it use Snort? Smoothwall and IPcop natively are using a 2yr old out of date version of Snort and I would LIKE to have better security then that.
Not only does it use IDS (Snort), it signs you up and sets it up automatically ;)

BTW, I hate you for beating me to the fully rackmounted life.
Join meeeeeeeee.
 
Still no update on the rack, don't have the money for it yet. In the meantime, I updated my rsync script to include the runtime and give a nice (clean) output at the end that is easy to see how long it ran for.

Code:
#!/bin/bash
#This script contains all of the rsync commands that are run daily on
#Thideras' file server.  The main use for this script is to backup to
#alternate locations, such as an external drive or remote location.

LOG=/share/hitachi/logs/rsync-$(date +%m-%d-%Y).log

#Give the date and time started
echo ----------LOG START---------- 1>>$LOG
echo This log started on `date +%H`:`date +%M`:`date +%S` 1>>$LOG
echo ----------LOG START---------- 1>>$LOG
echo 1>>$LOG

[COLOR=Red]#Set the current time
STARTMIN=10#`date +%M`
STARTSEC=10#`date +%S`[/COLOR]

#Set the locations
COREY=/share/hitachi/rsync/corey/
COREY_COPYTO=/share/external/rsync_copy/corey

DAN=/share/hitachi/rsync/dan/
DAN_COPYTO=/share/external/rsync_copy/dan

DIANA=/share/hitachi/rsync/diana/
DIANA_COPYTO=/share/external/rsync_copy/diana

#============================================================================#

#Copy the files
rsync -av --delete $COREY $COREY_COPYTO 1>>$LOG
rsync -av --delete $DAN $DAN_COPYTO 1>>$LOG
rsync -av --delete $DIANA $DIANA_COPYTO 1>>$LOG

#============================================================================#
[COLOR=Red]
#Get the current time in minutes and seconds, assign to variables
ENDMIN=10#`date +%M`
ENDSEC=10#`date +%S`

#Compute the difference between the start and end time
MIN=$(($ENDMIN - $STARTMIN))
SEC=$(($ENDSEC - $STARTSEC))

#If the seconds variable is under 60, add 60 seconds and remove a minute
if [ $SEC -lt "0" ]
   then
        SEC=$(($SEC + 60))
        MIN=$(($MIN - 1))
fi[/COLOR]  

#Add the end date and time
echo 1>>$LOG
echo -----------LOG END----------- 1>>$LOG
echo This log ended on `date +%H`:`date +%M`:`date +%S` 1>>$LOG
[COLOR=Red]echo Runtime: $MIN min and $SEC sec 1>>$LOG[/COLOR]
echo -----------LOG END----------- 1>>$LOG

exit
All lines hilighted in red where added. Just ran the script and it seems to work great! Took about 200 executions (and TONS of modifications) to get that code working right. Here is the original script that I wrote (from scratch) to see how if/then statements work. I ended up writing a script that can get the runtime of the script.

Code:
#!/bin/bash
#This is a test script to see how if then statements work in scripts

#Set the current time, this is manually specified as it will
#always return 0 since the script is running immediately
STARTMIN=4
STARTSEC=23

#Get the current time in minutes and seconds, assign to variables
ENDMIN=10#`date +%M`
ENDSEC=10#`date +%S`

#Compute the difference between the start and end time
MIN=$(($ENDMIN - $STARTMIN))
SEC=$(($ENDSEC - $STARTSEC))

#If the seconds variable is under 60, add 60 seconds and remove a minute
if [ $SEC -lt "0" ]
   then
        SEC=$(($SEC + 60))
        MIN=$(($MIN - 1))
fi

#Output the difference in a human readable format
echo The script ran in $MIN minutes and $SEC seconds.

exit
I <3 bash scripts. Much more useful and easy to used compared to Windows.
 
Last edited:
Visbits turned me towards Nagios (http://nagios.org) for server monitoring. I'm thoroughly impressed by this product and I'd like to test it out for myself.

I just need to un-mess-up my current install. Tried to remotely bridge two connections and ended up losing all remote access to the server.
 
Worked on my script a bit more. I wanted to add an archiving function that does not run in a different script and runs at the same time but after the rsync finishes. The only way to do that is put it in the same script. I messed around with the code and got it functioning, it was actually quite simple.

There are a few reasons you don't want to run these at the same time, CPU usage and hard drive usage. I (accidentally) ran this at the same time my old rsync script executed and saw it exceed 15 load and stay there. This way, we only have one or two processes accessing the same information at a give time and saves my hard drives from the constant thrashing.

Another key thing I added was the "&" section, you can see it in the archive function. This allows me to run as many commands at the same time as I want. I wanted to do this since both the CPU and RAID array were almost sitting idle as the script ran. Running them at the same time sped it up a bit and gave the hard drives a workout.

Along with that, when the archive script ran, it took over an hour and caused my time calculations to go beserk. I corrected that by adding an hour section and two more if/then checks to verify that we don't have 'negative' time.

Green = new code
Red = modified code

Code:
#!/bin/bash
#This script contains all of the rsync commands that are run daily on
#Thideras' file server.  The main use for this script is to backup to
#alternate locations, such as an external drive or remote location.

LOG=/share/hitachi/logs/rsync-$(date +%m-%d-%Y).log

#Give the date and time started
echo ----------LOG START---------- 1>>$LOG
echo This log started on `date +%H`:`date +%M`:`date +%S` 1>>$LOG
echo ----------LOG START---------- 1>>$LOG
echo 1>>$LOG

#Set the current time
[COLOR=Lime]STARTHOUR=10#`date +%H`[/COLOR]
STARTMIN=10#`date +%M`
STARTSEC=10#`date +%S`

#============================================================================#
#This section is the daily rsync section
#============================================================================#

#Set the locations
COREY=/share/hitachi/rsync/corey/
COREY_COPYTO=/share/external/rsync_copy/corey

DAN=/share/hitachi/rsync/dan/
DAN_COPYTO=/share/external/rsync_copy/dan

DIANA=/share/hitachi/rsync/diana/
DIANA_COPYTO=/share/external/rsync_copy/diana

#Copy the files
rsync -av --delete $COREY $COREY_COPYTO 1>>$LOG
rsync -av --delete $DAN $DAN_COPYTO 1>>$LOG
rsync -av --delete $DIANA $DIANA_COPYTO 1>>$LOG

#============================================================================#
#End daily rsync section
#============================================================================#






[COLOR=Lime]#============================================================================#
#This is the archive function, runs on Monday only
#============================================================================#

if [ `date +%u` -eq "1" ]
  then
        echo Starting weekly archive 1>>$LOG

        #Set the backup source locations
        COREY1="/share/hitachi/rsync/corey/World of Warcraft"
        DAN1="/share/hitachi/rsync/dan/World of Warcraft"

        #Set the backup destination locations
        COREY1_GZIP="/share/hitachi/backups/Corey_WoW/WoW-$(date +%m-%d-%Y).tar.gz"
        COREY2_GZIP="/share/external/backups/corey/WoW-$(date +%m-%d-%Y).tar.gz"
        DAN1_GZIP="/share/hitachi/backups/Dan_WoW/WoW-$(date +%m-%d-%Y).tar.gz"
        DAN2_GZIP="/share/external/backups/dan/WoW-$(date +%m-%d-%Y).tar.gz"

        #Tar and Gzip the files
        tar -cf - "$COREY1" | gzip > "$COREY1_GZIP" &
        tar -cf - "$DAN1" | gzip > "$DAN1_GZIP"

        #Copy the files to the external drive
        cp "$COREY1_GZIP" "$COREY2_GZIP"
        cp "$DAN1_GZIP" "$DAN2_GZIP"

        echo Weekly archive complete! 1>>$LOG
  else
        echo Weekly archive is not set to run today 1>>$LOG
fi

#============================================================================#
#End weekly archive
#============================================================================#[/COLOR]       


#Get the current time in minutes and seconds, assign to variables
[COLOR=Lime]ENDHOUR=10#`date +%H`[/COLOR]
ENDMIN=10#`date +%M`
ENDSEC=10#`date +%S`

#Compute the difference between the start and end time
[COLOR=Lime]HOUR=$(($ENDHOUR - $STARTHOUR))[/COLOR]
MIN=$(($ENDMIN - $STARTMIN))
SEC=$(($ENDSEC - $STARTSEC))

#If the time goes under 0, correct the time
if [ $SEC -lt "0" ]
   then
        SEC=$(($SEC + 60))
        MIN=$(($MIN - 1))
fi

[COLOR=Lime]if [ $MIN -lt "0" ]
   then
        MIN=$(($MIN + 60))
        HOUR=$(($HOUR - 1))
fi

if [ $HOUR -lt "0" ]
   then
        HOUR=$(($HOUR + 24))
fi[/COLOR] 

#Add the end date and time
echo 1>>$LOG
echo -----------LOG END----------- 1>>$LOG
echo This log ended on `date +%H`:`date +%M`:`date +%S` 1>>$LOG
[COLOR=Cyan]echo Runtime: "$HOUR"h "$MIN"m "$SEC"s 1>>$LOG[/COLOR]
echo -----------LOG END----------- 1>>$LOG

exit
 
Back