Angelo’s blog

A systems administrator’s diary
  • rss
  • Home
  • About me
  • Computers
  • Bibliography
  • Guides
    • IPSec VPN using FreeBSD
    • Setting up OpenVPN using radius on FreeBSD
    • Protect OWA using a reverse proxy
    • Monitoring a Windows machine with extended counters
  • Résumé

Drop all extended properties in a MSSQL database

February 25, 2010 | 1:42 pm

Sometimes you change columns in a table, and Access starts moaning about the missing column.. Probably Access added some extended properties to tables and/or column, and here’s how to drop them. Keep in mind these all start with MS_..

This script will create a drop statement for all the tables and column. Read the result through carefully, and proceed at your own risk:

--tables
select 'EXEC sp_dropextendedproperty
@name = '''+name+'''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id)
from sys.extended_properties
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id = 0
union
--columns
select 'EXEC sp_dropextendedproperty
@name = '''+sys.extended_properties.name+'''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id) + '
,@level2type = ''column''
,@level2name = ' + columns.name
from sys.extended_properties
join sys.columns
on columns.object_id = extended_properties.major_id
and columns.column_id = extended_properties.minor_id
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id > 0

Comments
No Comments »
Categories
Microsoft
Comments rss Comments rss
Trackback Trackback

Graphing requests per second out of apache log files

March 19, 2009 | 11:00 am

I’ve been doing some analysis on some log files I got from a client. Since I have to propose an infrastructure that can support these web applications, I’d like to do some reconnaisance first, and see what the traffic is, and how many requests/sec are actually happening. Are we talking 10 req/s or 1000 req/s?

So, I wrote some scripts to graph out the requests/sec from an apache logfile, and I want to share this with you.

First of all, I want to merge the logfiles, so I get one big log file of all cluster nodes. For this, I use the logresolvemerge.pl script that comes with AWStats.

perl logresolvemerge.pl example.node1.log example.node2.log > example.log

Then basicly what I do, is I sort the log file (aparently apache log files are not really chronologic, probably because of the difference between the time a request is made, and the time a request is completed), then I run a script to get the number of requests per minute using this requests.rb script. I then create an rrd file, post all the information about the requests per minute into it, and then I export graphs :)

