Updates from danw Toggle Comment Threads | Keyboard Shortcuts

  • danw 2:29 am on 2017-07-09 Permalink | Reply
    Tags: , storage server, zfs   

    Current storage server 2017 

    My current storage server:
    Sun X2100 M2
    Dual Dual-Core AMD Opteron(tm) Processor 2210
    64GB Ram
    16x WD Red 4TB SATA
    12x Intel 120GB SATA SSD
    Approximately 44TB usable

    zpool list -v tank
    NAME                        SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
    tank                         58T  38.4T  19.6T         -    66%  1.15x  ONLINE  -
      raidz2                     29T  19.2T  9.79T         -
        c7t50014EE2B4CA8F9Bd0      -      -      -         -
        c7t50014EE2B4CAA6D3d0      -      -      -         -
        c7t50014EE2B4D7C1C9d0      -      -      -         -
        c7t50014EE20A2DAE1Ed0      -      -      -         -
        c7t50014EE25F74DD46d0      -      -      -         -
        c7t50014EE25F74EC15d0      -      -      -         -
        c7t50014EE25F74F90Fd0      -      -      -         -
        c7t50014EE25F8307D2d0      -      -      -         -
      raidz2                     29T  19.2T  9.78T         -
        c4t50014EE2B6B2FA22d0      -      -      -         -
        c4t50014EE2B6B3F65Ed0      -      -      -         -
        c4t50014EE2B6B3FB99d0      -      -      -         -
        c4t50014EE20C07E598d0      -      -      -         -
        c4t50014EE20C07F3F3d0      -      -      -         -
        c4t50014EE20C083E31d0      -      -      -         -
        c4t50014EE2615D7ADAd0      -      -      -         -
        c4t50014EE2615D7B2Ed0      -      -      -         -
    cache                          -      -      -      -      -      -
      c7t50015178F3672944d0     112G   112G     8M         -
      c4t50015178F36728A3d0     112G   112G     8M         -
      c0t55CD2E404B4B5CC2d0     112G   112G     8M         -
      c0t55CD2E404B4B5DEFd0     112G   112G     8M         -
      c0t55CD2E404B4B60C3d0     112G   112G     8M         -
      c0t55CD2E404B4B630Ed0     112G   112G     8M         -
      c0t55CD2E404B4899DCd0     112G   112G     8M         -
      c0t50015178F36737E6d0     112G   112G     8M         -
      c0t50015178F367342Fd0     112G   112G     8M         -
      c0t50015178F367348Bd0     112G   112G     8M         -
      c0t50015178F3672954d0     112G   112G     8M         -
      c0t50015178F3672968d0     112G   112G     8M         -
    
     
  • danw 6:45 pm on 2017-06-06 Permalink | Reply
    Tags: ,   

    Fixed OBDII 

    So turns out the reason OBD (and unbeknownst to me the cigarette lighters/power ports) problem was because the fuse (#17 on fuse block on drivers side of dash) was blown. And apparently at some point Ford switched to mini fuses so I had to go buy a new pack of fuses.

    Fixed!

     
  • danw 6:53 pm on 2017-06-03 Permalink | Reply
    Tags: , cleaning,   

    Cleaning up Sport Trac 

    After about 45 minutes I have the driver area almost semi-clean.

    half cleaned steering wheel

    Half cleaned steering wheel


    steering wheel

    Cleaned up steering wheel

     
  • danw 6:34 pm on 2017-06-01 Permalink | Reply
    Tags: ,   

    New (to me) 2004 Ford Explorer Sport Trac 

    Just got a 2004 Ford Explorer Sport Trac from my father.

    Problems so far:

    1. Battery dead
    2. OBD2 doesn’t work
    3. CD stuck in stereo
    4. Smells horrible
    5. Overhead temp/compass display not working
    6. Dirty

    Sport Trac

    Front of Sport Trac

    Sport Trac

    Side of Sport Trac

     
  • danw 3:59 pm on 2015-06-14 Permalink | Reply
    Tags: passwd, script, useradd   

    Script to convert /etc/passwd to useradd command line 

    This is a very simple script to convert a /etc/passwd file to the associated useradd command line that creates the account. Useful for when your brain has turned off and you’re mid migration to a new system. Works with Linux and Solaris.

    #!/usr/bin/perl -w
    use strict;
    
    while(<>) {
      chomp;
      my @a = split /:/;
      print 'useradd ';
      print '-d ' . $a[5] . ' ' if(defined $a[5]);
      print '-m -u ' . $a[2] . ' -g ' . $a[3] . ' ' ;
      print '-c "' . $a[4] . '"' if(length $a[4] > 0);
      if (!defined $a[6]) {
        $a[6] = "/usr/bin/false";
      }
      print ' -s ' . $a[6] . ' ' . $a[0] . "\n";
    }
    
     
  • danw 6:58 pm on 2015-06-06 Permalink | Reply
    Tags: atvs,   

    A tales of two ATVs 

    I bought a “GIO Beast” new a few years ago (Video of a similar one)

    In stock form it has many deficiencies:
    steering darts left and right excessively
    front “shocks” are not real shocks, just stiff springs with shock like appendages
    rear coil-over shock isn’t adjustable
    slow
    rev limited
    seat bracket breaks easily, letting the seat shift around while riding
    axle bearings are substandard
    swing arm bushings are substandard
    carb is too small and has issues
    fuel line degrades and apparently flecks into the fuel
    tank sometimes has welding gunk in it from the factory
    no fuel shut off valve
    tank doesn’t have a petcock, so reserve fuel is not available.
    rack behind seat doesn’t fit exactly
    exhaust is apparently restrictive

    Solutions!
    steering – fine tuning is apparently the way to go here. If I can’t get it good enough I’ll just fab a new a-arms to introduce some castor to the front suspension
    front “shocks” – probably modify shock mounts to allow some cheap real shocks from a Japanese ATV.
    rear shock – again, probably adjust mount to allow a cheap adjustable shock from a Japanese ATV or bike.
    slow – Port exhaust manifold / exhaust pipe meeting point, mikuni carb, “performance” cdi
    seat bracket – custom bracket
    axle bearings –
    swing arm bushings – Yamaha part ???-???-?? is apparently a perfect replacement and of much better quality
    carb – replace with “Mikuni” carb from ebay
    fuel line – replace complete fuel line with fresh from auto parts store
    tank – replace with plastic tank with petcock + reserve from a Japanese ATV
    fuel shutoff valve – tank replacement with petcock
    rack behind seat – use superman like strength to bend metal to fit
    exhaust – buy cheap bumble bee type exhaust, $30 or less.

     
  • danw 3:25 pm on 2014-01-06 Permalink | Reply
    Tags: 3d_printer,   

    starting a delta type 3d printer 

    I’ve ordered a 3d printer (here) and I’ve decided I’m going to use it to bootstrap the build of a Delta style printer that can do larger jobs, over 8 cubic feet.

    I’ve already ordered “The Kraken” (here) a multi-hot-end extruder kit that lets you print four materials in one print job.

    I’m thinking of doing something similar to the 3DR here) but with a print area big enough to do a volume of 8 cubic feet.

    • Kraken hot end (ordered)
    • Aluminium square tubing for frame (RONA)
    • Bearings (Princess Auto)
    • Fasteners with metric threads (RONA)
    • Threaded rod (RONA)
    • Motor controller board (TBD)
    • Brackets (from my own 3d printer!)

    I’m starting on the design now. Even more work to do now.

     
  • danw 10:58 pm on 2014-01-05 Permalink | Reply
    Tags: disk, ,   

    Storage Pod for 2.5&quot; disks 

    I’m a bit of a storage enthusiast and I’ve been trying to find a reasonable cheap way of bulk loading 2.5″ disks. I’ve been decided to make a SAS disk tray for 2.5″ disks with vertical disks, along the line of the Backblaze storage pod (here)

    I stumbled across some reasonably cheap 2.5″, 24 port backplanes with integrated port multipliers (Supermicro BPN-SAS-216EL1 here) and since they were going for less than $200/ea I got 4 of them.

    Basic plan:

    • Chassis from Protocase compatible with HP rail kits
    • HP rail kit
    • four or five 24 disk backplanes
    • 3x 3-pin chassis fans per backplane
    • Redundant power supply
    • some form of power management board for managing the power supply
    • out of band integration with the SAS expanders on the backplanes
    • SFF-8087 to SFF-8088 adaptor plate
    • some custom wiring to provide enough 4-pin molex plugs to the backplanes (most P/S don’t have enough)
    • 3d printed drive sleds for disks
    • 3d printed slots for disks
    • 3d printed brackets for fans

    Sooo… lots of work to do.

     
  • danw 10:54 am on 2011-08-16 Permalink | Reply
    Tags: perl,   

    sarpipe.pl – machine readable solaris sar output 

    I’ve been scripting somewhat with sar on Solaris 10. The major problem is that for some reason there is no flag to output machine readable output (ie. make it easy to import into spreadsheets or other script). The most imporant part was adding a time field to each and every block device to make it much easier to create disk statistics.

    So I threw one together sarpipe.pl:

    #!/usr/bin/perl -w
    use strict;
    
    #default field delimiter/separator
    my $delim = "|";
    
    while($_ = shift @ARGV) {
            if($_ =~ m/--delim/) {
                    #change the default field delimter
                    $delim = shift(@ARGV);
            }
            else {
                    die "Usage: sar [-A...] | $0 [--delim seperator]n";
            }
    }
    
    #preset so we don't get any concat empty val errors
    my $latesttime = "";
    #loop through the sar output
    while(<>) {
            chomp;
            #catch time field of output, remove from line
            if($_ =~ s/^(dd[:]dd[:]dd|Average)//) {
                    $latesttime = $1 . $delim;
            }
            #remove leading and tailing whitespace
            $_ =~ s/(^s+|s+$)//;
            #replace spaces with field delimiter
            $_ =~ s/s+/$delim/g;
            #if the line contains any content, print time field and line
            print $latesttime  . $_ if($_ =~ m/^.+$/);
            print "n";
    }
    

    In use:

    user@example$ ./sarpipe.pl  -h
    Usage: sar [-A...] | ./sarpipe.pl [--delim seperator]
    user@example$ sar -d | ./sarpipe.pl | more
    
    SunOS|bcaeao|5.10|Generic_144488-10|sun4u|08/16/2011
    
    00:00:00|device|%busy|avque|r+w/s|blks/s|avwait|avserv
    
    00:10:01|md110|0|0.0|0|1|0.0|29.9
    00:10:01|md111|0|0.0|0|0|0.0|0.0
    00:10:01|md115|1|0.0|2|30|0.0|15.3
    00:10:01|md116|0|0.0|0|0|0.0|12.8
    00:10:01|md120|0|0.0|0|1|0.0|27.4
    00:10:01|md121|0|0.0|0|0|0.0|0.0
    00:10:01|md125|1|0.0|2|30|0.0|13.4
    00:10:01|md126|0|0.0|0|0|0.0|13.0
    00:10:01|md130|0|0.0|0|1|0.0|0.0
    ...
    Average|ssd35,c|0|0.0|0|0|0.0|0.0
    Average|ssd35,g|1|0.0|2|179|0.0|10.1
    Average|ssd36|0|0.0|0|0|0.0|0.0
    Average|ssd36,a|0|0.0|0|0|0.0|0.0
    Average|ssd36,b|0|0.0|0|0|0.0|0.0
    Average|ssd36,c|0|0.0|0|0|0.0|0.0
    Average|ssd36,f|0|0.0|0|0|0.0|0.0
    Average|ssd36,g|0|0.0|0|0|0.0|0.0
    Average|ssd36,h|0|0.0|0|0|0.0|0.0
    Average|ssd38|0|0.0|1|5|0.0|2.2
    Average|ssd38,c|0|0.0|0|0|0.0|0.0
    Average|ssd38,g|0|0.0|1|5|0.0|2.2
    user@example$ 
    

    As you can see, it just formats the sar output to be easily used. It does not remove empty lines or remove annoying psudo block devices (ssd36,h). The default delimiter is a pipe because a comma would interfere with device names with a comma. If you change the delimiter via command line (–delim) be sure to be aware of shell escapes (eg –delim ! not –delim !).

     
  • danw 11:37 am on 2011-07-13 Permalink | Reply
    Tags:   

    Solaris is cool and stuff 

    While research a problem with backing up Solaris zones I stumbled across a question about Solaris on Serverfault.com.

    And since all the answers didn’t really seem all that good I decided to drop some knowledge:

    This question is funny; this is almost the perfect question for a shill to ask to highlight Solaris 10 new features but no one gave the pro-Solaris answer.

    This is a textbook application of Solaris Zones. The shared kernel provided by Zones lowers the overhead of virtualization, and increases speed dramatically. If you have an idea of a standard install for VPS (bash, apache2, php5, python 2.X, …) you can create a single “gold” zone to use as a template to clone to new zones. Package repositories are available at sunfreeware and blastwave providing you with pre-compiled packages, removing the need to compile your own if you don’t want to.

    You can create your template, charge $X per VPS and clone the template for each new customer, total config time upwards of 5min, 0min if you script/automate it. Upgrading the “global” zone (the base system) will cascade those upgrades into the zones, or you can upgrade per zone, also highly automatable.

    Solaris has kernel space accelerated SSL encryption for supported hardware: expensive cards, Sun/Oracle Niagra2 CPU based systems, and the new Nahalem systems with AES acceleration, which greatly increases the number of SSL protected websites you can host per system (a href=”http://www.c0t0d0s0.org/archives/6926-Performance-Impact-of-kssl.html&#8221; target=”_blank”>link).

    Solaris 10 has many new features in resource management allowing you to segregate individual zones/processes/groups/users and keep runaway or compromised applications in one zone/group/user from impacting any others, as well as all the normal POSIX resource controls on memory use, file descriptors, etc.

    Solaris 10 Zones (and Solaris 10 in general) was designed from the ground up to prove excellent security, accountability, resource management, and to dovetail nicely with Sun (and now Oracle) hardware offerings. When released the Sun T5240 + Sun Solaris + Solaris Zones package was the best platform for page views per second for the money.

    In terms of technical merits, Solaris Zones is probably the best VPS solution available. But as is usually the case the issue is requirements and costs. Licensing, support costs, and Niagra2 or newer CPU hardware costs are rising with the Oracle takeover.

    So evaluate the following: Will the higher VPS density, better VPS isolation and wiz-bang features compensate for higher licensing costs (if using Oracle Solaris), smaller user base to draw peer support from, higher hardware costs (for SSL accel), cost of supporting yet-another-OS, cost of hiring people to support yet-another-OS, the longer time it takes for security patches to get released.

    If you already have a windows team, do you really want to hire a Solaris team just to shave a few percent off of your hardware bill? Stick with Hyper-V until it’ll save you money to switch. If you already have a large deployment of Solaris systems then go with Solaris. If you have a large Linux skill pool to draw on, do a Solaris trial and see how much extra time it takes 3 admins to learn the differences and maintain a new environment for 6 months

    But technology should almost never dictate your business decision process. Much as I hate to say it for most service providers it makes more sense to provide a Windows based VPS system than a Solaris one. Unless you know now that you’re going to need the feature set, and the advantages are going to save you lots of Time And Money(TM) you probably don’t want Solaris.

    But if this isn’t for a business and more about having fun, then go ahead, use Solaris! It’s alot of fun, has tons of features and options that you’ve never even thought of if you’re coming from a non-commercial Unix background. The deeper you get in to Solaris the more you learn about smart engineering and new ways of solving technical problems. I’ve yet to see a Linux box with a “load average: 1000.0+, 1000.0+, 1000.0+” that was responsive and easy to recover.

    @symcbean: I know Solaris (or Slow-laris as it is sometimes called) has a reputation for poor performance (eg your fork example) but I seem to recall that the “Solaris Internals” book said that they re-engineered the threads significantly for Solaris 10, and process creation/forking performance was among the industry leaders. The LWP framework where each thread in an app is mapped to it’s own light weight process in kernel space apparently gave a big boost to performance, reliability, and accounting. The big hurdles for Solaris aren’t so much technical as operational (bad ui), cultural (small user base), and political (Oracle).

    Link to original

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel