SimonAnderson.Net

Just some notes.

Disk Alignment for SQL Server

clock October 12, 2009 19:57 by author Simon

This is the preferred method
wmic partition get BlockSize, StartingOffset, Name, Index


diskpart list partition Output
Repeat:  Use caution when using for alignment info
Offset info is in KB—too imprecise for our purposes
C:\Windows\System32>diskpart
 Microsoft DiskPart version 6.0.6000
  On computer: ASPIRINGGEEK
 DISKPART> list disk
     Disk ###  Status      Size     Free     Dyn  Gpt
   --------  ----------  -------  -------  ---  ---
   Disk 0    Online        93 GB  1024 KB
  DISKPART> select disk 0
 Disk 0 is now the selected disk.
  DISKPART> list partition
   Partition ###  Type              Size     Offset
   -------------  ----------------  -------  -------
   Partition 1    OEM                 47 MB    32 KB
   Partition 2    Primary             10 GB    48 MB
   Partition 3    Primary             81 GB    10 GB
   Partition 0    Extended          2048 MB    91 GB

 


Getting the file allocation unit size
fsutil fsinfo ntfsinfo c:
Output for default NTFS format

C:\>fsutil fsinfo ntfsinfo c:
NTFS Volume Serial Number :       0x3a16ff9d16ff5879
Version :                         3.1
Number Sectors :                  0x000000000a2397ff
Total Clusters :                  0x00000000014472ff
Free Clusters  :                  0x000000000025b76a
Total Reserved :                  0x00000000000051f0
Bytes Per Sector  :               512
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length :           0x0000000007c90000

 

IMPORTANT:  Correlation of Partition Offset & Stripe Unit Size
The following formula must result in an integer value:
Partition_Offset ÷ Stripe_Unit_Size
Note:  Ask your SAN Man (or Woman) for Stripe Unit Size
Example A
Partition Offset = 32,768 bytes (exactly 32KB)
Stripe Unit Size = 65,536 bytes (exactly 64KB)
32,768 / 65,536 = 0.5 
Even though the offset was changed from the default 31.5KB, the partition is still misaligned!
Example B
Partition Offset = 65,536 bytes (exactly 64KB)
Stripe Unit Size = 65,536 bytes (exactly 64KB)
65,536 / 65,536 = 1.0
Good!
Source:  Robert Smith

The stripe unit size must correlate with the file allocation unit size
Here, too, an integer value is required
Example A
Stripe Unit Size = 65,536 bytes (exactly 64KB)
File Allocation Unit Size = 65,536 bytes (exactly 64KB)
65,536 / 65,536 = 1.0 
Good!
Example B
Stripe Unit Size = 262,144 bytes (exactly 256KB)
File Allocation Unit Size = 65,536 bytes (exactly 64KB)
262,144 / 65,536 = 4.0
Good!



How to downgrade your iPhone from 3.1 to 3.0.1

clock September 19, 2009 18:42 by author Simon

How to downgrade your iPhone from 3.1 to 3.0.1

Before you start download the firmware from Apple
 iPhone Software http://appldnld.apple.com/.../iPhone1,2_3.0.1_7A400_Restore.ipsw

Step 1
Enter DFU mode on your iPhone. This is done by holding in the iPhone's Home and Power buttons for 10 seconds, when the iPhone reboots release the power button.
Setp 2
iTunes will detect the phone in Recovery Mode. Click OK to the message window in iTunes.
Step 3
holding down the ALT (Mac) or SHIFT (Windows) click on the restore button. In the window that pop up select the download firmware (above) and click on open.
Step 4
Once the restore is complete to will get an error message (1015 - iPhone has be downgraded), click OK.
Step 5
Hold down the power and home buttons for 15 seconds or until the iPhones Screen is blank. Release the home button and continue holding the power button until the phone turns on (about 2 seconds).

Enjoy your iPhone using the 3.0.1 firmware and internet tethering with Telstra. Hopefully Telstra will support tethering soon.

Download this file to your phone to enable tethering. tether.mobileconfig (1.79 kb)



How to install Webmin on a linux server

clock July 24, 2009 08:32 by author Simon

Works for: Redhat, Caldera, SuSE, Mandrake or MSC Linux

login to your shell and type:

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.350-1.noarch.rpm

Once the 13mb download has finished, install the RPM.

rpm -U webmin-1.350-1.noarch.rpm

Make sure you use a upper case U

The rest of the install will be done automatically to the directory /usr/libexec/webmin, the administration username set to root and the password to your current root password.

You should now be able to login to Webmin at the URL http://localhost:10000/ or http://<serverName>:10000/.

Webmin install complete. You can now login as root with your root password.

Dont forget to restrict access to your site, you dont want your visitors to be accessint your Webmin site.