To sort the logfile, save this script as _sortlog.sh (you might want to use another location than ~/tmp as temporary sorting dir:

#!/bin/sh
if [ ! -f $1 ]; then
    echo "Usage: $0 "
    exit
fi
echo "Sorting $1"
sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n -T ~/tmp $1 > $2

Here’s a complete script. Keep in mind I use FreeBSD, so on other *nix flavours you might have to change the script a bit (use expr instead of gexpr, etc). Requirements are the _sortlog.sh script and the requests.rb script mentioned above, and on FreeBSD the packages gexpr and rrdtool12 (or maybe rrdtool 1.3 wil word as well). The 4 timestamps mentioned in the script are for the exporting of the graphs. (My blog will replace straigt double quotes with the curly ones as well, you should replace them back):

#/bin/sh
#ERROR HANDLING
if [ $# -ne 1 ]; then
    echo "Usage: $0 "
    exit
fi
LOGFILENAME=`basename $1 .log`
TIMESTAMP_WEEK_BEGIN=1236654000
TIMESTAMP_WEEK_END=1237258800
TIMESTAMP_DAY_BEGIN=1237071600
TIMESTAMP_DAY_END=1237158000
echo "`date` started script for log $LOGFILENAME.log.."
#SORTING
echo `date` sorting log file "$LOGFILENAME".log to "$LOGFILENAME"_sorted.log..
sh _sortlog.sh "$LOGFILENAME".log "$LOGFILENAME"_sorted.log
#GETTING REQUESTS
echo `date` calculating requests per minute in file "$LOGFILENAME"_requests.txt..
cat "$LOGFILENAME"_sorted.log | ./requests.rb > "$LOGFILENAME"_requests.txt
#CREATING RRD
echo `date` making script "$LOGFILENAME"_createrrd.sh..
FIRSTTIMESTAMP=`head -n 1 "$LOGFILENAME"_requests.txt | awk '{print $1}'`
FIRSTTIMESTAMP=`gexpr "$FIRSTTIMESTAMP - 60"`
echo rrdtool create $LOGFILENAME.rrd \\ > "$LOGFILENAME"_createrrd.sh
echo --step 60  \\ >> "$LOGFILENAME"_createrrd.sh
echo --start $FIRSTTIMESTAMP \\ >> "$LOGFILENAME"_createrrd.sh
echo DS:requests:ABSOLUTE:60:0:U \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:AVERAGE:0.5:1:500 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:AVERAGE:0.5:1:600 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:AVERAGE:0.5:6:700 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:AVERAGE:0.5:24:775 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:AVERAGE:0.5:1440:3985 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MIN:0.5:1:600 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MIN:0.5:6:700 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MIN:0.5:24:775 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MIN:0.5:1440:3985 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MAX:0.5:1:500 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MAX:0.5:1:600 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MAX:0.5:6:700 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MAX:0.5:24:775 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:MAX:0.5:1440:3985 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:LAST:0.5:1:600 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:LAST:0.5:6:700 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:LAST:0.5:24:775 \\ >> "$LOGFILENAME"_createrrd.sh
echo RRA:LAST:0.5:1440:3985 >> "$LOGFILENAME"_createrrd.sh
echo `date` deleting "$LOGFILENAME".rrd..
rm "$LOGFILENAME".rrd
echo `date` executing script "$LOGFILENAME"_createrrd.sh..
sh "$LOGFILENAME"_createrrd.sh
 
#DO THE UPDATES
echo `date` making script "$LOGFILENAME"_updaterrd.sh..
rm "$LOGFILENAME"_updaterrd.sh
cat "$LOGFILENAME"_requests.txt | while read line; do
  AWKSTRING="{print \"rrdtool update $LOGFILENAME.rrd \" \$1 \":\" \$2}"
  echo `echo ${line} | awk "$AWKSTRING"` >> "$LOGFILENAME"_updaterrd.sh
done
echo `date` executing script "$LOGFILENAME"_updaterrd.sh..
sh "$LOGFILENAME"_updaterrd.sh
# MAKING GRAPH
echo `date` making script "$LOGFILENAME"_graph_week.sh..
echo /usr/local/bin/rrdtool graph "$LOGFILENAME"_week.png \\ >  "$LOGFILENAME"_graph_week.sh
echo --imgformat=PNG \\ >> "$LOGFILENAME"_graph_week.sh
echo --start=$TIMESTAMP_WEEK_BEGIN \\ >> "$LOGFILENAME"_graph_week.sh
echo --end=$TIMESTAMP_WEEK_END \\ >> "$LOGFILENAME"_graph_week.sh
echo --title=\"$LOGFILENAME requests\" \\ >> "$LOGFILENAME"_graph_week.sh
echo --rigid \\ >> "$LOGFILENAME"_graph_week.sh
echo --base=1000 \\ >> "$LOGFILENAME"_graph_week.sh
echo --height=120 \\ >> "$LOGFILENAME"_graph_week.sh
echo --width=500 \\ >> "$LOGFILENAME"_graph_week.sh
echo --alt-autoscale-max \\ >> "$LOGFILENAME"_graph_week.sh
echo --lower-limit=0 \\ >> "$LOGFILENAME"_graph_week.sh
echo --vertical-label=\"requests per second\" \\ >> "$LOGFILENAME"_graph_week.sh
echo --slope-mode \\ >> "$LOGFILENAME"_graph_week.sh
echo --font TITLE:9:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_week.sh
echo --font AXIS:7:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_week.sh
echo --font LEGEND:8:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_week.sh
echo --font UNIT:7:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_week.sh
echo DEF:a=\"$LOGFILENAME.rrd\":requests:AVERAGE \\ >> "$LOGFILENAME"_graph_week.sh
echo DEF:b=\"$LOGFILENAME.rrd\":requests:LAST \\ >> "$LOGFILENAME"_graph_week.sh
echo DEF:c=\"$LOGFILENAME.rrd\":requests:MIN \\ >> "$LOGFILENAME"_graph_week.sh
echo DEF:d=\"$LOGFILENAME.rrd\":requests:MAX \\ >> "$LOGFILENAME"_graph_week.sh
echo AREA:a#6EA1007F:\"HTTP Requests\"  \\ >> "$LOGFILENAME"_graph_week.sh
echo GPRINT:b:LAST:\"Current\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_week.sh
echo GPRINT:a:AVERAGE:\"Average\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_week.sh
echo GPRINT:d:MAX:\"Maximum\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_week.sh
echo LINE1:a#6EA100FF:\"\" >> "$LOGFILENAME"_graph_week.sh
echo `date` executing script "$LOGFILENAME"_graph_week.sh..
sh "$LOGFILENAME"_graph_week.sh
 
echo `date` making script "$LOGFILENAME"_graph_day.sh..
echo /usr/local/bin/rrdtool graph "$LOGFILENAME"_day.png \\ >  "$LOGFILENAME"_graph_day.sh
echo --imgformat=PNG \\ >> "$LOGFILENAME"_graph_day.sh
echo --start=$TIMESTAMP_DAY_BEGIN \\ >> "$LOGFILENAME"_graph_day.sh
echo --end=$TIMESTAMP_DAY_END \\ >> "$LOGFILENAME"_graph_day.sh
echo --title=\"$LOGFILENAME requests\" \\ >> "$LOGFILENAME"_graph_day.sh
echo --rigid \\ >> "$LOGFILENAME"_graph_day.sh
echo --base=1000 \\ >> "$LOGFILENAME"_graph_day.sh
echo --height=120 \\ >> "$LOGFILENAME"_graph_day.sh
echo --width=500 \\ >> "$LOGFILENAME"_graph_day.sh
echo --alt-autoscale-max \\ >> "$LOGFILENAME"_graph_day.sh
echo --lower-limit=0 \\ >> "$LOGFILENAME"_graph_day.sh
echo --vertical-label=\"requests per second\" \\ >> "$LOGFILENAME"_graph_day.sh
echo --slope-mode \\ >> "$LOGFILENAME"_graph_day.sh
echo --font TITLE:9:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_day.sh
echo --font AXIS:7:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_day.sh
echo --font LEGEND:8:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_day.sh
echo --font UNIT:7:/usr/local/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \\ >> "$LOGFILENAME"_graph_day.sh
echo DEF:a=\"$LOGFILENAME.rrd\":requests:AVERAGE \\ >> "$LOGFILENAME"_graph_day.sh
echo DEF:b=\"$LOGFILENAME.rrd\":requests:LAST \\ >> "$LOGFILENAME"_graph_day.sh
echo DEF:c=\"$LOGFILENAME.rrd\":requests:MIN \\ >> "$LOGFILENAME"_graph_day.sh
echo DEF:d=\"$LOGFILENAME.rrd\":requests:MAX \\ >> "$LOGFILENAME"_graph_day.sh
echo AREA:a#6EA1007F:\"HTTP Requests\"  \\ >> "$LOGFILENAME"_graph_day.sh
echo GPRINT:b:LAST:\"Current\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_day.sh
echo GPRINT:a:AVERAGE:\"Average\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_day.sh
echo GPRINT:d:MAX:\"Maximum\\:%8.0lf\"  \\ >> "$LOGFILENAME"_graph_day.sh
echo LINE1:a#6EA100FF:\"\" >> "$LOGFILENAME"_graph_day.sh
echo `date` executing script "$LOGFILENAME"_graph_day.sh..
sh "$LOGFILENAME"_graph_day.sh
 
echo `date` done

You can run this script using the command:

$ ./go.sh example.log

And the output would look like:

Wed Mar 18 17:30:30 CET 2009 started script for log example.log..
Wed Mar 18 17:30:30 CET 2009 sorting log file example.log to example_sorted.log..
Sorting example.log
Wed Mar 18 17:54:23 CET 2009 calculating requests per minute in file example_requests.txt..
Thu Mar 19 03:22:42 CET 2009 making script example_createrrd.sh..
Thu Mar 19 03:22:42 CET 2009 deleting example.rrd..
rm: example.rrd: No such file or directory
Thu Mar 19 03:22:42 CET 2009 executing script example_createrrd.sh..
Thu Mar 19 03:22:42 CET 2009 making script example_updaterrd.sh..
rm: example_updaterrd.sh: No such file or directory
Thu Mar 19 03:23:10 CET 2009 executing script example_updaterrd.sh..
Thu Mar 19 03:23:27 CET 2009 making script example_graph_week.sh..
Thu Mar 19 03:23:27 CET 2009 executing script example_graph_week.sh..
595×199
Thu Mar 19 03:23:27 CET 2009 making script example_graph_day.sh..
Thu Mar 19 03:23:27 CET 2009 executing script example_graph_day.sh..
595×199
Thu Mar 19 03:23:27 CET 2009 done

Note the requests.rb file can take long, the above output was for an 18GB file. The graphs will perhaps look like this:

example_day
example_week

Comments
3 Comments »
Categories
Linux/Unix, Misc
Comments rss Comments rss
Trackback Trackback

Seamless patterns

March 15, 2009 | 10:57 pm

patternsava7If you are ever in need of a new background pattern, this is the place to be.. They have around a thousand of free background patterns, and with a single click you can change the page’s background pattern. Sweet, I found one for this blog as well :)

Comments
No Comments »
Categories
Misc
Comments rss Comments rss
Trackback Trackback

Protect OWA using a reverse proxy

November 24, 2008 | 11:50 pm

Sometimes you just have a single public IP address (unfortunately ipv6 is not that widespread yet), and you still want to publish stuff like Outlook Web Access and other applications to the net in a secure way. If you want that, the easiest way to do so, is to just pass port 443 to the Exchange server. But this means that if you have other web apps, you have to run them on the Exchange server as well. And besides, not everybody wants to put an IIS machine directly out on the net..

One way to solve that, is by putting a reverse proxy like Apache or Squid in front of it. Read more ..

Comments
No Comments »
Categories
Linux/Unix, Microsoft, Security/privacy
Comments rss Comments rss
Trackback Trackback

EU MEP’s caught red-handed

June 29, 2008 | 7:39 am

For the first time in a while I’m really, really angry again over something I saw.

What you see in the next video, is members of the European parliament, coming into the office in the morning to sign in to work, and then leave immediately. This way, they can get up to 14.000 EUR per month, by doing nothing..

They are clearly committing fraud, stealing MY money, and all the other tax payers’. And what makes me even more angry, is the way these people respond. They do not take responsibility like politicians should, they act like 3 year-olds caught with their hand in the cookie jar.

Irish MEP Kathy Sinnott threatens the reporter, and German MEP Hiltrud Breyer almost hits her head in a wall, because she wants to put her head in the sand so badly. Look at her, she’s a total disgrace to the EU. These people are our politicians! Where’s the pride, where’s the backbone?

And of course, even though the reporter, Herr Meier, apparently has the right to film in the hall, he’s thrown out nonetheless..

I really hope the MEP’s in this footage will be fired, arrested and charged with fraud, but of course they won’t. Most likely they’ll just get another warning, and nothing happens.

Here’s the video.

Comments
No Comments »
Categories
Misc
Comments rss Comments rss
Trackback Trackback

Convert .bin/.cue to .iso on Mac OSX

February 23, 2008 | 11:46 am

I stumbled upon this blog entry, where someone describes how to convert bin+cue to iso. I had the same problem as him:

While setting up a new VMWare image I found myself needing to convert an old .bin/.cue disk backup to iso format. Looking for a simple command line utility I came across BinChunker, a GPL-licensed *nix source that fit the bill to the tee. The official site has the source code and RedHat RPM’s but nothing for OS X.

A quick compile took care of that — BinChunker for OS X.

Download the utility, extract it to your Home directory and issue the following command from a shell prompt:

sudo cp bchunk /usr/bin/

To make sure your newly installed utility has the correct execute permissions and that its accessible to you through the terminal, run this code:

sudo chmod a+x /usr/bin/bchunk

To convert a .bin/.cue pair to a .iso, you can issue this command:

bchunk myinputfile.bin myinputfile.cue myoutputfile

If you are getting a not found error, make sure that /usr/bin/ is in your path. To check this, type echo $PATH and look for /usr/bin/ in the result. If it isn’t there, type sudo nano /etc/profile and add /usr/bin; to the PATH=… line. Then press CTRL+x followed by Y to confirm and the enter key to verify the filename to save and exit nano. Then execute source /etc/profile to refresh the path.

Comments
3 Comments »
Categories
Mac
Comments rss Comments rss
Trackback Trackback

Adding drivers to WDS boot images

February 18, 2008 | 10:56 pm

I wanted to install Windows Server 2008 on some of our servers (Dell PowerEdge 2850′s and 2950′s), but I soon ran into some problems. The DRAC4 in the 2850′s is enormously s-l-o-w, and on the 2950′s, the Windows Server 2008 setup does not recognize the virtual DVD drive that comes with the DRAC5. Joy. I only want to do installations over the network or DRAC’s, because the servers I’m testing on are in our datacenter, 150km away. And I just want to play around for a hobby, not being in a car half the evening to sit in a loud server room flipping cd’s :)

