<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4152097373641005138</id><updated>2008-08-24T06:46:33.239-07:00</updated><title type='text'>Jamieson's Tech Blog</title><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-1202495457910662954</id><published>2008-08-03T11:21:00.000-07:00</published><updated>2008-08-06T13:24:15.884-07:00</updated><title type='text'>How to install XMMS in Debian Lenny</title><content type='html'>As with most of my posts, this one is also a quickie problem solution, so ignore it if it doesn't apply to you. Why XMMS when it's been dropped by Debian and Ubuntu? Simply because it handles problematic playlists (i.e., playlists with ../ in them, which I use a lot and audicious doesn't handle), it handles all files without crashing (i.e., Amarok and Audacious both hang with many of my tunes), and, well, it's XMMS. I have hundreds of skins and Audicious's WinAmp Classic skin support is &lt;a href="http://en.wikipedia.org/wiki/Audacious_Media_Player"&gt;due&lt;/a&gt; to be dropped. And XMMS is fast and rarely crashes unless you're using a buggy visualization plugin. It's only ugly in the [file] dialogs -- the app itself is completely skinned. I just prefer XMMS -- it's fast, simple, and does the job. When I'm not using XMMS, my personal favorite is Amarok.&lt;br /&gt;&lt;br /&gt;These packages will probably also work with various flavors of (X)KUbuntu.&lt;br /&gt;&lt;br /&gt;If you'd prefer, you can also download the packages below from the official etch repositories, or you can just copy and paste the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;# i386:&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;mkdir xmms_in_lenny&lt;br /&gt;cd xmms_in_lenny&lt;/blockquote&gt;&lt;blockquote&gt;wget http://jamiesonbecker.com/xmms_in_lenny/libflac7_1.1.2-8_i386.deb http://jamiesonbecker.com/xmms_in_lenny/xmms_1.2.10+20061101-1etch1_i386.deb http://jamiesonbecker.com/xmms_in_lenny/xmms-flac_1.1.2-8_i386.deb&lt;br /&gt;sudo dpkg -i  --ignore-depends=libglib1.2 *deb&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;# amd64&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;mkdir xmms_in_lenny&lt;br /&gt;cd xmms_in_lenny&lt;/blockquote&gt;&lt;blockquote&gt;wget http://jamiesonbecker.com/xmms_in_lenny/libflac7_1.1.2-8_amd64.deb  http://jamiesonbecker.com/xmms_in_lenny/xmms_1.2.10+20061101-1etch1_amd64.deb  http://jamiesonbecker.com/xmms_in_lenny/xmms-flac_1.1.2-8_amd64.deb&lt;br /&gt;sudo dpkg -i  --ignore-depends=libglib1.2 *deb&lt;/blockquote&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/08/xmms-in-lenny.html' title='How to install XMMS in Debian Lenny'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=1202495457910662954' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1202495457910662954'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1202495457910662954'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-1285080192316143784</id><published>2008-07-23T09:44:00.000-07:00</published><updated>2008-07-23T09:56:40.125-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;"Patch.  Today.  Now. Yes, stay late.  Yes, forward to OpenDNS if you have to.  (They’re ready for your traffic.)  Thank you to the many of you who already have."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The largest vulnerability since about 1999 is here!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;THIS IS HUGE. THIS IS HUGE. THIS IS HUGE. (AND APPARENTLY  QUITE REPETITIVE.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EVERY WEBSITE THAT YOU LOG INTO MIGHT NOT ACTUALLY BE THE WEBSITE THAT YOU THINK IT IS.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you've ever clicked on a phishing email link, you know how it goes. There are many variations, but here's an example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SECURITY VERIFICATION REQUIRED FOR BANK OF AMERICA&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Due to recent activity on your account, we are taking steps to ensure the safety of your online banking history. Please log into your account to verify your identity.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://payments.bankofamerica.com.somethingelsereallylong.vendors.jamiebecker.labarts.com/cgi-bin/hahasucker/login.html"&gt;https://accounts.bankofamerica.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(If you click on this, you'll see the real URL. In an HTML email, just like in a web page, the really long URL is hidden only to partly show up in the location bar when you click the conveniently short URL actually shown in the email.)&lt;br /&gt;&lt;br /&gt;In many cases, you might not even see the whole hostname. People see the "https://payments.bankofamerica.com" and go ahead and log into the carefully copied Bank or PayPal site. (It takes about 20 minutes to set this up.)&lt;br /&gt;&lt;br /&gt;Oh, and in case you are wondering, seldom do real social engineers (or at least successful ones) put "hahasucker" in the URL.&lt;br /&gt;&lt;br /&gt;Once this occurs, they grab your username and password and then refer you to the REAL paypal.com "password denied." You believe that you typed it in wrong and try it again and log in successfully. (Yes, this is even possible -- although much harder -- with Bank of America's picture verification procedure, where you should be attempting to authenticate Bank of America at the same time that they are authenticating you!) The beautiful thing about this (if such it may be called) is that the victim doesn't even realize he gave his information away!&lt;br /&gt;&lt;br /&gt;Notice the http&lt;span style="font-weight: bold;"&gt;S&lt;/span&gt; in the above URL? that means you're talking on a secure connection directly to the bad guys! It costs about $10 to get an SSL certificate. Even if you see that, there's no guarantee that you're talking to the right people, only that you're talking to them securely.&lt;br /&gt;&lt;br /&gt;ONLY if you're able to verify the hostname AND you're talking on an SSL certificate that was issued to that vendor, then HOPEFULLY you're talking to the right website, not one in Russia or Romania or China or North Korea or some hacked webserver in the U.S. or the E.U.&lt;br /&gt;&lt;br /&gt;Of course, many vendors, including banks, refer you to a third party website (i.e., liveperson.net) for certain services. I was on Sprint's main page the other day and was referred to a third-party chat provider for login assistance. The problem here is that unless the hostname still ends with Sprint.com, it's very possible that the homepage had an XSS or CSRF attack and the link was replaced with EvilSocialEngineers.com chat "assistance." Only providing the chat link after one logs in is a bit safer, but not a lot safer. (Tangentially, the safest way is for Sprint to set up an A-Record to their chat provider and only refer to that record, but then the chat provider needs to carry a Sprint-signed SSL certificate; still, that certificate could be chat.sprint.com or something suitably restricted.)&lt;br /&gt;&lt;br /&gt;Ok, the preliminaries are out of the way. We already know &lt;span style="font-weight: bold;"&gt;the Intertubes are a dangerous place, full of nasty back alleys and red light districts and masked men who will walk right into our bank's online lobby and rob us blind.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As of yesterday, a massive DNS hole that allows DNS cache poisoning (possibly even at the root server level) will permit bad guys to even masquerade as a particular host name. In English, that means that even if you see "bankofamerica.com" in your location bar and EVERYTHING ELSE is ok, you STILL might be logged into the bad guys.&lt;br /&gt;&lt;br /&gt;Worse, this has NOTHING AT ALL to do with your bank. They can't help you -- they don't even see you logging in, because you never even get to them. It's not their fault.&lt;br /&gt;&lt;br /&gt;Worse, there's very little way to really fix this problem short of redesigning the entire QID design in DNS, which will take years. YEARS. We can mitigate it a bit but not entirely prevent this from occuring right now.&lt;br /&gt;&lt;br /&gt;Worse, THIS MEANS THAT ANY WEBSITE CAN PRETEND TO BE ANY OTHER WEBSITE, AND IT DOESN'T TAKE A ROCKET SCIENTIST TO PULL IT OFF. (Or even a computer scientist.) You could be talking to an evil Microsoft website instead of the real one. Oh, wait. Let's come up with a better example. You might be talking to the "Take your money and Run, LLC" company based in Nigeria instead of www.WellsFargo.com!&lt;br /&gt;&lt;br /&gt;Examples of sites that are &lt;span style="font-style: italic;"&gt;vulnerable&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;yahoo.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;wellsfargo.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;aol.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;amazon.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ebay.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;msn.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;hotmail.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;gmail.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;paypal.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;... starting to get the picture? There is no site that is not vulnerable. More precisely, no sites are vulnerable: you're not even GETTING TO THE RIGHT SITE before you're shunted off to an evil webserver somewhere else. Can you detect this? No. Can a computer professional detect this from viewing the web page in a browser? No.&lt;br /&gt;&lt;br /&gt;This is an attack that happens at your ISP's DNS level. That means that if you use CONCast -- err, Comcast -- or Bell South or Charter or Time Warner or anyone else, they'll be about as anxious and fast and precise at fixing this security hole as they are about fixing everything else. (Yes, you've had DNS problems at your giganto-ISP-who-should-know-better, too?) Odds are they're more concerned about &lt;a href="http://www.theregister.co.uk/2008/07/11/comcast_fcc_martin/"&gt;throttling Bittorrent&lt;/a&gt; than fixing holes that don't affect them -- except that this hole can't truly be fixed without redesigning DNS, which is an integral piece of the Internet itself.&lt;br /&gt;&lt;br /&gt;The coolest part about this (spoken with tongue firmly in cheek) is that once you've poisoned your victim's DNS cache (using glue records with long time-to-lives, so your poison lasts forever) everyone who uses that DNS server will visit the wrong site .. forever! And they won't have a clue! (cue evil cackle).&lt;br /&gt;&lt;br /&gt;Ok, enough doom and gloom. Some practical recommendations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Avoid or minimize logging into any website that holds your personal information for the next few months. As always, you should never do so from a computer that you don't personally control anyway. That means, for instance, that you should &lt;span style="font-weight: bold;"&gt;never&lt;/span&gt; check your email at a Kinko's or hotel computer; and, yes, I do this to when I have to. At least try to clear the cache and close the browser. Better yet, install &lt;a href="http://firefox.com/"&gt;Firefox&lt;/a&gt; on it.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you MUST log in, visit the website first. Type it in yourself, never click a link. Look for https. If you only see http, proceed no further. If you do see https, look for the padlock (Firefox, Safari) or key (Internet Exploder) and double click it. Read and try to understand the security chain. It was probably signed by Equifax or someone like that -- ok, no problem -- but make sure it was actually ISSUED TO your bank or the business that you're trying to log into and not &lt;span style="font-style: italic;"&gt;Evil Anonymous, New Jersey&lt;/span&gt;. (Not that evil finds itself only in the Garden State.)&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you know how and are able to, use one of the following DNS addresses until you are certain that your ISP has their act together. Better yet, set this also in your router so that all your computers use these new DNS addresses. (Don't forget to DHCP release/renew!) Ah, right, forget about your ISP: just keep using these good ones. Level(3)'s public DNS servers are almost certainly faster and safer than your ISP's anyway.  Level(3) offers this as a public service. (These are formerly GTE Internet addresses.):&lt;ul&gt;&lt;li&gt;4.2.2.1&lt;/li&gt;&lt;li&gt;4.2.2.2&lt;/li&gt;&lt;li&gt;4.2.2.3&lt;/li&gt;&lt;li&gt;4.2.2.4 (etc)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Sign up for &lt;a href="http://opendns.com/"&gt;http://opendns.com/&lt;/a&gt;, which is great and free (ad supported) for individuals and organizations. For your organization,&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you know how, install &lt;a href="http://cr.yp.to/"&gt;DJBDNS&lt;/a&gt; as a recursive resolver or hire (shameless plug!) &lt;a href="http://labarts.com/"&gt;LabArts&lt;/a&gt; to do it for you. This is only possible if you are using a Linux or UNIX (such as Mac OS X) operating system AND you know your way around the command line.&lt;/li&gt;&lt;/ul&gt;Again, these recommendations are no silver bullet, but they'll hopefully keep you safe&lt;span style="font-style: italic;"&gt;r&lt;/span&gt; until this gets fixed in a few years.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Dan Kaminsky's blog: 13&gt;0 [referring to the 13 days of silence for vendors to patch their systems; Dan was hoping for 30.]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;"Patch.  Today.  Now. Yes, stay late.  Yes, forward to OpenDNS if you have to.  (They’re ready for your traffic.)  Thank you to the many of you who already have."&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.doxpara.com/"&gt;http://www.doxpara.com/&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Halver's speculation that's amazingly close to the mark that resulted in the release of the actual crack:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://http//addxorrol.blogspot.com/2008/07/on-dans-request-for-no-speculation.html"&gt;http://addxorrol.blogspot.com/2008/07/on-dans-request-for-no-speculation.html&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Matasono's original "Cat is Out of the Bag" posting, since deleted. Here is Google's cache.&lt;br /&gt;&lt;a href="http://http//209.85.215.104/search?q=cache:vLwnQT2-RMIJ:www.matasano.com/log/1103/reliable-dns-forgery-in-2008-kaminskys-discovery/+matasano+dns+poisoning&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;cd=1&amp;amp;gl=us"&gt;www.matasano.com/log/1103/reliable-dns-forgery-in-2008-kaminskys-discovery/&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;News articles about this. &lt;a href="http:///#%20http://news.google.com/news?ncl=1229016951"&gt;http://news.google.com/news?ncl=1229016951&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/07/patch.html' title=''/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=1285080192316143784' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1285080192316143784'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1285080192316143784'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-4179520801329817717</id><published>2008-06-25T19:43:00.001-07:00</published><updated>2008-06-25T19:45:43.854-07:00</updated><title type='text'>Dynamic MMAP ran out of room</title><content type='html'>I always forget this, and wanted to post it here: if you ever get "Dynamic MMAP ran out of room" when apt-get updating, it's probably because you're pinning or getting ready to dist-upgrade. To fix it, just add this line to /etc/apt/apt.conf to increase the apt cache limit to 8MB:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;APT::Cache-Limit "8388608";&lt;/blockquote&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/06/dynamic-mmap-ran-out-of-room.html' title='Dynamic MMAP ran out of room'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=4179520801329817717' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/4179520801329817717'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/4179520801329817717'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-996777759783924830</id><published>2008-06-05T22:47:00.000-07:00</published><updated>2008-06-06T00:55:54.107-07:00</updated><title type='text'>Quickie databases (in JSON, of course)</title><content type='html'>(Note: all of the JSON files below I created/converted by hand using regular expressions, and I'm placing them into the public domain. The larger ones are compressed with gzip, which is a fast but efficient standardized compression system. (It's part of HTTP -- yes, even Internet Explorer has been able to decompress it for years.)  If you need a program to decompress it, it's probably already built into your operating system. If your operating system doesn't support it, here's a nickel. I recommend &lt;a href="http://kubuntu.org/"&gt;Kubuntu&lt;/a&gt; (especially for desktops/laptops or newbies) which is built on &lt;a href="http://debian.org/"&gt;Debian&lt;/a&gt; (for experts and servers).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Countries:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;What I really needed was the ISO country codes, and although &lt;a href="http://www.guavastudios.com/country-list.htm"&gt;this &lt;/a&gt;looked useful, it didn't have them. Of course, a stroke of insanity has struck ISO and these are only available for purchase -- in MS Access format!&lt;br /&gt;&lt;br /&gt;So, I converted &lt;a href="http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html"&gt;this&lt;/a&gt; from raw text to JSON:&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//countries_by_name.json"&gt;countries_by_name.json&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//countries_by_iso_code.json"&gt;countries_by_iso_code.json&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;U.S. Zip Codes&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.mattcutts.com/blog/fun-with-zip-codes/"&gt;Matt Cutts&lt;/a&gt; hilariously blogs about his experiences digging up ZIP code databases at the Census vs the USPS. (see also &lt;a href="http://www.census.gov/geo/www/tiger/zip1999.html"&gt;http://www.census.gov/geo/www/tiger/zip1999.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;And, in JSON format (about 2MB each gunzipped):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//zips_by_zip.json.gz"&gt;zips_by_zip.json.gz&lt;/a&gt;&lt;a href="http://jamiesonbecker.com//zips_by_city.json.gz"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//zips_by_city_state.json.gz"&gt;zips_by_city_state.json.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sample (Python script):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cjson.decode(open("zips_by_city_state.json").read())["CORTLAND, NY"]&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;['13045', '36', 76.185675000000003, 42.595174999999998, 29180, 0.001622]&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;cjson.decode(open("zips_by_zip.json").read())["90210"]&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;['06', 'CA', 'BEVERLY HILLS', 118.406477, 34.090107000000003, 20700, 0.000696]&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IP to Country&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is probably one of the hardest to solve, but there are two free databases that I'm aware of. The last time I reviewed the &lt;a href="http://www.maxmind.com/"&gt;MaxMind&lt;/a&gt; product it had a nasty (nasty!) license clause that essentially said that if you violated the terms of the license, they owned your entire product. Hmm -- what does that mean? I don't know, but I didn't want to find out. Proprietary software == crazy licenses. Ironically, there was a landmark case that lists of facts could not be copyrighted a few years ago.&lt;br /&gt;&lt;br /&gt;Haven't reviewed it, but it looks pretty complete and it's released under the GPLv2:&lt;br /&gt;&lt;a href="http://software77.net/cgi-bin/ip-country/geo-ip.pl"&gt;http://software77.net/cgi-bin/ip-country/geo-ip.pl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And, of course, the IP to Country database by webhosting.info:&lt;br /&gt;&lt;a href="http://ip-to-country.webhosting.info/"&gt;http://ip-to-country.webhosting.info/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This one makes less sense in JSON format, but here it is as a list of lists. This one is over 4MB uncompressed. See &lt;a href="http://ip-to-country.webhosting.info/node/view/55"&gt;this page&lt;/a&gt; for info on how to translate the IP you're testing and scan for the range it fits in.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//ip-to-country.json.gz"&gt;ip-to-country.json.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All of the JSON files listed in this post are released into the public domain.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Area Codes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The definitive resource is probably &lt;a href="http://www.nanpa.com/area_codes/index.html"&gt;NANPA&lt;/a&gt;, but again with the MS Access. What is with that? Does anyone actually use it? What's wrong with text, CSV, JSON, XML, or even XLS?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//area_codes.json"&gt;area_codes.json&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;States&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Another easy one: http://www.usps.com/ncsc/lookups/usps_abbreviations.html&lt;br /&gt;&lt;br /&gt;This is a bit more than the 50 states, because it also includes the military locations of service and&lt;br /&gt;regions and territories served by the U.S. Postal Service:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jamiesonbecker.com//states.json"&gt;states.json&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/06/quickie-databases-in-json-of-course.html' title='Quickie databases (in JSON, of course)'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=996777759783924830' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/996777759783924830'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/996777759783924830'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-1536050669783997552</id><published>2008-06-04T18:30:00.000-07:00</published><updated>2008-06-04T19:11:46.927-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http status error json xml w3c python'/><title type='text'>HTTP Status Codes (Errors) in JSON and XML Format</title><content type='html'>Here's a handy conversion of the W3C HTTP Status codes from &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;w3.org&lt;/a&gt; and descriptions into both XML and JSON format.&lt;br /&gt;&lt;br /&gt;Here's a sample in JSON:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;"302": {&lt;br /&gt;  "name": "Found",&lt;br /&gt;  "description": [&lt;br /&gt;      "The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.",&lt;br /&gt;      "The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).",&lt;br /&gt;      "If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.",&lt;br /&gt;      "&amp;lt;pre&amp;gt;Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client.&amp;lt;/pre&amp;gt;"]&lt;br /&gt;},&lt;/blockquote&gt;Note the embedded &amp;lt;pre&amp;gt; tags. Of course, that was just a snippet. In Python, you can just use cjson or simplejson to parse this:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;import cjson&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;http_errors = cjson.decode(open("http_errors.json").read())&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;print http_errors["302"]&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;I recommend the version in Javascript Object Notation, since most languages can handle it&lt;br /&gt;easily.&lt;br /&gt;&lt;br /&gt;Here's the files:&lt;br /&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://jamiesonbecker.com/http_errors.json"&gt;http_errors.json&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jamiesonbecker.com//http_errors.xml"&gt;http_errors.xml&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/06/http-error-descriptions-in-json-and-xml.html' title='HTTP Status Codes (Errors) in JSON and XML Format'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=1536050669783997552' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1536050669783997552'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/1536050669783997552'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-4152097373641005138.post-7417704264290026828</id><published>2008-06-04T12:35:00.000-07:00</published><updated>2008-06-08T20:05:43.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sparse virtual servers filesystem linux-vserver xen lvm2'/><title type='text'>Overselling your disks without LVM</title><content type='html'>It's easy to "oversell" (i.e., pretend that you have more disk available) your disks by simply using sparse files. This is particularly useful with Linux-Vserver, Xen, UML, VMware, etc. Just use these sparse files (already mounted) as the "backing store" for your virtual machines.&lt;br /&gt;&lt;br /&gt;For instance, let's say that you only have a 1TB filesystem in RAID1 available on your server, but you want to provide all of your 100 customers with 100GB of "available" space each, so that they could (but almost certainly won't) each use 100GB. They can't all use all that space at the same time, of course (that's &lt;span style="font-weight: bold;"&gt;10 TB&lt;/span&gt;, or ten times as much as you have available!), but you can safely keep them all on that server at least for a little while. Of course, you can't actually sell more space than you have, so monitor your available disk space so that when two or three of them start using up all their space, you might want to consider moving those VM's to another server!&lt;br /&gt;&lt;br /&gt;Side note: (see &lt;a href="http://linux.derkeiler.com/Mailing-Lists/Fedora/2007-06/msg05692.html"&gt;this note&lt;/a&gt; for older kernels)&lt;br /&gt;Because you are creating so many loopback devices, you'll need to create additional loopback devices. If you are using a newer kernel (2.6.22 or newer):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;for ((i=8;i&lt;150;i++));&lt;br /&gt;&lt;br /&gt;do&lt;br /&gt;[ -e /dev/loop$i ] || mknod -m 0600 /dev/loop$i b 7 $i&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;In this post, we'll create 100 "sparse" empty hard drives, each appearing to make available 100GB, but in reality only consuming only a few hundred megabytes each! (Note: depending on the filesystem you choose to format your sparse images with, you will need approximately 10-20GB of available disk space in /tmp to complete this exercise, but you can immediately recover the space using the procedure shown below. The process takes about twenty minutes on a SATA hard disk.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Create your 100 "hard drives". Let's use Python to create a list of these hard drives.&lt;br /&gt;&lt;blockquote&gt;cd /tmp # do this example in /tmp; /tmp must have 14GB avail&lt;br /&gt;&lt;br /&gt;python&lt;br /&gt;&lt;br /&gt;f = open("100.txt", "w")&lt;br /&gt;&lt;br /&gt;for i in xrange(100):&lt;br /&gt;         f.write(str(i+1) + "\n")&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(press control-D to exit)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;Now we have a list of 100 numbers that we can use to automatically create our 100 filesystems.&lt;br /&gt;Please note that each of these 100GB filesystems will consume about 136MB of actual space for overhead. I'm using Debian and reiserfs, so please adjust this procedure if necessary. (I recommend reiserfs for "normal" filesystems containing small files, and XFS for filesystems containing smaller numbers of "large" files, such as database filesystems.)&lt;br /&gt;&lt;br /&gt;2. Create 100 empty filesystems. Be sure that you have sufficient space (14GB) and time available, or change the numbers accordingly (you might need to install &lt;span style="font-style: italic;"&gt;reiserfsprogs&lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mkdir vservers sparse_filesystems&lt;br /&gt;&lt;br /&gt;for i in `cat 100.txt `&lt;br /&gt;do&lt;br /&gt;&lt;br /&gt;echo Building Sparse Filesystem #$i and mounting it..&lt;br /&gt;&lt;br /&gt;## First, create the empty file. Note we seek right to the&lt;br /&gt;## end, which creates a sparse file:&lt;br /&gt;&lt;br /&gt;dd if=/dev/zero of=sparse_filesystems/fs_$i.img count=1 bs=1 seek=100G&lt;br /&gt;&lt;br /&gt;## Create a reiser filesystem on it. Reiser is particularly well-suited for this,&lt;br /&gt;## since it doesn't have a built-in inode limit and handles many small files easily&lt;br /&gt;&lt;br /&gt;mkreiserfs -l fs_$i -f -q sparse_filesystems/fs_$i.img&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## Create a label for your fstab&lt;br /&gt;&lt;br /&gt;sudo su -c "echo '# Temporary Filesystems' &gt;&gt; /etc/fstab"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## Create the directory for the mounted filesystem&lt;br /&gt;&lt;br /&gt;mkdir vservers/vserver_$i&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## Add a line to /etc/fstab for each filesystem&lt;br /&gt;&lt;br /&gt;sudo su -c "echo `pwd`/sparse_filesystems/fs_$i.img `pwd`/vservers/vserver_$i reiserfs loop 0 0" &gt;&gt; /etc/fstab&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;## mount each loopback filesystem into vservers/vserver_$i&lt;br /&gt;&lt;br /&gt;sudo mount vservers/vserver_$i&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;done&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;3. You're done! Just check out how much diskspace each filesystem has!&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;dev01: ~ df -h | less&lt;br /&gt;&lt;br /&gt;# the 33M is used by ReiserFS for housekeeping (metadata); actual disk space&lt;br /&gt;# used for housekeeping on my system is around 14GB for all 100 of these&lt;br /&gt;# 100GB filesystems.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_1.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_2.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_3.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_4.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_5.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_6.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_7.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_8.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_9.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_9&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_10.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_11.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_11&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_12.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_12&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_13.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_13&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_14.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_14&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_15.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_15&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_16.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_16&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_17.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_17&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_18.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_18&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_19.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_19&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_20.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_21.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_21&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_22.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_22&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_23.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_23&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_24.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_25.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_25&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_26.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_26&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_27.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_27&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_28.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_28&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_29.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_29&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_30.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_31.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_32.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_32&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_33.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_33&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_34.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_34&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_35.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_35&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_36.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_36&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_37.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_37&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_38.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_38&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_39.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_39&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_40.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_40&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_41.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_41&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_42.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_42&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_43.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_43&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_44.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_44&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_45.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_45&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_46.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_46&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_47.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_47&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_48.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_48&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_49.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_49&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_50.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_50&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_51.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_51&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_52.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_52&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_53.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_53&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_54.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_54&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_55.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_55&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_56.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_56&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_57.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_57&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_58.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_58&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_59.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_59&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_60.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_60&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_61.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_61&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_62.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_62&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_63.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_63&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_64.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_64&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_65.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_65&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_66.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_66&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_67.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_67&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_68.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_68&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_69.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_69&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_70.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_70&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_71.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_71&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_72.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_72&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_73.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_73&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_74.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_74&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_75.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_75&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_76.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_76&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_77.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_77&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_78.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_78&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_79.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_79&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_80.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_80&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_81.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_81&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_82.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_82&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_83.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_83&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_84.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_84&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_85.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_85&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_86.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_86&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_87.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_87&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_88.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_88&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_89.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_89&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_90.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_90&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_91.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_91&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_92.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_92&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_93.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_93&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_94.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_94&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_95.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_95&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_96.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_96&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_97.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_97&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_98.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_98&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_99.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_99&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/tmp/sparse_filesystems/fs_100.img&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;                      100G   33M  100G   1% /tmp/vservers/vserver_100&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Ok, neat filesystem tricks; now you'd like to delete these filesystems?&lt;br /&gt;&lt;br /&gt;First, unmount them all:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;dev01: ~ for i in `cat 100.txt `&lt;br /&gt;do&lt;br /&gt;sudo umount vservers/vserver_$i&lt;br /&gt;done&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Second, remove those two temporary directories:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;rm -Rf vservers sparse_filesystems&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Finally, edit your &lt;span style="font-style: italic;"&gt;/etc/fstab&lt;/span&gt; to remove the nonexistent mount entries:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;vi /etc/fstab&lt;/blockquote&gt;&lt;br /&gt;(if you don't already know how to use &lt;span style="font-style: italic;"&gt;vi&lt;/span&gt;, try &lt;span style="font-style: italic;"&gt;nano &lt;/span&gt;instead.)&lt;br /&gt;&lt;br /&gt;Additional ideas? Use debootstrap to fill all of those filesystems up with cool, crisp Debian Stable! Each bare-bones installation will only consume about 200MB each!&lt;br /&gt;&lt;br /&gt;Another way to do this using Device Mapper:&lt;br /&gt;&lt;a href="http://jons-thoughts.blogspot.com/2007/11/creating-sparse-block-devices.html"&gt;http://jons-thoughts.blogspot.com/2007/11/creating-sparse-block-devices.html&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://jamiesonbecker.com/2008/06/overselling-your-disks-without-lvm.html' title='Overselling your disks without LVM'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4152097373641005138&amp;postID=7417704264290026828' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://jamiesonbecker.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/7417704264290026828'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4152097373641005138/posts/default/7417704264290026828'/><author><name>Jamieson</name><uri>http://www.blogger.com/profile/14353751020175443175</uri><email>noreply@blogger.com</email></author></entry></feed>