I am in the same boat.
Have a mid-2011 27" iMac running Mavericks, tried to upgrade to Yosemite but never got past the "22 minutes remaining" mark, and then it showed an error that said my disk needed repair.
Since the disk that was running was the one that needed repair, I made a boot-USB for Yosemite and started my iMac off of that. The disk had a ton of permissions errors which could not be repaired, and the disk itself could not be repaired. There had been zero malfunction or trouble with the disk until I tried to upgrade.
Now, I when I try to command-R from the startup, I am given options to install OS X or restore from backup, but my hard disk is "locked" and there is no way I can see to unlock it. I tried to change permissions in the command-line with chmod but nothing seems to do the trick.
I went so far as to run to Best Buy to get a Thunderbolt cable and opened my iMac in T mode from my MacBook Air, and I can mount the iMac drive and drag files back and forth, but even DiskWarrior says it cannot repair the drive.
Apple tech support on the phone said my drive is fried and since I'm under AppleCare I am going into the store tomorrow.
This all seems a bit much, and I think if I knew how to unlock those drives, much of this would be solved.
So: anyone know how to unlock a drive?