28 July 2010

Here's a simple description of how to align the start of a windows partition with the start of the physical boundaries of the disk. This is expecially important when using striping with raid 5, 6, 50 and 60. It also does no harm at all with a normal disk partition. This _may_ assist in data recovery if damage occurs, because you now know exactly where the beginning of the partition is located.
Note ** this example is for an additional disk or raid disk added to an existing installed operating system.
To do this on the OS disk itself (C drive) you need to connect the disk to a working Windows OS (possibly using a USB adapter) and create the partition before installing it in your server, then begin the installation and use the created partition to hold the OS.

This is copied from a reply to an article in Techrepublic by user neilb and all credit goes to him.


Well, it's pretty straightforward
Windows reserves and hides the first 31 or 63 sectors at the beginning of the first partition of a disk and puts the master boot record in there. It's not completely Microsoft's fault but it's taken them a HELL of a long time to fix it! This results in misalignment with stripe units, disk controllers, and cache segment lines as the reserved sectors do not coincide with physical boundaries. The obvious result is that single clusters of user data are written across multiple stripe units of the RAID. Every nth operation is affected in that two reads are required to get one allocation unit. 'n', of course, depends on allocation unit size and stripe unit size but every part of the disk system is affected.

To get around this in Server 2003, partition alignment must be explicitly performed using Microsoft DISKPART. Now, you can get realy lairy and calculate the correct offset depending on disk sector size but the easiest way is to start the first partition on a 1MB boundary and that nails it for just about any combination. That's 2048 sectors.

Diskpart is a command line tool so...

Diskpart [enter]
List Disk [enter] will display the disks
Select Disk n [enter] (where n is the disk in which you wish to create the partition)
create partition primary align=1024 [enter]
exit [enter]

Then go on and format the parttiion in the GUI

happy

This is absolutely mandatory for anything with a database running on RAID - Exchange, SQL, Oracle, whatever.

http://support.microsoft.com/kb/929491

13 July 2010

VMware - Fixing Time Keeping Problems with the Guest OS
Here is an option that worked for us when the Linux guest on the Linux host was running fast. (gaining about 10 seconds every two minutes)
This problem occurs because current VMware for Linux products do not have complete support for host power management features (such as Intel SpeedStep, or AMD PowerNow or Cool'n'Quiet) that vary the processor speed. To work around this problem, specify the correct maximum CPU speed in your global configuration file. This can be done on either a Windows host server or a Linux host server.

On a Windows host server:

1.
Find the speed of your host's CPU. For example, in Windows XP, right click My Computer, then choose Properties. This path may be different, depending on the version of Windows you use.

2.

Look for config.ini in one of the following locations:
*

C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini
*

C:\Documents and Settings\All Users\Application Data\VMware\VMware GSX Server\config.ini
*
C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini

*
C:\ProgramData\VMware\VMware Workstation or
C:\Program Files\VMware\VMware Workstation
(on a Windows Vista host running Workstation 6.0)


3.

Edit config.ini, adding the lines described below.

host.cpukHz = "X" where "X" equals the maximum speed in KHz of your host machine. That is, its speed in MHz times 1000 or its speed in GHz times 1000000. A 3GHz machine would be 3000000.
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"

The second and third lines enable a mechanism that tries to keep the guest clock accurate even when the time stamp counter (TSC) is slow.
Note: On Windows, you can use Notepad, but be careful when you save the file that Notepad does not add an extra .txt extension to the filename. You can do that by selecting All files instead of Text files in the Save dialog box.

4.

In addition, check the VMware Tools control panel in the guest operating system. On the Options tab, ensure that Time synchronization between the virtual machine and the host operating system is selected.

On a Linux host server:

To prevent guest clocks from running too quickly, specify the correct maximum host CPU speed in your global configuration file, /etc/vmware/config. If this file exists, edit it with a text editor, adding the lines described below. The file may not exist. If it does not exist, create it as a plain text file.

Add the following lines to your global configuration file:

host.cpukHz = "X" where "X" equals the maximum speed in KHz of your host machine. That is, its speed in MHz times 1000 or its speed in GHz times 1000000. A 3GHz machine would be 3000000.
host.noTSC = TRUE
ptsc.noTSC = TRUE

To periodically correct the time (once per minute) when a guest clock runs slowly, VMware Tools must be installed in the guest. On the Options tab of VMware Tools in the guest, verify that Time synchronization between the virtual machine and the host operating system is selected.

I found this post after much searching, and with the dynamic nature of the internet didn't want to lose it's information, so I have copied it here.

All thanks and Kudos to the following Gentlemen who is the original poster.
Published Friday, August 24, 2007 8:25 PM by David Marshall
Filed under: General News (in vmblog.com)

09 April 2010

Command Line Scanner - Wilders Security Forums

Command Line Scanner - Wilders Security Forums
At the bottom of this page is a post that explains how to set ESET command line scanner (ecls.exe) to work with winrar as it's internal virus scanner.

08 April 2010

Index of /pub/samba/3.3/centos/5/i386

Here's a possible answer to connecting Windows 7 workstations to a centos 5 domain controller.
It is the sernet rpm repository.
The CentOS 5 forums or wiki will be able to help you regarding using 3rd party yum repositories . I will put it to the test soon and report on the result. That post may be a week or so in the future. Which may be the next post, considering how often I update this blog. :-)

Update 28-04-2010
Total success using the sernet rpm's. Method was to backup the /etc/samba and the /var/spool/samba directories into .tgz archives, using tar with --preserve to keep all file permissions. (just in case!)
Next I downloaded the necessary rpm files from sernet into an empty directory, and manually found the required dependencies by doing an rpm -Uvh *.rpm --test and then downloading the extra files from the sernet repository and doing rpm -Uvh *.rpm --test until no errors were shown.
I was uncertian if an upgrade (rpm -Uvh *.rpm) would be successful. However serching the internet for others who also upgraded their samba this way indicated an upgrade was the way to go. So having considered the actions required to restore the system to the present status, and knowing I had the tools and the data to achieve this. I did the rpm -Uvh *.rpm in the sernet rpm directory.
the upgrade proceeded with no errors. I needed to do a "service samba start" to get things rolling. Also required was "chkconfig --add samba" and "chkconfig samba on" to bring things back to where they were with samba auto starting at boot-up.
Testing with Windows 7 workstations joining the domain showed it was indeed doing what was expected. the workstations now conencted to the domain.
A happy ending to the CentOS 5 Server and Windows 7 Workstation saga.
You could simply enable the sernet repository and do "yum upgrade samba", however I chose this method so I knew exactly what was going to happen, rather than hope yum got it right. (which it mostly does)