2003 – James Batchelor https://james-batchelor.com Useful I.T & VoIP Ramblings Mon, 25 Apr 2016 14:52:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://james-batchelor.com/wp-content/uploads/2025/05/cropped-cropped-logo-jb-202505-32x32.png 2003 – James Batchelor https://james-batchelor.com 32 32 2 Servers, 1 UPS https://james-batchelor.com/index.php/2015/12/10/2-servers-1-ups/ Thu, 10 Dec 2015 14:10:32 +0000 http://james-batchelor.com/?p=382 Continue reading "2 Servers, 1 UPS"]]> 2 Servers, 1UPSWith the new server up and running it seemed fitting to connect it to my UPS, and thanks to the low power consumption of the HP Microservers I still get around 40 minutes of battery only time with both servers running before the UPS runs out of juice.

Unfortunately, the UPS in use only has one monitoring port which is connected to my original server, meaning during a spell of prolonged power outage, the new server will not know when to shut down safely and will continue to run until the UPS runs out of battery supply, leaving it vulnerable to data corruption that affected the original server prior to battery backup.

But with a simple script and some setup both servers can shut down safely before the batteries run out.

The Idea is to have a script sent from the host server with instructions to shut down the other server when the battery level runs low, luckily Windows gives the ability to run a program on low and critical power level notifications, with adjustable power level triggers.

The most important factor with this idea is that the host server is able to communicate and send the script to the other server, in my current setup both servers are connected to the main network switch that does not have battery backup, meaning that during a power outage the servers will be unable to communicate and therefore unable to shut down safely.

The simple solution was to introduce another switch close to the servers that has power provided by the UPS, for this I chose a NetgearProsafe GS105 and connected both servers to it, with an uplink to the main switch. This also has the advantage of removing traffic away from the main hub when backups between servers take place.

Netgear Prosafe GS105, powered from the UPS
Netgear Prosafe GS105, powered from the UPS

With the servers connected via a backed up power source, it is time to create the shutdown command. On the host server connected to the signal of the UPS, create a .bat file using Notepad with the following line:

shutdown /s /f /m \\MACHINENAME /t 10 /c “Battery Backup Low”

This script tells the computer MACHINENAME to force a shut down in 10 seconds regardless of who is logged in, for those that are the message “Battery Backup Low” will be displayed. The script was then saved to the Windows directory to help avoid accidental deletion.

From the host server, open the power settings from the Control Panel, on the Alarms tab choose Alarm Action on the Low battery alarm field. Check the Run program box and choose the .bat file created to run on the low battery alarm. I chose the Low power instead of Critical to allow the other server to shut down as the Critical would be reserved for the host server itself to shut down.

Power Alarm Settings
Power Alarm Settings

For testing I chose to put the alarm settings pretty high, which makes the process quicker and also allows more time for a safe shutdown when on battery power. Apart from that the only way to test is to kill the power from the wall and see what happens, look for the other server setting down first as it will hit the Low battery first, then wait for the host server to shut down later. Expect the host server to last a little longer than expected as with the other server shut down, the battery life doubles on two identical machines when one is off.

]]>
Upgrading RAID Disks https://james-batchelor.com/index.php/2015/05/15/upgrading-raid-hard-disks/ https://james-batchelor.com/index.php/2015/05/15/upgrading-raid-hard-disks/#respond Fri, 15 May 2015 17:10:30 +0000 http://james-batchelor.com/?p=263 Continue reading "Upgrading RAID Disks"]]> The time came when my 1TB drives were full, having a data clearout reclaimed a bit of free space but it was time to upgrade.

The HP Microserver I am running has four HDD bays all populated with 1TB drives in RAID 1 configuration, so to increase capacity I had to replace two of the disks. I went for two Western Digital Green 2TB disks as the 1TB variants I currently had proved reliable.

Moving the data over to a new disk would be tricky, the simplest solution would be to put the old drives into a USB caddy and plug into the server, but I had previously found that USB drives don’t like RAID. But since RAID1 means redundancy, I could tackle this another way…

Step1:

Know your hard drive configuration both in Windows and physically, the disks may have been installed for years and the order you installed them may be long forgotten. The HP Microserver is a compact unit so it’s impossible to follow the SATA cables from the drive to motherboard, so an online search did the trick.

Hard Drive arrangement on a HP Microserver N54L
Hard Drive arrangement on a HP Microserver N54L

Step2:

Knowing the hard drive layout, it’s time to break the RAID mirror by removing a disk and replacing with a larger one. Open the Computer Management window (Right click My Computer and choose Manage) then click Disk Management.

Drive Management Console on Windows 2003
Drive Management Console on Windows 2003

On this system I will be upgrading the volume labelled Data, therefore either Disk 2 or Disk 3 can be pulled out, after shutting the system down of course.

Step3:

After a restart to swap the drives Windows will detect the new blank drive, so a visit to the Disk Management console will greet you with this:

