Moving Jail's Storage (Nextcloud)

Status
Not open for further replies.

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Hello,

In my FN 11 box I have 3 drives. A small 256 SSD and 2 larger drives in Mirror. I created a jail to use as a FAMP stack web server which is working nicely, and on the web server I installed Nextcloud. Everything is working.

I followed a how to to setup the mounts and storages. However, as I understand it, nextcloud is storing its files in the jails file system, and being that jails are on the SSD, I think its going to run out of space rather quickly.

I'm hoping to get this nextcloud install to store files outside of the jail. If you see the attached image showing the storage structure, I'd like files to be stored in RaidStorage>Cloud dataset and not in the FastStorage>Jails>Webserver.

Is this possible?

Screen Shot 2017-05-03 at 4.28.09 PM.png

Screen Shot 2017-05-03 at 4.21.37 PM.png
 
Last edited:

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
You can mount any directory or dataset from your FreeNAS system in your jail.

http://doc.freenas.org/9.10/jails.html#add-storage
Thanks for the quick reply. I just updated post, noting its FN 11. Does that make a difference?

I did read the docs about the storage. And that's where I'm not clear. In the second attached image, that is the storage I created.

Source: /mnt/RaidStorage/Cloud
Destination: /Cloud

I SSHd to both the FN and the jail.

In the jail "/Cloud" I see all the files Nextcloud is managing.

In the "/mnt/RaidStorage/Cloud" there's nothing there.

So not sure what to do. The "/Cloud" is in the jail and it is growing in size, using up SSD space. Trying to avoid that.
 
Last edited:
Joined
Jul 10, 2016
Messages
521
The 2nd screenshot says "Mounted=false", so the storage isn't mounted. Check the box and try again. Note that you're using both "Cloud" and "cloud", the names are case sensitive.

Also note that if a folder with the same already exists in the destination, the storage will mounted "on top of it", and you will no longer the see the original files that were in there, until you unmount the storage. You should copy/move the files from /cloud to /mnt/RaidStorage/Cloud first.

It may be wise to first experiment with a foldername that does not exist, e.g. /cloud_test
 

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
I did change that after taking the screensnips. It is mounted now. And case of "/cloud" it is only here in the post that I used a diff case (I guess readability). After checking the mount box, supposed to restart anything? Have to manually copy existing (premount) files over? And new stuff be copied over auto?

But even if above is true, "/cloud" is still causing jail to grow and SSD to lose space as Nextcloud adds more files.

Maybe I need to set Nextcloud to use a share instead, like a windows share, though I'm not yet sure if any issues with that.
 
Joined
Jul 10, 2016
Messages
521

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Well, for some reason after checking the mounted box, nextcloud gives me an error "Please check that the data directory contains a file ".ocdata" in its root." and the "/cloud" directory in the jail where every upload was stored is now empty. Crap...

If I mounted /mnt/RaidStorage/Cloud (source) to /cloud (destination) then any files placed in /cloud in the jail should now actually be written to the /mnt/RaidStorage/Cloud, right? I hope that's the case. But sucks that everything that was in /cloud has been wiped. I think I recall something about that happening when mounting when reading through docs, but not sure..

Grr...
 
Joined
Jul 10, 2016
Messages
521
I don't think the original files are gone, they are just sitting underneath the folder with the same name that was mounted "on top of it", See my post #4 in this thread.
 

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Anyone know how would I go about temporarily re-accessing the files "underneath"? Since there were several files transferred over through nextcloud before the dataset was mounted, nextcloud's db still showing those files in the UI but with not found when clicking a file. Last thing I want to do is break this working setup though.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Anyone know how would I go about temporarily re-accessing the files "underneath"? Since there were several files transferred over through nextcloud before the dataset was mounted, nextcloud's db still showing those files in the UI but with not found when clicking a file. Last thing I want to do is break this working setup though.
stop the jail, make sure the storage is unmounted. copy or move the directory you previously couldnt access.
 

ChrisNAS

Explorer
Joined
Apr 14, 2017
Messages
71
Thanks for your reply. I ended up deleting users, repairing nextcloud and all is fine. I imagine those files are still sitting there, but wasn't much, so, not worth risking breaking things.
 
Status
Not open for further replies.
Top