Finally, I installed Windows Server 2008 inside a ESX Server virtual machine (works like a breeze, very fast installation), and I installed WDS (Windows Deployment Services), to enable network installations of Windows Server 2008. It really looks nice, and hell of a lot easier than when I last played with RIS, about 4-5 years ago!

I installed the 2850 quite fast over the network (boot from PXE enabled network card, press F12, and off you go), but the 2950 gave me some headaches. It would boot of PXE, but then the installer whould stop, showing only an error: WdsClient: An error occurred while starting networking: a matching network card driver was not found in this image. Please have your Administrator add the network driver for this machine to the Windows PE image on the Windows Deployment Services server.

After googling, I found out I could do shift+F10 to get a console window, and the ipconfig command showed me that the setup was only recognizing the add-in Intel NIC’s, not the onboard Broadcom NIC’s (which are the only ones connected right now).

So I googled and tried for a few hours, and finally, I got to integrate the Broadcom drivers into the boot.wim boot image. (User ‘ozymandeus’ gave the answer in this topic.)

I download the RIS drivers for the Broadcom Netxtreme II from their site. Watch it, the RIS drivers are under a seperate header on the download page. In the following example, I extracted the two files to c:\bc.

On the WDS server, I downloaded and installed the Windows AIK (1GB download, mount with daemon-tools). In the WDS console, I exported the boot image (I only have a x64 boot image) to c:\boot.wim.