HDD Convert Wizard

Follow the wizard to create a new BASIC partition, perform a quick format in NTFS, assign a drive letter, in this case I kept the label as New Volume.

Step 4:

Time to copy the data to a new drive, I prefer to use the xcopy command line as once run it does not interrupt and stop for user input such as copying system or read only files.

xcopy A: B: /s /c

Where A: represents the old data full drive, and B: the new empty one. Here the /s switch copies all sub-directories, the whole drive in the case of this command, and /c ignores errors that would interrupt the transfer.

The benefit is you can set it to run in the evening and it will copy unattended all night, great as it will take a while for a full 1TB drive.

Once completed its worth looking at the drive space to make sure it’s all transferred. At this size it may be a Gigabyte out but this is good enough.

HDD Properties

Step 5:

Shut down and remove the final remaining old drive, and replace with the other new drive. Upon starting up again the Disk Management now looks a mess:

Disk Management Mess

Not to fear, this requires a little housekeeping. Firstly remove the Missing drives that represent the drive you removed as the wont need to be represented on here anymore, right click on the missing drive’s volume and choose Delete Volume.

Then right click on the Missing drive icon and choose Delete Drive.

Repeat for the second missing volume and the old drives are no more.

Step 6:

Finally it’s time to mirror your new drives, this can be done the same as when your first mirror was set up. Right click the icon for the New Volume, choose Convert To Dynamic Disk

HDD Convert To Dynamic

Then on the Simple Volume right click then Add Mirror, in the pop up dialog select the other new disk, identified as the one with all the Unallocated Space. Allow many hours for the mirror to rebuild and everything is back to normal, with added free space.

HDD 2TB RAID

]]>
https://james-batchelor.com/index.php/2015/05/15/upgrading-raid-hard-disks/feed/ 0
Installing HP Printer on Windows Server 2003 https://james-batchelor.com/index.php/2012/10/22/installing-hp-printer-on-windows-server-2003/ https://james-batchelor.com/index.php/2012/10/22/installing-hp-printer-on-windows-server-2003/#respond Mon, 22 Oct 2012 19:17:24 +0000 http://james-batchelor.com/?p=65 Continue reading "Installing HP Printer on Windows Server 2003"]]> Connecting a printer to a server compared to a desktop system is not as straight forward as it may be perceived. Whether the manufacturers software simply refuses to install on Windows 2003 or insists on adding a load of bloatware on your system, here is how to get around it:

Step 1: Start by downloading the basic version of the drivers from the HP website, choose Windows XP drivers if there are none for Windows 2003

Step 2: Open the executable file, allow it to extract and display the first setup screen. Here, depending on the printer chosen it may let you continue with the setup, or stop the installation there telling you the operating system is not supported.

Photosmart-1

Whatever the installation screen displays, DO NOT CLOSE THE WINDOW, while its open all the files you need are made available. Next navigate to your temp folder. TIP: Go to Start Menu à Run, and type  %temp%. This will bring up your temp files.

Photosmart-2

In the temp folder, look for a folder containing the setup files that were extracted as part of the installation, it will usually have .inf files that contain the printer model as part of the filename, below is an example of the drivers to install a HP C4700:

Photosmart-3
Look for references in the file names that match your printer’s

Step 3: At this point its best to copy (not move) the contents of the folder to a more convenient location. When a copy is made, you can close the installation utility as you have all the files in a new location.

Now navigate to Start > Settings > Printers and Faxes, and then start the Add new printer wizard.

After the intro splash, choose “Local printer attached to this computer” and un-check the box for “Automatically detect and install my Plug and Play printer”

Note: Step 4 is for installing a printer over a network, if you are connecting via USB, skip to step 5.

Step 4: Click next, on the next screen you will want to select “Create a new port” and choose “Standard TCP/IP port” from the drop-down menu, as below:

Photosmart-4

This brings up a new wizard, after the intro splash onto the add port screen, type the IP address of the printer:

Photosmart-5

NOTE: To save reconfiguration in the future, remember to set the printer to have a static IP address as you are not installing the program that find the printer on a dynamic IP address.

The next screen, leave the settings as a “Standard device type” and “Generic network card”. Clicking next brings you to printer software screen.

Step 5: Click the “Have Disk” button and navigate to the copy of the installation files.

Photosmart-6
Choose the most generic file name.

Only .inf files show, and you want to choose the most generic file name that is similar to your device, in this case above hpC4700.inf seems the most obvious.

If the right file has been chosen, you see your printer display as below.

Photosmart-7

If you get a warning message about a digital signature, choose “Continue Anyways”, but make sure you downloaded the drivers from a reputable site, such as the official HP website.

The installation wizards copies the files, then choose to print a test page to make sure all is well, and your HP printer appears in your printers folder.

Photosmart-8

]]>
https://james-batchelor.com/index.php/2012/10/22/installing-hp-printer-on-windows-server-2003/feed/ 0