Sunday, July 06, 2014

Setting up an External Disk on Ubuntu the right way

As mentioned in my last post, part of this weekend's fun was rebuilding my 4 disk array with two new WD Red 3TB disks to join the two remaining 3TB disks. Since I still have not converted the family machine to Ubuntu, I had no choice but to lug the array downstairs and use the JD Micron tool to erase the old RAID from the remaining two disks. I had moment of terror after it erased the old array as the tool defaulted to showing my other array which made it appear that I had just erased the array that I needed to copy from. Then setup the new 4 disk RAID 0, and copy over for about 12 hours.

So this morning I saw the copy was finished, unplugged the drive, brought it upstairs, and got a cryptic error message from Ubuntu. Fortunately I realized the issue was that I had turned on write caching in Windows to make the copy go faster, and had not used the Remove utility in Windows before unplugging the drive. Even though there was no data to be lost, Ubuntu correctly realized that the cache was not in a "closed" state. So trudge the array back downstairs, plug it in, Remove it from Windows "correctly", come upstairs, and this time the drive auto-appeared.

Started working with the drive, and realized that in the default mode Ubuntu treats an auto-mounted external drive as owned by the current user, and read only for everyone else. This causes issues with several programs and utilities.

The last time I ran into this I hacked a solution by mounting the disk using Samba, going downstairs, and using Windows to change the permissions recursively. This fixes all but the "root" directory of the volume, but kills a lot of time and really is subject to failing at odd times and places.

So this time I decided to do things the right way. First I used "sudo fdisk -l" to show me that the drive was being recognized as /dev/sdb (quite common if you only have one internal drive), and fdisk complained that the drive used GPT and that it was mounting /dev/sdb1 as the partition. The GPT comment is actually quite important because what that is really telling me (or you) is that fdisk is "lying" about the partition actually being mounted. If you are using GPT (as you would for a partition larger than 2TB) then Ubuntu is actually pseudo-mounting sdb1 through /dev/sdb2. A quick look at the information given by the nautilus file manager will confirm that the drive is actually automounted on /dev/sdb2.

Knowing this, I then unmounted the drive to avoid having two different logical pointers to it. Mount can sometimes get confused otherwise, and it can cause other issues.

I then went to the /media directory (default mount point for external devices) and created a directory called Z12TB (sudo mkdir /media/Z12TB). You can call it whatever works for you. Then need to make sure it has full permissions using "sudo chmod 777 /media/Z12TB".

Finally it was time to edit the fstab file. So "sudo gedit /etc/fstab" and then in the file itself add a line like:
/dev/sdb2   /media/Z12TB ntfs-3g defaults 0 0

You are telling it to mount partition /dev/sdb2 at the mount point (/media/Z12TB), that the partition is using NTFS (default for large Windows partitions) to use the default owner and groups, and to use the default permissions.

Finally use "sudo mount -a", and the drive should mount under whatever drive letter you gave it in Windows the last time you used Windows to access it. In my case Z which explains the name.

If you are going to share the drive to Windows, this is a good time to bring up Samba, add a drive path using the mount location, use the drive letter as the name and the directory name as the description (i.e. Z and Z12TB respectively), and I would set the permissions to "everyone" to avoid a bunch of fun connecting from the Windows machines.

As always, let me know if you have any questions!

Saturday, July 05, 2014

Two Lesser Known Linux Alternative Programs

For most Windows programs there are good or occasionally better Linux programs. Many of these are cross-platform, and so someone used to using VLC on Windows will have no problem finding it for Linux. Similarly with LibreOffice and OpenOffice. Almost all the major browsers (with the exception of IE) are equally cross-platform.

For Drawing/Painting/Photo Editing there is Gimp or Shotwell (default Ubuntu tool).

For Gaming you are generally best off with Steam where the client is cross-platform and many of the games are being ported.

It's when you get into the niche areas that you can find yourself looking a little harder to find the equivalent.

For myself, I needed something that let me handle a directory of photos the same way Irfanview did. There are tutorials out there for getting Irfanview to run under Linux, but when you are using some of the file structure tools (move to a directory for instance) it can get a little wonky.

Took some searching, but eventually found GThumb. For how I use the program it's actually a little better than Irfanview because it will show me thumbnails of the pictures on either "side" of the current one so I can see if there may be a pic with similar subject but better framing,etc.

Similarly, I needed something that would let me download chapters of Manga. I greatly appreciate sites like Batoto, but when you are travelling to places with little or no internet connectivity (see previous post) an online reader is an exercise in frustration. In Windows I had always used Dom Dom Soft, and in fact the lack of this is one of the reasons I eventually gave up on Ubuntu the last time around. This time I had been "cheating" by using the copy on my laptop and then sharing via Google Drive.