I mounted the image to an empty directory, c:\ff.

> imagex /mountrw c:\boot.wim 1 c:\ff

Add the drivers to the image:

> peimg /inf=c:\bc\b06nd.inf c:\ff

Unmount and commit the changes:

> imagex /unmount /commit c:\

Then, I did the same for image 2 in the boot.wim file:

I mounted the image to an empty directory, c:\ff.

> imagex /mountrw c:\boot.wim 2 c:\ff

Add the drivers to the image:

> peimg /inf=c:\bc\b06nd.inf c:\ff

Unmount and commit the changes:

> imagex /unmount /commit c:\

Then, I replaced the boot.wim file in the WDS console, I booted my 2950, and tadaaaa! Installing!

Comments
16 Comments »
Categories
Hardware, Microsoft
Comments rss Comments rss
Trackback Trackback

Windows Server 2008 RTM

February 7, 2008 | 9:09 am

untitled-1.jpg

Finally, it’s on the MSDN! They first put the x64 version of Standard, Enterprise and Datacenter on the MSDN, and they will be publishing the other versions later.

Looks like MS really did a great job on server capacity,I downloaded this DVD at 4.2MB/s (yes, thats 33.6Mbps).

Because I’m so busy I don’t have time to upgrade machines here and there (and I do want to wait a while), but new projects will run on Windows Server 2008 and IIS7!

