Mobile Data On Disk

Today I thought I would show you a neat trick you can do with your PC or laptop and a blank CD or DVD.  Using something that Microsoft calls their Live File System, you can create or format a blank disk that will then allow you to use that disk (while it is in your disc drive) just like you would use a floppy disk or USB flash drive.  You can copy files to and from the disk, erase files you no longer need, etc.  All without “burning” files like you might be used to, just drag and drop right from Windows Explorer or whatever your favorite file manager might be.

There are some caveats with this, it appears that creating these disks is something you can do on Windows 7 machines only.  However, once created, they can be read on Windows versions going back to Windows XP and in some cases even Windows 98.  There is a URL at the bottom of the article that will take you to a Microsoft page with more information.  In addition, the reason I so far have only said CD, DVD and disk without getting specific is because you can create this kind of disk on standard writable media (-R) as well as re-writable media (-RW) meaning the list of disks you can format for mobile data storage starts to get kinda long, like so: CD-R, CD+R, CD-RW, DVD-R, DVD+R, DVD-RW, DVD+RW, or DVD-RAM.

The process for setting up a disk for this kind of use is quick and easy, you simply insert your blank disk into your drive and wait a second.  If you have autoplay enabled, you know where your CD’s that you insert start automatically, you will get a window that pops up asking you how you want to use the disc, like a USB flash drive, or with a CD/DVD player (like a normal writer).  If you don’t have autoplay enabled, simply open Windows Explorer or My Computer and locate your CD or DVD drive.  Double click on it and you should receive the same window asking you how you want to use the disk.

Once you see the window, make sure that use “Like a USB flash drive” is selected and then press next. You will then get a message that the disk is being formatted.  Just wait and watch, and after a minute or two it should be complete and will disappear.  Once the formatting windows goes away you are done and ready.  You should now be able to drag and drop files to and from the disk, delete any that you want to, and manner of good stuff like that.  I hope you find this useful!

Get more information at Microsoft’s site

Tools for eBay

I am sure that just about everyone has at least looked around on eBay if not purchased something from someone through there.  There are a smaller number of us that have actually sold stuff on eBay, and as anyone who has done this can tell you, it ain’t pretty.  The good folks at eBay have tools, ways and means to get your stuff listed for sale, but as easy as it is it’s also very complex and confusing.  You can take some time and figure it out,  but it never hurts to have some help, and this is where third parties have made a small fortune making tools, software and even books that aim to make eBay easier to learn.

I am all for learning and making things easier to use, and I ran across this site earlier today where the author sorts through a bunch of tools for eBay posting only the good ones and giving reviews on the “9 Excellent Free Tools For eBay Buyers and Sellers”.  I took a look and while I can’t vouch for all of the tools, some of them I have used and I can say that I liked what I saw.  So, go check it out and see if any of these tools can help you in your eBay journeys!  Thanks 🙂

Anoying RAID messages in logs on Debian

Recently I ran into an odd recurring message in the log files of some 64-bit Debian servers I had setup, and although it wasn’t causing me any problems per se, I hate for things to just go on like that and not know why and what to do about it. Now, these were virtual machines (VMs on ESX 4), running the latest Debian Linux 64-bit, and therefore being virtual they had to specialized RAID hardware or anything like that dedicated to the servers themselves. The servers just had your regular virtual SCSI disks as if it was a physical box with single drives in it.

What I noticed in the logs was an error pertaining to mpt-statusd, and that it was detecting “non-optimal” RAID status. Well, duh, there’s no RAID in it! Of course it won’t be optimal. Here is what I was getting, and you can see from the time stamps of this snippet that I was getting quite a few:

Aug  3 18:58:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:08:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:18:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:28:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:38:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:48:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 19:58:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 20:08:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 20:18:36 mail mpt-statusd: detected non-optimal RAID status
Aug  3 20:28:36 mail mpt-statusd: detected non-optimal RAID status

After I did some digging into this mpt-statusd package, I found that it’s main purpose is to check on the RAID status out of mpt and other controllers, which explains why it was complaining since as I said above, there was no RAID installed. Here is the full description of mpt-statusd:

“Description: get RAID status out of mpt (and other) HW RAID controllers The mpt-status software is a query tool to access the running configuration and status of LSI SCSI HBAs. mpt-status allows you to monitor the health and status of your RAID setup. Tag: role::program”

The fix for this is to uninstall mpt-status, assuming you don’t have RAID setup on your server. Once I removed the package, my log files where free from the unnecessary clutter!  I still don’t know what the trigger was that got it installed in the first place, but at least it was easy enough to remove once I found out I didn’t need it.

Bash function for making locate find exact matches