However there is now a very good program called HakuNeko. It is cross-platform, and while it doesn't offer as extensive a selection of sites to search as Dom Dom, it does work with a couple of sites that Dom Dom has issues with.

Two more reasons that this time I am sticking with Ubuntu!

I might have spent this weekend finally making the conversion on the family computer, but one of the other 3TB drives in my one array finally kicked the bucket. It was from the same Buffalo array as the other drive that had died - and so in addition to the fan problem that killed it's sibling it had also spent time overheated in the Buffalo array. So have two Red 3TB drives that are supposed to be delivered today and will be rebuilding the array again. I should be able to get by with this setup until my bonus next year when I suspect that the 4TB drives will be cheap enough to build a completely new 16TB array.

That's it for now!

Thursday, July 03, 2014

You Think Your ISP is Bad? Your Mayor Probably isn't Calling them Out Like This One...

A bit of a sign of the times I suppose, but check out the letter that was in our room during our recent Grand Canyon trip:


Unfortunately I can vouch that service throughout the area surrounding the national park was rather bad anywhere we went. In the national park itself service was actually pretty good, but I gather that is because the NP has it's own AT&T contract that avoids using the CenturyLink backhaul.

Of course it is interesting to think that enough folks were complaining that such a letter had to be written, and I wonder if the citizens of the area are trying to use this to help them get better service as much or more than they are trying to help out the visitors to the region.

I wonder if the intent is to get CenturyLink back to the negotiation table, or trying to get the plight known in enough circles to get other companies to bid on the service?

In any event, next time you think YOUR service is bad, perhaps you should consider how much worse it could be...

Monday, June 23, 2014

One month plus, and sticking with Linux this time

Every time I have previously tried to make the switch to Linux, one or more apps or configuration issues forced me to switch back within the first several weeks.

I am incredibly pleased to say that has not been the case this time around. Still rocking U 14.04, and am now seriously considering migrating the family computer to it as well. I can't migrate my SO's two computers to Linux because her job requires her to access a system that is Windows only - in fact it appears to be a Windows shell scraping a 3270 app which should give you an idea of just how bad it is.

In any case, virtually everything I use has a Linux version or a Linux equivalent. Thanks to Play On Linux I can run Unity 4.x just fine, and Civ V just released a Linux native version a bit ago. Network and external drive have been smooth since the conversion, which is better than they were doing before.

I'm not saying that there isn't a place for Win 8.1 as I will continue to use that on my laptop. I'm just saying that the barrier to entry is much, much lower than it was even a year ago, and that it would be hard to find a reason to pay for Win 8.1 given you can get the features you need from Ubuntu. I haven't yet tried to find a Metro like window manager for Ubuntu, but for a non-touchscreen system I don't think that is really something I miss.

The MS Office web versions run ok if you can't stomach LibreOffice for some reason, but other than some Excel Macro issues I haven't seen any issues with documents even using some heavy formatting.

With Independence Day coming up next week, maybe it's time for you to get a touch of Libre for yourself :-)

Sunday, June 22, 2014

Oh Lord, won't you buy me a Mercedes Bike?

It has been a bit of an unfortunate two weeks. My kickstarter project didn't fund, I have yet to sell any of my artwork (http://www.fenumbra.com/artist/nawegr or http://society6.com/EwanRGR if you need a laugh), sales of my published game have dropped to 0, and this happened:


Evidently the hill on the way home I bike up every evening was a bit too steep for what the motor could handle, and it was drawing more current than it should have. The controller is SUPPOSED to keep that from happening, but...

Bought a kit to replace the battery, motor, and controller for about $1K. Took it to a shop here in town that struggled valiantly to get it to work and evidently the motor or controller arrived DOA. Seller will not allow a ship back, and eBay's position is that if it was shipped and received no refund will be made.

So the bike doesn't work, I'm out $1K, and I don't have enough to buy another bike (approximately $2.5K). I could buy another kit, but at this point that seems like it would be throwing good money after bad.

Why tell all of you all this? First off so that those of you might be thinking of getting a kit to upgrade your bike to an ebike realize that it might not be as simple (or reliable) as the folks who stand to make some money by selling you the kit might tell you.

I still hope to get another ebike at some point. Based on the pic above I am thinking I really need a 48v, 1000w model that can properly handle hills - the Currie was a 36v, 500w model and I suspect that was a little weak.

In the meantime, if you see me standing at a bus stop, you'll know why. And on the plus side, now there's all sorts of things I can review to make a 2 hour bus ride more palatable. Yay?