January 2003 Archives

Time Traxxing: 465,920 hours to live

|
I've started tracking my time with the Palm titrax program. So, I can send my supervisors reports on how I allocated my time. Working 50-80 hour weeks started making me ask, "How much can one work?" The first question is "How long is one awake?" If you sleep for 8 hours, then that's 16 hours a day that are "yours" (24-8=16). 7 days in the week and thats 112 waking hours (7*16). Consider that my classes want me to study 4-8 hours a week (call it 6). And that leaves me 94 hours. Oh yeah food and travel time; 4 hours per day (4*7=28). Now we have 66 hours. Anyway, you get the jist. But all that is NOTHING compared to the fact that your time here is finite. If you live to be 80 years old and sleep 8 hours every day of your life then you get a total of 465,920 waking hours in which to live (112*52*80).

Firewalls & Change Management

|
Having been through a fair number of firewall fiascos my self. I was a little leary when and org I work with wanted to put one in front of their servers to protect them. Just the expression firewall gives you a feeling of safety doesn't it? But security considerations have to go deeper than that. But more importantly the effect that the firewall is going to have on the systems and the network needs to be reviewed in monotonous detail ahead of time. Even then because humans are just human, you'll still find a few missing pieces that need to be corrected on the firewall config. You need to treat the dropping of a firewall on the net as a registered change to both the network and each system that sits behind it. If the systems are homogenous PC workstations then lucky you. You only have to dream up one set of rules test them in theory and then make the formal change. If you have a whole host of complicated server and don't know what homogony is then your task is much more complicated. For each server decide who can get to it and on what ports. Apply these rules until all the services you want works. A firewall is NOT a plug in bandaid with low time costs to high security payoff. Ironically enough the org with the firewall screwed up a whole bunch of services for people, and still managed to get a worm BEHIND the firewall that brought the network to it's knees one saturday.

Netra X1: Fast Data Access MMU Miss

|
Pieces of crap. I mean I appreciate the mystique of a serial terminal as much as the next geek, but how hard would it have really been to add a vga chip to these boxes? Anyway, you have probably searched all over the net for how to boot your X1, because you keep getting "Fast Data Access MMU Miss". You have to add a user to lom. Read on if you need instructions.


lom>useradd jim
lom>userperm jim crua
lom>userpassword jim
Enter new password: 
Reenter new password: 
Password changed
lom>reset
When the machine starts to come up again use #. to get into lom, login as your new user, and type 'break' to get to the ok prompt. Then you can type 'boot [whatever]' like you'd expect to.

My home network

|
Or an invitation to crack me. Well not really, but with this info you could wreak some havoc on me for a few. But I want people to see what kinds of things you can do with your internet connections. Plus, this is a good point-isp-tech-supp-to-it kind of document. At least hackers would be proof that somebody besides me, inktomi, and google bot read this page.

IDE Bandelero

|
My orignal design for my 220gig logical drive was foiled by the crappy linux support for the ServerWorks IDE controller. It would normally be simple to just use a PCI ide controller and skip using the onboard IDE all together. But nothing is ever simple...

First of this has to be an IDE array. I just can't afford the storage size I need in scsi disks; too expense. But ide cables can't be longer than 18". Many companies make them longer relying on drives and controller being over engineered, but I'm not going to exceed the spec.

Well the ide cable run from a pci card to my hard drive mounts in my 4u rackmount case far excedded 18". Since I can't move the card I had to move the drives. The case is 16.625" wide. Each hard drive is 4" wide. It's a tight fit, but they can go in horizontally just over the motherboard.

This is a great location because it get's me close enough to the IDE controller to run cable. And it keeps the drive in line with the cooling fans. It does make getting to the board a little harder, but with any luck I won't be modifying it for a couple of years.

All the parts are from my local hardware store and most of the tools are borrowed. If you look closely at the pictures you'll see that I actually did two different plates. The first one's drill holes were so screwed up I decided to redo it with photcopied harddrive templates and a steel punch.

I probably spent about 12 hours accross two days on it, but it was WELL worth it. I'm finally comfortable with my linux server and that is important to me as it represents a lot of my work and play.

Promising Promise I Promise

