Defragmenting XFS file systems on Ubuntu 13.04

After using the XFS file system for a while, you might see it slow down a bit.  If so, you may need to defragment the file system.  Doing so is very easy but does require root access and the xfsdump package:

sudo aptitude install xfsdump

Now that we have the xfsdump package, we can use the xfs_db utility to determine the current fragmentation percentage:

sudo xfs_db -r /dev/sda6
xfs_db> frag
actual 95343, ideal 85809, fragmentation factor 10.00%
xfs_db> quit

As you can see, the estimated fragmentation percentage is 10%. Not bad but let’s get that down:

 sudo xfs_fsr -v /dev/sda6
/home start inode=0
extents before:2 after:1 DONE ino=138
extents before:19 after:1 DONE ino=100725
extents before:17 after:1 DONE ino=103896
extents before:3 after:1 DONE ino=474184
extents before:2 after:1 DONE ino=474183

We can have XFS defrag all the mounted file systems automatically by creating a crontab job in /etc/cron.daily/

#!/usr/bin/env bash
/bin/date >> /var/log/xfs.log
/usr/sbin/xfs_fsr -v 2>&1 >> /var/log/xfs.log
/bin/date >> /var/log/xfs.log
Share Button

FW from My daughter’s first sled ride

Miriam got a fantastic Hanukah present from her daddy.

She loves it, and had a great time being pulled around, first by Uncle Nate, then by Zaydee (grandpa), and finally by daddy.  They stayed on the lawn and sidewalk, and she giggled and laughed!

Then Daddy accidentally took a turn a little fast.

If it had just been snow, she would have been fine, but there was a thin layer of ice on top of the snow, and she face planted onto it.  Poor little Monkey.

She’s fine now.  She only cried because she was startled, and the scratches are almost completely healed now.

It did make for some fun explanations at the Hanukah party last night though.

I think she looked like she got into a fight with a badger, but everyone else says it isn’t so bad.

My poor baby.

She’s fine now though.  :)

There are lots more pictures, as always, on flickr.

Share Button Check out the USB drive -> NAS adapter ($55) and the free Microsoft PowerPoint -> Flash software

Thanks to the all knowing Cali Lewis for hosting!

The Addonics NAS Adapter turns a USB drive in NAS, and it only costs $55.

If you do a lot of Powerpoint presentations, you’ll be happy to hear about iSpring Free. It turns the presentation into a Flash movie that you can embed into a blog post and share.

Share Button

Borderline Scamming being done by software companies

The latest craze from software vendors to companies is to charge for each and every core a machine has regardless of whether or not you’re going to use it.

Get this, if you want to buy a production license for your database/middleware/web server, the vendor (starts with an “S”) wants you to send them the hardware specs of the box.  If you tell them it is a Dell superduper server with 8 quad core CPUs and 96GBytes of RAM but you only will be using a single core for the database and devoting the rest to the middleware/webserver, you STILL have to pay the vendor for all 32 cores (8 CPUs X 4 cores).  Your software license costs is now 32 times MORE what you should have to pay IMHO.

Lots of software companies are now doing this anti-customer practice just to beef up their short term revenues.

What makes them think that you won’t go to another vendor?

  1. Their competitors are probably doing the same sales tactic
  2. They have you by the family jewels, vendor lock in, and it will cost you far too much $$$ to migrate
  3. They think that you’re too stupid and/or timid to call their bluff
  4. FUD that is spread by well meaning and well known folk that don’t know jack about the open source alternatives

Who the hell do they think they are?

Share Button

My daughter, Miriam, is one year old today!

Happy birthday Miriam! 🙂

Share Button

Oops! I spoke too soon! Exchange Plugin 2.24.2 still broken for Evolution

Back on November 5th, I reported that in my blog post Woohoo! Looks like Evolution will be able to connect to Microsoft Exchange again! that the Exchange plugin for Evolution was fixed.  Well, they fixed one part but many of us still aren’t able to use the plugin. 🙁

Bug 306975:  Evolution: Exchange-Connector-setup 2.24.2 unable to log in to exchange

If you are running into this problem, please let it be known on the bug page!

Share Button

Ubuntu 8.10, a tethered Windows Mobile 6 cell phone via USB, Firefox and Pidgin Messenger

To tether a Windows Mobile 6 cell phone (make sure you have a data plan that allows tethering), you will need to install a few things:

sudo aptitude install subversion build-essential linux-headers-`uname -r`

