Owncloud not available after unlock and ZFS import via SSH

Status
Not open for further replies.

Sonic1234

Cadet
Joined
Sep 11, 2014
Messages
4
Hi,

I unlock and mount my volumes with a script like this:

/usr/bin/ssh root@[FREENAS IP ADDRESS] geli attach -j ~[FILE WITH THE PASSPHRASE] -k /data/geli/[SOME LONG FILE NAME].key /dev/gptid/[SOME LONG DEVICE NAME]

/usr/bin/ssh root@[FREENAS IP ADDRESS] zpool import -R /mnt [ZFS VOLUME NAME]


so far everything is fine. The Volumes are available and I can use them normaly.
Only the Owncloud service wount start at all this way.
If I use the GUI to unlock and import the volumes, everything works fine and Owncloud is available.

Any suggestions what I'm doing wrong?

Infos:
-FreeNAS-9.2.1.7-RELEASE-x64 (fdbe9a0)
-owncloud-7.0.2-amd64

Please let me know if further infos or logs are needed
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, for starters you shouldn't be doing stuff from the command line... so you might want to start there.....

The GUI offers the option to unlock pools. Use it. What you are doing is circumventing the OS, and I can't say I feel too bad for people that do stuff from the CLI. We've seen people lose their pools because of CLI stuff. So get in the habit of using the WebGUI for your own sanity.
 

Sonic1234

Cadet
Joined
Sep 11, 2014
Messages
4
I'm looking for functions like remote startup with automated unlock and pool import. This is not offered by the GUI.
Furthermore I personally believe that learning goes through trial. During that process, I of cause don't store my most important data on the system.

Any other suggestions then to resign?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, if you want startup with automated unlock and pool import then that is easy to fix... don't encrypt the pool. Literally, the *whole* purpose of encryption relies on it NOT auto-mounting. Otherwise if someone stole your server they'd still have access to your data since they encryption key AND decryption key would have to be on the system. The whole point is to inherently deny *everyone* access to the data until you validate you have permission to access it (in this case, using the appropriate encryption key).

What you are asking for seems to conflict with yourself. I recommend you sit down and figure out *if* you want encryption and how the behavior changes when you make that choice.

Encryption isn't for everyone. There is added complexity involved that makes it a non-viable solution for some users.

In any case, I recommend you take a look at whether you need encryption or not. I tend to think you don't because you are asking for it to auto-decrypt and someone concerned about the security of the data wouldn't want auto-decryption.
 

Sonic1234

Cadet
Joined
Sep 11, 2014
Messages
4
I have been "sitting down" and I know I want encryption. The idea is to pull the key of a different machine and then delete it after the drives are mounted. This works already fine!
All I'm looking for is some help to get owncloud running. No need for discussions what I want, don't want, whats unsecure, what I should be doing and so on. Thanks
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
If you want to build a script that unlocks your pool I suggest you don't have it automated in any way. It should be something you run from the cli and provide a pass phrase as run time. With that in mind you can use the RESTfull interface that freenas provides to unlock your volume. I believe what happens is after the unlock it restarts all your services because they will now have access to your pool. If you are doing any soft of automation that can be done via the GUI you should be using the API instead of calling the CLI directly.

http://api.freenas.org/resources/storage.html#unlock
 
Status
Not open for further replies.
Top