This is one of the coolest and most useful things to add to my UNIX/Linux profile that I have come across in a long time. I use the locate command a lot (slocate naturally) as I am sure all of us command line monkeys do. How many times have you been frustrated by the billions of lines of results flying by your screen, piping through more or less, trying to find the one nugget of goodness that you really need? Especially when you actually know the correct name of it, just not where it lives? This is where this comes in handy (this is where this? man I am eloquent)! Add this function to your bash profile (for some that’s .bash_profile and for others it might be .bashrc, depending on your nix flavor) and you can stop all of that. I haven’t tried this with other shells aside from bash, but I don’t see why it wouldn’t work.

Basically, this function uses the locate command to find whatever you are looking for just like you do, only it uses a bit of scriptology to filter it down to the exact match of what you are looking for. Yep, that’s right, the exact match! This little tidbit can really help out when you are looking for something, take a look:

## BASH locate function for exact match
## Thanks Dark_Helmet : http://solarum.com/v.php?l=1149LV99
function flocate
{
  if [ $# -gt 1 ] ; then
    display_divider=1
  else
    display_divider=0
  fi

  current_argument=0
  total_arguments=$#
  while [ ${current_argument} -lt ${total_arguments} ] ; do
    current_file=$1
    if [ "${display_divider}" = "1" ] ; then
      echo "----------------------------------------"
      echo "Matches for ${current_file}"
      echo "----------------------------------------"
    fi

    filename_re="^\(.*/\)*$( echo ${current_file} | sed s%\\.%\\\\.%g )$"
    locate -r "${filename_re}"
    shift
    (( current_argument = current_argument + 1 ))
  done
}

It’s just that easy! Copy and paste this into your profile and add a cool helper addon companion function thingy 🙂 I wish I could say I came up with this myself, but I didn’t, I found it in some forums posted by someone named Dark_Helmet (just like the attribution link in the script). I don’t know who you are Mr. Helmet, but I thank you for your sharing this with us all, and I am passing it on! Enjoy!

Powerconfig and Windows Hibernation – Part 2

I wanted to post a followup to an earlier post about Windows and disabling the Hibernation feature.  The original power was useful because in many circumstances (like most desktops) you don’t need to or want to hibernate your system.  So, you can save some disk space (upwards of the amount of RAM in your PC) and some performance overhead of managing that hibernation file, by disabling the hibernation function or feature.  You can read that one here.

Next thing I thought about was, what if you do need that hibernation function?  Well, naturally you can do the opposite of that earlier article to enable hibernation if it isn’t already, although usually it is by default.  But also, you can specific how big the hibernation file (hiberfil.sys) is compared to how much memory you have in your machine.  I would imagine if the file is set to less than your memory it must do some compression and maybe leave some non-essential stuff out, but I don’t know for sure and I am not sure if it’s worth digging into too deeply.  However, if you have some binary real estate (disk space) to spare, and you don’t have too much memory in your machine (you guys with 16GB or something need to ditch Windows and run Linux), set it to 100% and rock out.

Just like the enable and disable, you use the powercfg.exe command, and interestingly enough, still use the -H switch.  But instead of just On or Off, you add another switch ‘-Size’ and a number between 50 and 100 to equate to anywhere between 50 and 100 percent of your memory.  According to what I read, you can’t choose less than 50% or, obviously, more than 100%.  So, I set mine to 100% (it was at 75% by default) and am going to see how well it works.  If I see anything that warrants it, I’ll post a follow up as to whether or not it’s a good idea.

OK, the command to set your hiberfil.sys size to 100% would be:

powercfg.exe -H -Size 100

And there you have it, it’s just that easy!  Hope it helps 🙂

Disable Hibernation In Windows

Here is a helpful tidbit for anyone that might need it.  It’s something I used now and then, often enough that I remember the command, but not often enough to remember the exact syntax LOL  At least if I post it here it will be easy to find.  What am I talking about you ask?  Well, enabling and disabling hibernation in Windows.  If you are running a desktop, you most likely don’t need to hibernate your machine.  You can if you want, but I for one don’t want to lose the extra few gigs of disk space taken up by the ‘hiberfile.sys’ hibernation file.  Not to mention the system resource usage and overhead of keeping it updated.

OK, getting down to business, on Windows Vista and Windows 7, you can enable or disable the hibernation function easily by using the ‘powercfg’ command with the ‘-H’ (hibernation) option.  Here are a couple of examples:

powercfg.exe -H off

This turns hibernation off naturally, and:

powercfg.exe -H on

Will turn it on, and just that easily too!

I hope this little trinket of wisdom comes in handy for you.  Enjoy!