Notices

Overclockers Forums > Hardware > Alternative Modding > Project Logs
Project Logs
Forum Jump

Project: Rackmount Overkill

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 01-07-10, 04:35 PM   #501
Aynjell
Member



Join Date: Dec 2008

 
Quote:
Originally Posted by thideras View Post
I have 3 batteries sitting here on my desk, just need to figure how to mount it (velco?).
I velcro'd it to my case. If you'd like I can take pictures tonight of my mount.

__________________
Do not break wind in the same room as a dark brother or sister; to do so is to invoke the wrath of Sithis. - Aynjell, in fond memory of Lucien LeChance
Aynjell is offline Author Profile   QUOTE Thanks
Old 01-07-10, 05:27 PM Thread Starter   #502
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
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.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!

Last edited by thideras; 01-08-10 at 01:41 PM. Reason: Spelling
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-07-10, 11:50 PM Thread Starter   #503
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Just finished getting everything up and running. I reinstalled the OS to make it easier than trying to resize and copy the disc completely.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!

Last edited by thideras; 01-08-10 at 09:51 AM.
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-13-10, 02:34 PM Thread Starter   #504
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Here are some more pictures because I'm bored and XZed (of overclocker.net) reminded me that I forgot!








__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!

Last edited by thideras; 01-13-10 at 03:47 PM.
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-13-10, 03:26 PM   #505
VinnyTAMU
Member

 
VinnyTAMU's Avatar 

Join Date: Jun 2005
Location: BCS, Texas

 
Looks good! Nice cable management.
VinnyTAMU is offline   QUOTE Thanks
Old 01-13-10, 04:32 PM   #506
visbits
Member

 
visbits's Avatar 

Join Date: Jan 2009

 
What did ya do with my custom fan that your perc had?

__________________
Using Ubuntu does not make you good with linux.

HEATWARE
visbits is offline   QUOTE Thanks
Old 01-13-10, 04:38 PM Thread Starter   #507
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Quote:
Originally Posted by visbits View Post
What did ya do with my custom fan that your perc had?
I have never bought a Perc from you...

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-13-10, 08:24 PM   #508
simcom
Member



Join Date: Sep 2006

 
Quote:
Originally Posted by thideras View Post
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.

__________________
WRT54G v2.2 DD-WRT vintage 32MB RAM
DS-101G+ DSM 2.2-0959 bootstrapped
simcom is offline   QUOTE Thanks
Old 01-13-10, 08:27 PM Thread Starter   #509
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Quote:
Originally Posted by simcom View Post
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.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-13-10, 10:14 PM   #510
SuperMiguel
Super User

 
SuperMiguel's Avatar 

Join Date: Sep 2007
Location: Florida, US

 
Quote:
Originally Posted by visbits View Post
What did ya do with my custom fan that your perc had?
he thinks you bough my perc

__________________
<(+_+)> (v)g <(+_+)>
SuperMiguel is offline   QUOTE Thanks
Old 01-14-10, 02:35 AM   #511
simcom
Member



Join Date: Sep 2006

 
Quote:
Originally Posted by thideras View Post
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.

__________________
WRT54G v2.2 DD-WRT vintage 32MB RAM
DS-101G+ DSM 2.2-0959 bootstrapped
simcom is offline   QUOTE Thanks
Old 01-30-10, 02:36 PM Thread Starter   #512
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
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.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 01-30-10, 07:49 PM   #513
neonblingbling
Member

 
neonblingbling's Avatar 

Join Date: Aug 2004

 
If you didn't purchase the rack yet, and have an Ikea close by...

http://wiki.eth-0.nl/index.php/LackRack

__________________
[HEAT] - Sony SZ650 /// T7500 /// 3 GB ram /// 8400M GS /// OCZ Vertex 2 60GB ded :(
neonblingbling is offline Heatware Profile Rosetta Profile   QUOTE Thanks
Old 01-30-10, 08:32 PM   #514
Ben333
Folding for Team 32!

 
Ben333's Avatar 

Join Date: Feb 2007
Location: New Hampshire

 
Oh man... I'm all over that
Ben333 is offline Author Profile   QUOTE Thanks
Old 02-01-10, 10:10 AM   #515
Adragontattoo
Trailer Chasing Senior

 
Adragontattoo's Avatar 

Join Date: Mar 2006
Location: Northwestern corner of Va. USA, Northern Hemisphere, Earth, Sol Sector, outer arm of spiral galaxy

 
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.

__________________
Only ISP provided, .EDU, .GOV, .MIL e-mail addresses are Classifieds approved. Are you unable to access the Classifieds?
Click here to find out why!
The Forum Rules FAQ|
Classies Rules and Regs
Prices, slashes and edits
Quality over Quantity Pictures are NOT req.
Adopt an animal if you want one, dont use a breeder!
Adragontattoo is offline Author Profile Heatware Profile   QUOTE Thanks
Old 02-01-10, 01:52 PM Thread Starter   #516
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Quote:
Originally Posted by Adragontattoo View Post
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.

Quote:
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.

Quote:
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

Quote:
BTW, I hate you for beating me to the fully rackmounted life.
Join meeeeeeeee.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 02-12-10, 02:44 PM Thread Starter   #517
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
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

#Set the current time
STARTMIN=10#`date +%M`
STARTSEC=10#`date +%S`

#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

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

#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  

#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
echo Runtime: $MIN min and $SEC sec 1>>$LOG
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.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!

Last edited by thideras; 02-15-10 at 03:10 PM.
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 02-13-10, 10:42 AM Thread Starter   #518
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
Just completely redid the entire table of contents for easier viewing:
http://www.overclockers.com/forums/s...81#post6063881

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 02-15-10, 03:05 PM Thread Starter   #519
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
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.

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks
Old 02-22-10, 03:10 PM Thread Starter   #520
thideras
Destroyer of Empires and User Accounts, El Huginator
Premium Member #3
First Responders

 
thideras's Avatar 

Join Date: May 2006
Location: South Dakota

 
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
STARTHOUR=10#`date +%H`
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
#============================================================================#






#============================================================================#
#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
#============================================================================#       


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

#Compute the difference between the start and end time
HOUR=$(($ENDHOUR - $STARTHOUR))
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

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

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

#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
echo Runtime: "$HOUR"h "$MIN"m "$SEC"s 1>>$LOG
echo -----------LOG END----------- 1>>$LOG

exit

__________________
Desktop: Gigabyte Z77X-UD5H | 3570k | 32 GB | GTX 770 Classified | 1 TB Samsung Evo & 2 TB HDD | Windows 3.1 | 4x 2560x1400 Monitors
VM Server 1: Dell R710 | 2x L5630 | 96 GB RAM | 8x 300 GB Savvio | IBM M1015 | 34 TB Raw disk | XenServer
VM Server 2: Dell R710 | 2x L5630 | 96 GB RAM |
8x 300 GB Savvio | XenServer
Router: Dell R410 | E5620 | 32 GB RAM | 3x 300 GB | pfsense
"That's not overkill, or a lot. That's just thiderastic." -txus.palacios
"Clouds are silent, cold, and wet. Servers are none of these things." -Bobnova

Current project: Rackmount Overkill (New) | Little Overkill (New)
Articles: Rack Mounting 101 | Dell Perc 5/i Throughput Benchmarks
My Website


Want to talk directly to all the moderators at once? Call the Mod Hotline!
thideras is offline Author Profile Benching Profile Heatware Profile   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Hardware > Alternative Modding > Project Logs
Project Logs
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 01:21 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?