Comments
No Comments »
Categories
Misc
Comments rss Comments rss
Trackback Trackback

TrueCrypt 5.0 released

February 6, 2008 | 4:25 pm

Quote from Slashdot:

1202285284.png“The popular open source privacy tool, TrueCrypt, has just received a major update. The most exciting new feature provides the ability to encrypt an entire drive, prompting the user for a password during boot up; this makes TrueCrypt the perfect tool for non-technical laptop users (the kind who are likely to lose all of that sensitive customer data). The Linux version receives a GUI and independence from the kernel internals, and a Mac version is at last available too.”

Comments
No Comments »
Categories
Linux/Unix, Mac, Security/privacy
Comments rss Comments rss
Trackback Trackback

FreeBSD running on CF card

December 6, 2007 | 9:10 am

hsz3060_com_d_en_sff.jpgMy firewall/asterisk/mail scanner is a Compaq Deskpro EN/SFF, a very small Pentium III 500 box, with 256MB RAM and a 13GB ATA disk. I am very happy with it, since it scans inbound and outbound email all day using amavisd-new, spamassassin and ClamAV, and at the same time I can call through asterisk without a glitch. And it also runs OpenVPN server, DHCP server, BIND, NTP daemon, IPv6 tunnel, PF firewall with QoS, etc. And all that with only 30W power consumption! On auction sites, they go for around 25-30 EUR a piece. You don’t get a Cisco router with that flexibility and features for that price :)