| | Comments (1)
I'm so pleased I could pop. In response to my serverworks woes I bought a maxtor ata 133 card (promise PDC20269 chip). I'm using the 4 IDE drive setup for a total of 220gigs of raid1. But now I'm running UDMA5 (ultra 100) and it rox. Let me tell you...

First off, since the drives can do their own memory writes (DMA) the cpu utilization during a raid sync is substantially reduced. Recall that using PIO modes with serverworks it took 75% of a dual cpu machine to sync the 4 drives. Now it's taking about 10%!

Secondly, the throughput is amazing. Syncing both raid disks I was getting about 650K/sec per ide chain. That was using the barest PIO mode. Now at UDMA5. I'm getting 20,000K/sec!

Wait it get's better! The speed bought me time! Serverworks: A raid sync of both raid1 volumes used to take 3 days! And the disks were unusable during this time. Playing MP3s over samba was choppy. Promise: a raid sync took like an hour! And I could hammer the disks over the network with MP3 copies.

Remember that I'm only using mdadm (not raidtools). It relies heavily on the partition type "Linux Raid autodetect" (fd). This partition type has a superblock to store information about the raid array that the partition is a member of. Thanks to this the kernel's raid autodetect found and reassembled my raid disks without my intervention. Even though they their device names had changed!!

But the really important part isn't all the jazz. It's the stability. The serverworks chip gave me data corruption that ruined my mp3's and lost interrupts that would stall prociesses such that they couldn't be killed and the box had to be rebooted. But now things seem solid. No error messages and no messy configs. I can't really say it's stable until it's been up for a few days, but the kernel mailing list and my firt impression are promising ;)

Ok, enough blabber. Here's the layout.

Promise's kernel messages


PDC20269: IDE controller on PCI bus 02 dev 08
PDC20269: chipset revision 2
PDC20269: not 100% native mode: will probe irqs later
PDC20269: ROM enabled at 0xfebf8000
PDC20269: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
    ide2: BM-DMA at 0xef90-0xef97, BIOS settings: hde:pio, hdf:pio
    ide3: BM-DMA at 0xef98-0xef9f, BIOS settings: hdg:pio, hdh:pio
hde: SAMSUNG SV1204H, ATA DISK drive
hdf: WDC WD1000BB-00CCB0, ATA DISK drive
hdg: SAMSUNG SV1204H, ATA DISK drive
hdh: Maxtor 4W100H6, ATA DISK drive
ide2 at 0xeff0-0xeff7,0xefe6 on irq 22
ide3 at 0xefa8-0xefaf,0xefe2 on irq 22
blk: queue c0332bec, I/O limit 4095Mb (mask 0xffffffff)
hde: 234493056 sectors (120060 MB) w/2048KiB Cache, CHS=232632/16/63, UDMA(100)
blk: queue c0332d38, I/O limit 4095Mb (mask 0xffffffff)
hdf: 195371568 sectors (100030 MB) w/2048KiB Cache, CHS=193821/16/63, UDMA(100)
blk: queue c0332f50, I/O limit 4095Mb (mask 0xffffffff)
hdg: 234493056 sectors (120060 MB) w/2048KiB Cache, CHS=232632/16/63, UDMA(100)
blk: queue c033309c, I/O limit 4095Mb (mask 0xffffffff)
hdh: 195711264 sectors (100204 MB) w/2048KiB Cache, CHS=194158/16/63, UDMA(100)
Partition check:
 hde: hde1
 hdf: [PTBL] [12921/240/63] hdf1
 hdg: hdg1
 hdh: [PTBL] [12182/255/63] hdh1

hdparm -i says...

styx:/var/log# hdparm -i /dev/hd{e,f,g,h}

/dev/hde:

 Model=SAMSUNG SV1204H, FwRev=RK100-12, SerialNo=0504J1ETB06345
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234493056
 IORDY=yes, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive Supports : fastATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 


/dev/hdf:

 Model=WDC WD1000BB-00CCB0, FwRev=22.04A22, SerialNo=WD-WMA9P1031305
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=195371568
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 


/dev/hdg:

 Model=SAMSUNG SV1204H, FwRev=RK100-12, SerialNo=0504J1ETB01647
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234493056
 IORDY=yes, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive Supports : fastATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 


