Device Busy? –WTF!–

December 14th, 2012

One of my first impressions with RedHat based Distros was that I couldn’t just plug in a thumb drive and mess with the partitions from the installed OS. Why? Because I got this “Device or resource Busy” error, in other words: someone else was using that drive already, and to please stop them and Linux would be glad to do that thing for me.

Fast forward about a year and some searching dug up the lsof command. Lovely, lovely command. It helped me find the enemy, and the enemy was me? Yup. root was the, erm, root of the problem. But it didn’t help me figure it out. It wasn’t until today, when I was researching raid levels and set up, that I discovered the issue: multipath. Here is what it does in a nutshell:

DM-Multipathing (DM-MPIO) provides I/O failover and load-balancing within Linux for block devices.[1][2][3] By utilizing device-mapper, multipathd provides the host-side logic to use multiple paths of a redundant network to provide continuous availability and higher bandwidth connectivity between the host server and the block-level device.[4] DM-MPIO handles the rerouting of block I/O to an alternate path in the event of a path failure. DM-MPIO can also balance the I/O load across all of the available paths that are typically Fibre Channel (FC) or iSCSI SAN environments.[5] DM-MPIO is based on the Device mapper which provides the basic framework that maps one block device onto another. (from Wikipedia)

So… why does a USB device need failover support? It also speeds things up a bit(Always good, right?) and is part of the reason why Linux can attach devices that other OS’s can’t. Because it will hunt down the way to finding that data.

Oh, and it ties up the device when you’re trying to, say, install a live image to it. So here’s Glyn’s super fast guide on finding out if this is the problem.

First, the set up: you are trying to install a live CD to a disk using the livecd tools. It tells you that the drive is busy. here is the quick way to find out if it is multipath:

>>sudo multipath -l

Just so you know, if there are no entries, it ignores you. Instead, however, it will probably say this:

>>$ sudo multipath -l
[sudo] password for user:
1JMicron_USB_to_ATA_ATAPI_bridge dm-3 FUJITSU,MHT2040AH
size=37G features=’0′ hwhandler=’0′ wp=rw
`-+- policy=’round-robin 0′ prio=0 status=active
`- 6:0:0:0 sdb 8:16 active undef running

There it is! That’s how root is using the device. Not to kill it:

>>sudo multipath -F

Again, it will say nothing, so a quick:

>>sudo multipath -l

to check and there you go! Now, there is a way to blacklist the device, but I don’t know the syntax right now, as it is almost midnight. If you know, please leave it in the comments.

And there you have it! That wasn’t so hard, now was it? Good luck finding that on the net, though. Till now.

Reconciliation – The god of the New Testament and the god of the Old

October 7th, 2012