The thing that annoyed me, was the fact that the disk made an annoying high-pitch sound. I could replace it with another drive, perhaps a 2.5″ laptop harddisk, to reduce the noise, but eventually, I decided to go for a CF-card. The CF thing was kind of new to me, but after reading for a while, it looks like the CF card with an adapter just shows up as an IDE disk, and that’s it, bootable and all.So I went out and bought a CF to IDE adapter and an 8GB Sandisk CompactFlash Extreme III card. The adapter is quite cool, you can mount it in a floppy bay, or you can mount it at the back of you PC between the PCI slots, so you can just eject the card from the back or the front. (Well, looking up the product I bought on John’s site reveals more similar adapters to me, I think afterwards this adapter would have been cheaper, even though I’m not sure if it would fit in the small form factor PC.)

I installed the card, and after some fiddling with cables and jumpers, FreeBSD saw it as my second disk. I then stopped all network services, created a new slice on it and created partitions/labels with sysinstall. I then did a dump/restore to copy the partitions from the old disk to the new disk. After that was done (took quite a while, played some CoD4 while waiting), I rebooted the machine using only the CF card, fixed the missing /tmp filesystem, and rebooted again, and that’s it, the machine was op and running again! The only way to tell it’s running is the light on the front of the machine, because it’s now dead silent :)

And the performance is not as bad as I thought. I used diskinfo to do some simple and naive tests. The old disk (12407MB <Maxtor 91301U3 FA570480> at ata0-master UDMA33) has seeks time of up to 22ms, and a tranfer rate of up to 24MB/s. The new disk (7815MB <SanDisk SDCFX3-8192 HDX 4.03> at ata1-master WDMA2) had seek times of under 0.5ms, and a steady transfer rate of 15MB/s. The CF card feels fast and snappy as well, probably because of the low seek times..

Comments
No Comments »
Categories
Hardware, Linux/Unix
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Pages

  • Guides
    • IPSec VPN using FreeBSD
    • Monitoring a Windows machine with extended counters
    • Protect OWA using a reverse proxy
    • Setting up OpenVPN using radius on FreeBSD

Categories

  • Games
  • Hardware
  • Linux/Unix
  • Mac
  • Microsoft
  • Misc
  • Security/privacy
  • Virtualization

Archives

  • February 2010
  • March 2009
  • November 2008
  • June 2008
  • February 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • May 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • October 2006

Friends' sites

  • ErwinK’s site
  • Jef’s site
  • Judith’s site

Work

  • NetMatch
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox