XFS PVR/DVR maintenance

Last year, I purchased an HDTV tuner card and started using my computer as a Personal Video Recorder, or PVR. Basically, a small program records a tv show to the hard drive. This did quite well until March when it would stop recording after 5 seconds to 15 minutes for no apparent reason.

After about a month of research, I had ruled out just about everything under the sun. Then, it hit me … the file system might need defraging. The file system I am using is XFS, and they can get fragmented over time, especially if you have big files (HD-MPEGs) and little free space.

The command to defrag all mounted (and keeps them read-write) XFS filesystems is:

xfs_fsr -v

After running this, shows started recording better, but still stopped. So, I wanted to see just how fragmented everything was. I found this command:

xfs_db -r /dev/sda3

That starts an interactive XFS debug session for sda3, my XFS partition. Three useful commands are freesp, frag and quit. frag reported over 15% fragmentation and freesp reported a lot of small blocks and very few large blocks.

Finally, I got to the heart of the matter: defrag programs do not operate efficiently with less than a certain amount of free space. My drive had 20GB free out of 250GB total. I deleted a few HD shows to bring it up to 45GB free and ran the defrag command again.

Voila! Less than 6% fragmentation and plenty of free big blocks. My recordings are almost flawless now. At least they don’t stop for no reason. So, if you’ve got an XFS file system:

  • make sure to run the xfs_fsr command regularly
  • if you’re filesystem is still fragmented, burn/remove some junk and repeat

Cool Drag & Drops

If you´ve been working with computers for a bit, you know that you can drag and drop files from folder to folder. What you may now know is that there are plenty more uses for drag and drop. Here´s a 3 very useful drag and drops:

  1. Drag a program from the start menu to the desktop.
    This is great if you use something all the time, but the program did not install a desktop icon. Note: Putting freecell on your desktop may be hazardous to your productivity.
  2. Drag a folder/file/program to the start menu.
    You can´t just drop it anywhere on the start menu, as parts of it were written in stone.
  3. Drag a tab in Firefox to the Bookmark menu.
    This makes bookmarks super easy. You can even drag the tab to the bookmark toolbar.

Pointer Clues

When you drag and drop, your mouse pointer will change. If you are not allowed to drop something somewhere, you will have a no sign (like no smoking). If you are allowed to drop something there, you will have a normal pointer with a dashed box. Usually, a black line will show where the item will drop.

Right-Click Drag and Drop

If you use the right mouse button instead of the left, when you drop the item you will see a little menu. This will ask if you want to copy, move, create a shortcut, or cancel. Most of the time, Windows will move the item. Sometimes a copy is made. If you right-drag it, you can decide.


Sadly, the scroll wheel, sometimes called the middle button, does not drag and drop. It does have some pretty cool uses though, including opening a link in a new tab.

One Final Clickity Note

Always use the left mouse button, unless told specifically to use another button.