• Pages

  • Categories

  • Archives

  • March 14, 2008

    gmirror - 1, 2, 3.

    Filed under: Computers, Misc — digital @ 1:20 pm

    gmirror is one of the ways in which you can setup software RAID under FreeBSD systems. It’s shit simple, but I don’t do it often enough to keep it fresh. I’m putting this here so I can refer back to it when I need it.

    db# dmesg |grep ad
    FreeBSD is a registered trademark of The FreeBSD Foundation.
    uhub0: on usb0
    uhub1: on usb1
    nfe0: Ethernet address: 00:e0:81:72:06:51
    bge0: mem 0xfe5f0000-0xfe5fffff irq 19 at device 0.0 on pci4
    bge0: Ethernet address: 00:e0:81:72:06:50
    ukbd0: on uhub0
    ums0: on uhub0
    ad4: 114473MB at ata2-master SATA150
    ad6: 114473MB at ata3-master SATA150
    ad8: 476940MB at ata4-master SATA300
    ad10: 476940MB at ata5-master SATA300
    Trying to mount root from ufs:/dev/ad4s1a

    That was to see where my drives are. I booted from ad4. ad4 and ad6 are two of the same drive so they will be my mirror.

    Next, I need to get the system to allow me to muck with the drive that is currently in use.

    db# sysctl kern.geom.debugflags=16
    kern.geom.debugflags: 0 -> 16

    After that I begin the real work. I’m going to load the gmirror driver, create the mirror and then add the second drive.

    db# gmirror load
    db# gmirror label -v -b round-robin gm0 /dev/ad4
    Metadata value stored on /dev/ad4.
    Done.
    db# gmirror insert gm0 ad6

    All that looks good, but I’d like this to function on a reboot. In order for that to happen, I need to tell the boot loader to get ready, and point fstab toward the gmirror device rather than either of the specific hard drives.

    db# echo geom_mirror_load=\”YES\” >> /boot/loader.conf
    db# sed s%ad4%mirror/gm0% /etc/fstab > /tmp/fstab

    Now, I check my work.

    db# cat /tmp/fstab
    # Device Mountpoint FStype Options Dump Pass#
    /dev/mirror/gm0s1b none swap sw 0 0
    /dev/mirror/gm0s1a / ufs rw 1 1
    /dev/mirror/gm0s1e /tmp ufs rw 2 2
    /dev/mirror/gm0s1f /usr ufs rw 2 2
    /dev/mirror/gm0s1d /var ufs rw 2 2
    /dev/acd0 /cdrom cd9660 ro,noauto 0 0

    Looks good. Let’s make it happen.

    db# mv /tmp/fstab /etc/fstab

    Now, for the moment of truth.

    db# reboot

    After logging in:

    db# df -h
    Filesystem Size Used Avail Capacity Mounted on
    /dev/mirror/gm0s1a 4.8G 197M 4.3G 4% /
    devfs 1.0K 1.0K 0B 100% /dev
    /dev/mirror/gm0s1e 1.9G 12K 1.8G 0% /tmp
    /dev/mirror/gm0s1f 54G 1.3G 48G 3% /usr
    /dev/mirror/gm0s1d 44G 372K 40G 0% /var
    db# swapinfo
    Device 1K-blocks Used Avail Capacity
    /dev/mirror/gm0s1b 4194304 0 4194304 0%

    Sweet. That wasn’t hard, right?

    The following is JUST the steps I took without any output.

    sysctl kern.geom.debugflags=16
    gmirror load
    gmirror label -v -b round-robin gm0 /dev/ad4
    gmirror insert gm0 ad6
    echo geom_mirror_load=\”YES\” >> /boot/loader.conf
    sed s%ad4%mirror/gm0% /etc/fstab > /tmp/fstab
    mv /tmp/fstab /etc/fstab
    reboot

    There you have it. Plain and simple. Next comes my ZFS games.

    digg:gmirror - 1, 2, 3. blinklist:gmirror - 1, 2, 3. furl:gmirror - 1, 2, 3. reddit:gmirror - 1, 2, 3.


    November 14, 2007

    Samba - Security Policies

    Filed under: Computers — digital @ 11:03 am

    I want to use my Samba PDC to force security policy out to a bunch of desktops. I’ll be investigating that and posting about it soon.

    digg:Samba - Security Policies blinklist:Samba - Security Policies furl:Samba - Security Policies reddit:Samba - Security Policies


    September 4, 2007

    Nice.

    Filed under: Computers — digital @ 8:16 am

    Got to the station last night and found that the drive in my desktop had shit the bed. I was … unthrilled.

    I just happened to have a spare 40GB drive hanging out there at the station so I popped that in and got a fresh XP install on it. That got me a desktop back in short order. I was then happily surprised to find that I had seutp roaming profiles back when I installed Samba and setup the station domain.

    Once I had the machine on the net and logged into it, it sucked down all of my preferences and desktop items and the like. I installed Firefox, Thunderbird and SecureCRT … they were ALL already setup with all of my settings, plugins and such. I was QUITE happy with that.

    It’s encouraged me to setup my home network in the same way. should be a good time I think.

    digg:Nice. blinklist:Nice. furl:Nice. reddit:Nice.


    May 17, 2007

    Nagios

    Filed under: Computers — digital @ 7:15 am

    I just sent this email off to a friend. I decided to save it here for future reference.


    On my way out you commented that Nagios may be in place shortly. If that was in jest, no need to read further. ;)

    Otherwise, here’s a few lessons learned.

    Upon install, the various default config files all have the different bits of the configuration bundled together. That eventually becomes managament hell.

    Avoid it from the very beginning.

    Here’s what I did in the situations that wound up working best for me.
    (This is from memory, so don’t expect the syntax to be correct)

    1) Nagios.cfg

    All that file contains is a few static variables relating to the install. Paths to various bits and the like. It then contains several include lines:

    include - checks.cfg
    include - notifications.cfg
    include - servers/*

    2) checks.cfg

    Contains configuration data on the various health checks that you have created.

    3) notifications.cfg

    Contains data on how to execute each of the notifications that you reference in the other bits.

    4) servers/*

    This is the neat thing. You can tell Nagios to include all .cfg files in a specific directory. In that dir, you have ‘www.domain.com.cfg’, ’smtp.domain.com.cfg’ and the like. In those files you have lines that reference health checks that are defined in ‘checks.cfg’. You can add new ones by cp’ing the files for similar hosts. You can remove hosts by just deleting a single file. This is the real key toward simple management of host monitoring via Nagios.

    This nugget allow for easier automated addition of hosts. If you were really hardcore you could even write up a script that does a daily ping scan of the network. Any new hosts it finds would then be nmaped to gather some data on them and then have a .cfg file created for that host based on data gathered during that scan. That’d be neat.

    That’s all I’ve got for right now, feel free to contact me with any questions you may have.

    digg:Nagios blinklist:Nagios furl:Nagios reddit:Nagios


    May 11, 2007

    End of a long week. Damn.

    Filed under: Computers, Misc — digital @ 4:01 pm

    In theory I might be adding 6GB of RAM to this box tonight. That will be pretty sweet. Hope I can get that done.

    digg:End of a long week. Damn. blinklist:End of a long week. Damn. furl:End of a long week. Damn. reddit:End of a long week. Damn.


    May 1, 2007

    Dell will begin shipping Ubuntu on new PCs?

    Filed under: Computers — digital @ 8:47 am

    I found this article talking about Dell putting Ubuntu on new PCs. I think that would be sweet. I’d like to see them offer FreeBSD as a server option, but am glad to see something non commercial (by which I of course mean not windows) as an option.

    I’d feel much better about ordering my server with Ubuntu on it and then wiping it out and putting FreeBSD in it’s place. I’d be happy to not pay for and then throw away an MS license.

    digg:Dell will begin shipping Ubuntu on new PCs? blinklist:Dell will begin shipping Ubuntu on new PCs? furl:Dell will begin shipping Ubuntu on new PCs? reddit:Dell will begin shipping Ubuntu on new PCs?


    April 26, 2007

    VoIP Phone

    Filed under: Computers, Electronics — digital @ 10:54 am

    I got a Uniden UIP1868 … Right now I have the analog version of that cordless setup. So I believe I can just swap out the base unit and go VoIP throughout the house. We will see how well that works for me. I’ll report back when I have some more data.

    I’ve been working with Orion VoIP, which is a local VoIP start up, and will be getting service through them. We will have to see how well VoIP does for me overall.

    digg:VoIP Phone blinklist:VoIP Phone furl:VoIP Phone reddit:VoIP Phone


    April 20, 2007

    Dell.

    Filed under: Computers — digital @ 7:04 am

    Dell seems to be doing some really sweet shit lately.

    I’ve been looking long and hard at a thinkpad lately. Perhaps I’ll need to reconsider Dell.

    digg:Dell. blinklist:Dell. furl:Dell. reddit:Dell.


    April 9, 2007

    Porn filtering.

    Filed under: Computers, EMS — digital @ 11:14 pm

    I just setup porn filtering at the firehouse. That is going to make me LOTS of friends. Heh. oi.

    digg:Porn filtering. blinklist:Porn filtering. furl:Porn filtering. reddit:Porn filtering.


    March 27, 2007

    Novell scored some points in my book.

    Filed under: Computers — digital @ 6:47 am

    Novell Linux Ad

    digg:Novell scored some points in my book. blinklist:Novell scored some points in my book. furl:Novell scored some points in my book. reddit:Novell scored some points in my book.


    Next Page »
    Proudly powered by wordpress 2.5.1 - Theme by neuro

  • Friends

  • Misc

  • Shopping

  • Meta