/dev/hdh:

 Model=Maxtor 4W100H6, FwRev=AAH01310, SerialNo=W6H265ZC
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=195711264
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio1 pio2 pio3 pio4 
 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive Supports : ATA/ATAPI-6 T13 1410D revision 0 : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6

hdparm -Tt (speed tests)

styx:/var/log# hdparm -Tt /dev/hd{e,f,g,h}

/dev/hde:
 Timing buffer-cache reads:   128 MB in  0.58 seconds =220.69 MB/sec
 Timing buffered disk reads:  64 MB in  1.70 seconds = 37.65 MB/sec

/dev/hdf:
 Timing buffer-cache reads:   128 MB in  0.58 seconds =220.69 MB/sec
 Timing buffered disk reads:  64 MB in  1.55 seconds = 41.29 MB/sec

/dev/hdg:
 Timing buffer-cache reads:   128 MB in  0.58 seconds =220.69 MB/sec
 Timing buffered disk reads:  64 MB in  1.69 seconds = 37.87 MB/sec

/dev/hdh:
 Timing buffer-cache reads:   128 MB in  0.58 seconds =220.69 MB/sec
 Timing buffered disk reads:  64 MB in  2.14 seconds = 29.91 MB/sec

mdadm -E (raid superblock detail)

styx:/var/log# mdadm -E  /dev/hd{e,f,g,h}1
/dev/hde1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 1bad2420:cdf46c76:42e851fb:0b465e77
  Creation Time : Thu Dec 26 19:01:39 2002
     Raid Level : raid1
    Device Size : 117246400 (111.81 GiB 120.11 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1

    Update Time : Mon Jan  6 01:28:24 2003
          State : dirty, no-errors
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 641ec60a - correct
         Events : 0.22


      Number   Major   Minor   RaidDevice State
this     0      33        1        0      active sync   /dev/hde1
   0     0      33        1        0      active sync   /dev/hde1
   1     1      34        1        1      active sync   /dev/hdg1
/dev/hdf1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : c15f987b:844f49dc:0627f00d:4db465d6
  Creation Time : Thu Dec 26 19:03:54 2002
     Raid Level : raid1
    Device Size : 96155520 (91.70 GiB 98.51 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Mon Jan  6 01:28:24 2003
          State : dirty, no-errors
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : c497ec53 - correct
         Events : 0.26


      Number   Major   Minor   RaidDevice State
this     1      33       65        1      active sync   /dev/hdf1
   0     0      34       65        0      active sync   /dev/hdh1
   1     1      33       65        1      active sync   /dev/hdf1
/dev/hdg1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 1bad2420:cdf46c76:42e851fb:0b465e77
  Creation Time : Thu Dec 26 19:01:39 2002
     Raid Level : raid1
    Device Size : 117246400 (111.81 GiB 120.11 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1

    Update Time : Mon Jan  6 01:28:24 2003
          State : dirty, no-errors
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 641ec60d - correct
         Events : 0.22


      Number   Major   Minor   RaidDevice State
this     1      34        1        1      active sync   /dev/hdg1
   0     0      33        1        0      active sync   /dev/hde1
   1     1      34        1        1      active sync   /dev/hdg1
/dev/hdh1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : c15f987b:844f49dc:0627f00d:4db465d6
  Creation Time : Thu Dec 26 19:03:54 2002
     Raid Level : raid1
    Device Size : 96155520 (91.70 GiB 98.51 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Mon Jan  6 01:28:24 2003
          State : dirty, no-errors
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : c497ec52 - correct
         Events : 0.26


      Number   Major   Minor   RaidDevice State
this     0      34       65        0      active sync   /dev/hdh1
   0     0      34       65        0      active sync   /dev/hdh1
   1     1      33       65        1      active sync   /dev/hdf1

/proc/mdstat

Personalities : [raid1] 
read_ahead 1024 sectors
md1 : active raid1 hdg1[1] hde1[0]
      117246400 blocks [2/2] [UU]
      [=================>...]  resync = 87.6% (102765824/117246400) finish=11.0min speed=21922K/sec
md2 : active raid1 hdh1[0] hdf1[1]
      96155520 blocks [2/2] [UU]
      [===================>.]  resync = 96.0% (92400512/96155520) finish=3.6min speed=16937K/sec
md0 : active raid1 sda1[0] sdb1[1]
      8956096 blocks [2/2] [UU]