Once those are installed, we need to download and build the latest usb-rndis-lite code:

svn co
cd usb-rndis-lite/
##  remove the existing usb-rndis drivers with
sudo ./
sudo make install

Before you plug in the cell phone, you will need to blacklist the rndis_wlan kernel module:

sudo echo "blacklist rndis_wlan" >> /etc/modprobe.d/blacklist
sudo rmmod rndis_wlan

Plug in your cell phone. If you type “dmesg”, you will see something like the following:

[  152.312099] usb 4-1: new full speed USB device using uhci_hcd and address 3
[  152.500604] usb 4-1: configuration #1 chosen from 1 choice
[  154.138352] rndis0: register 'rndis_host' at usb-0000:00:1d.3-1, RNDIS device (SynCE patched), 80:00:60:0f:e8:00
[  164.441074] rndis0: no IPv6 routers present

This is showing that the phone was found. Let’s take a look at the list of interfaces using ifconfig:

rndis0    Link encap:Ethernet  HWaddr 80:00:60:0f:e8:00  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link
          RX packets:29 errors:46 dropped:0 overruns:0 frame:23
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2097 (2.0 KB)  TX bytes:9146 (9.1 KB)

On the phone, turn on Internet Connection Sharing and connect via USB. Wait a few seconds (obtaining an ip address can take up to a minute or so) then issue the ifconfig command again:

rndis0    Link encap:Ethernet  HWaddr 80:00:60:0f:e8:00  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link
          RX packets:8113 errors:13535 dropped:0 overruns:0 frame:6766
          TX packets:8643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6063101 (6.0 MB)  TX bytes:1890604 (1.8 MB)

Yay! We are connected.

In order to use Firefox, Pidgin or any other software that uses Network Manager, you need to stop the Network Manager daemon:

sudo /etc/init.d/NetworkManager stop

You will be able to use your applications again 🙂

Share Button

FW Model-View-Controller — Misunderstood and Misused

Remember my post Short video clips of Model View Controller (MVC) methodology?  Those wild and crazy guys over at shed more light on the subject:

Posted by kdawson on Tuesday December 02, @03:36PM from the more-mvc-than-thou dept.

paradox1x writes

“Malcolm Tredinnick shares a terrific rant against the misunderstanding and misuse of the Model-View-Controller design pattern. In particular he takes issue with the notion that Django should be considered an MVC framework. He says that ‘It’s as valid as saying it’s a “circus support mechanism,” since the statement is both true, in some contexts, and false in others (you can definitely use Django-based code to help run your circus; stop looking so skeptical).’ I’m not sure I agree with the entire piece, but it is a very good read.”

We recently discussed another look at the bending and stretching of MVC patterns in the world of Web development.

Share Button

FW: Wesley McGrew’s forensics class lecture on ext2/3 (Linux)

I was looking for the exact differences between the Linux file systems EXT2 and EXT3, other than journaling, when I came across Wesley McGrew’s lecture about ext2/3 forensics.  Keep in mind the lecture should be thought of as an Introduction to ext2/3 forensics.

It should be helpful for forensics or to retrieve data from a failing drive.

Slides for a forensics class lecture on ext2/3

Sunday, October 12th, 2008

Tommorow at 8:00AM, I will be giving a lecture to the CSE 4273/6273 Computer Crime and Forensics class here at Mississippi State University.  I was asked to speak on the topic of “Linux Filesystems”, and I have chosen to focus on the ext2 and ext3 filesystem data structures.  The class is using the excellent “File System Forensic Analysis” by Brian Carrier as its textbook, so it’s a great opportunity to cover the chapters on ext2/3 (chapters 14 & 15).

It’s a 50-minute class, and pretty strictly so, since the Information and Computer Security class is held immediately afterwards :).  Due to the limited time I have, I’ve scaled back my coverage of these two chapters to what you see in the following slides.  I’m focusing on the basic data structures used by “extx” to point at files and metadata, such as the superblock, group descriptor tables, and inodes.  I’ve included an example of finding a file on a filesystem using only dd piped through xxd and less, and some discussion of what a forensic examiner or someone tasked with data recovery should be on the look-out for.

Unfortunately with this PDF version of the slides, you won’t see the slick Keynote animations I’ve worked into my lecture.  I’m considering expanding the detail and coverage of this, and recording the slideshow as a video with narration for this site:

Slides – PDF Format

Share Button