Whenever the wrong person, or perhaps the right one, learns that I am a Christian, they tend to ask this one, annoying question. Annoying because I didn’t know the answer for the longest time. I, like millions of Christians worldwide, have never had the opportunity to learn this unbelievably important lesson. The question was this: how do you reconcile the god of the Old Testament with the god of the new? I actually heard this question asked on the radio the other day on the Bible Answer Man show, hosted by Hank Hanegraaff, and really liked his answer. The problem is that he didn’t go into much detail. I didn’t expect him to. After all, each caller only gets a few seconds worth of answer. So, here today, I am going to expound on the issue.  First off: there is no reconciliation necessary since there is no difference. While the death of Christ brought on a new era and changed the way we interface with God, it didn’t change God. God was, is, and will be the same eternally and nothing we think we see contradicts that. I’m about to show how I know that. First, let’s take some of the more extreme examples of what the secular world calls cruelty. Deuteronomy 7:1-6 reads:“When the Lord your God brings you into the land you are entering to possess and drives out before you many nations—the Hittites, Girgashites, Amorites, Canaanites, Perizzites, Hivites and Jebusites, seven nations larger and stronger than you— 2 and when the Lord your God has delivered them over to you and you have defeated them, then you must destroy them totally.[a] Make no treaty with them, and show them no mercy. 3 Do not intermarry with them. Do not give your daughters to their sons or take their daughters for your sons, 4 for they will turn your children away from following me to serve other gods, and the Lord’s anger will burn against you and will quickly destroy you. 5 This is what you are to do to them: Break down their altars, smash their sacred stones, cut down their Asherah poles[b] and burn their idols in the fire. 6 For you are a people holy to the Lord your God. The Lord your God has chosen you out of all the peoples on the face of the earth to be his people, his treasured possession.” The part that really sets people off is this: “show no mercy”. Now, how can a merciful god say such a thing? Go ahead and put your thumb back in your mouth and hold your blankey close, because I’m about to take you on a ride! Hank said something that I really liked, and have heard before, “Text without context is a pretext”, and he wasn’t kidding. In order to put this into perspective, we have to go back in time. (Special note on time travel 1: Time travel should only be conducted by those with the proper temporal licenses issued by the Department of Intertemporal Travel. And 2: Persons lacking a time machine may accomplish the same thing using the instant coffee method that will be outlined in a later post) At the point where we pick the story up in Deut., Moses is giving his final instructions. This isn’t just commands from on high. No, these were his final, very personal remarks to the people he had shepherded for over 40 years. He knew that, when he was done speaking, he would die, so he had to make sure that each and every word counted. In those instructions, he reiterated everything he had taught them about how to live when they got settled, and, more importantly for this text, the instructions on how to claim their promise. But that promise went back about 400 years, long before Moses. Back in Genesis another tragic story was unfolding. Abraham, who would later be added to all sorts of lists of awesomeness and so on, was having a weak moment. Old, getting frail, and married to his love that wasn’t much better off. Abraham was having doubts and needed the reassurance that only God could give him. He needed to hear it again, but more than that too. He needed to FEEL it, feel its realness like he felt the other promises of God. He lived in the Promised Land, he was wealthy and wanted for nothing but an heir, and it was that last want that was driving him mad. Well, maybe not he so much as driving Sarah mad who was driving him mad. Either way, Genesis 12 was God’s answer after a significant sacrifice:12 As the sun was setting, Abram fell into a deep sleep, and a thick and dreadful darkness came over him. 13 Then the Lord said to him, “Know for certain that for four hundred years your descendants will be strangers in a country not their own and that they will be enslaved and mistreated there. 14 But I will punish the nation they serve as slaves, and afterward they will come out with great possessions. 15 You, however, will go to your ancestors in peace and be buried at a good old age. 16 In the fourth generation your descendants will come back here, for the sin of the Amorites has not yet reached its full measure.”Back up a moment. Inside Abraham’s personal pain, God shared some of Himself with us: His incredible mercy and patience. He just told Abraham, the father of His nation, that He had to wait because, even though God knew that the Amorites would certainly sin enough through the years, he still had to wait for it to reach the end-stage. God was patient enough that he was willing to wait not one or two, but four generations, by His count, before sending His children into the Promised Land. 400 years back into the future, the Lord our God reminds us of this very thing, and reminds His people of His great mercy and purpose:Deut. 9:4 No, it is on account of the wickedness of these nations that the Lord is going to drive them out before you. It is not because of your righteousness or your integrity that you are going in to take possession of their land; but on account of the wickedness of these nations, the Lord your God will drive them out before you, to accomplish what he swore to your fathers, to Abraham, Isaac and Jacob. 6 Understand, then, that it is not because of your righteousness that the Lord your God is giving you this good land to possess, for you are a stiff-necked people.So, ah, God’s chosen people is right. A bad apple picked from all the other bad apples. Moses was giving them a stark reminder of just where they had come from. They were all the children of slaves. And these were not people who were enslaved by the sword. They were enslaved by need, greed, and with the slow, steady devotion of an entire culture. Moses had to remind them of that because the old ones were almost all gone. Joshua, his apprentice, and himself were two of the very last, and he wouldn’t be going on. Lots of stuff to unpack there, but we’ll save that for later.  And that last verse, referring to the Israelites as a stiff-necked people. We see that theme again in 7:4: “for they will turn your children away from following me to serve other gods, and the Lord’s anger will burn against you and will quickly destroy you.” Oh yeah… so maybe God knows his own people just a little bit, and so did Moses. Remember the Golden Calf? Moses sure did, and so did God. God’s instructions to the Israelites to “show no mercy” was not the vicious command of a cruel God, but the merciful judgment of a God who knew His people were too weak, as are we all, to resist the lure of other religions. Can you see how it all ties together? What we are seeing here is not cruelty, hatred, or even, by this time, wrath. What we are seeing here is the command of a loving God who was not left a choice. Remember, the Jebusites listed above were encountered before, and the first ever recorded instance of tithing occurred at that encounter. Even they had fallen from grace that far. God was forced to remove them from the world. And instead of using Holy Atomic Fire, like Sodom and Gomorrah, He used His favorite tool: us. So when someone asks you about the god of whatever testament, now you can walk them through it step by step and maybe find your own areas to contextualize. In the comments section, let’s discuss other areas where people struggle with God’s supposed cruelty and perhaps nail them all down. God bless you all!

First Entry

September 12th, 2012

Please be advised: the following is the crazed imaginings of a diseased mind. This is the intersection of faith and technology. In this blog you will read the interesting but true wonderings that go on in my mind. Therefore, expect the unexpected, or, better, unexpect the expected.

  The things I plan to discuss here involve the various Linux Distributions I use and have used, the Life and Times of Moses, tips and tricks for the Gnome3 graphical user interface, Christ in the Old Testament, virtualization for you and me, so forth and so on. If some of what I just said sounds like Greek, then good. You are prepared to go forward. If it all sounded interesting to you, then good, you are ready to read. If you are already falling asleep, then good, have a nice nap. See? Everyone’s happy.

  I’ll also be discussing my projects and their status’. These include Recovery OS, which hasn’t been announced yet, and my new book project that I’ll outline at a later date. These two will post when necessary. Speaking of which, anyone know of some free hosting for Linux OS’s? I need a place to hang my ISO’s as my own hosting site would probably want more money if I posted it here.

 Now some info about myself. Currently, I am running Fedora 17 on a Sony Vaio. Yeah, go ahead and tell me I am stupid in the comments. I love the OS, but the Vaio forced me to switch from Linux Mint to one of the Fedora based Distros. Mind you, the learning experience has been incredible, and I am thankful that I have been able to learn at the forefront of technology, first at the feet of OpenSuse, and then under the hat of Fedora. That said, I do still miss Linux Mint, and will most likely go back some day. Till then, I conduct my little projects and experiments to see where they go and how long it takes till I break them. Fedora has, so far, proven to be surprisingly resilient and, more importantly, the community is top notch. Seriously, they don’t just give you the work around, they provide the fixes to get you running. RPM Fusion is one of the best repositories I have ever seen. It’s rare to find so many meta packages to keep your system up to date for you without external programs. Gotta love it! There’s something nice about being so far upstream, too. They update very, very regularly. Thankfully, I can choose when to update as opposed to being bothered with it.

 That was the technical side. Now for the faith side. I have been a Christian for most of my life. Raised in a Christian home, I was plunged into the secular, anti-Christian atmosphere of the US Army in the 2002 and learned the true meaning of faith in action. I have lived my faith since. Not that I haven’t hit any bumps in the road. If anything, I could say that I haven’t hit any road for the bumps, but just as with my technical side, I’m learning and thankful for the opportunity to grow and change and improve my skills and knowledge.

 That’s why this is a fusion of the Spiritual and the Technical, because I can’t really separate the two, not without bifurcating my own mind and life. I pray for God’s blessings on you all.