Automatically created folder and how to deal with it

Status
Not open for further replies.

Matute

Dabbler
Joined
Apr 12, 2017
Messages
21
Hi all, I'm fairly new to FreeNAS but been reading and experimenting quite a lot lately. Built two boxes and am testing several things prior to go into production mode. Today looking I realised something after some research and some console work on FreeNAS.

Scenario is:
FreeNAS-9.10.2-U3
1 Volume (let's call it FN1)
1 dataset inside FN1 called "VMs SIM"

I created a NFS share pointing to "/mnt/FN1/VMs-SIM" (note the dash instead of the space!)
I mounted that NFS share on a VMWare ESXi server and created 3 VMs

I realised something wasn't working fine when at the FN GUI I saw no space consumption on "VMs SIM" althoug I had 40 GiB disk usage on the ESXi. Long story short, after logging into the console, looking at what mount showed, looking at the /mnt/FN1/ and everything I realised the the mount automatically created that directory name for me in FN1, so now in /mnt/FN1/ i have a directory called "VMs-SIM" (which is a directory living in FN1 and a directory called "VMs SIM" which is the mount point of the dataset called "VMs SIM")...

First question: I can share with NFS the dataset "VMs SIM" (as I intended originally) and move everything where it belonged, then delete the wrong share, but how should I delete that directory afterwards? is the console the right place to do that?
Second question: what if I log into the console and just move (mv command) everything from one place to the other? (ie: "mv /mnt/FN1/VMs-SIM/* /mnt/FN1/VMs\ SIM/")

Thanks!
 

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
Yeah, get it setup the right way and move it all over (If they're important VM's I recommend copy and check not move), once that's done you can use console to remove the directory like rmdir, will probably have to force remove it given it will probably say it's in use. Just make sure if they're important files that it's all working before deleting originals.
 

Matute

Dabbler
Joined
Apr 12, 2017
Messages
21
Vito, thanks for your advice.
As I'm fairly new to FN I still haven't got the full picture. I would really appreciate it if someone could shed some light over this:

1- I see that when a dataset that was created with unix type of share get's populated by a client using a NFS type of share you can see what's been written on it from the console, now what if a dataset has been shared using iScsi and formated in whatever FS the client connected to that share uses... then I assume that dataset would not be readable at all from the console. Not only that, you wouldn't know from the GUI how much free space is left..

2- Then how safe is using the console to mess with the contents of a dataset? once again I assume that if the dataset has been shared as a file share rather than a block shared device, it must be more or less secure right?

3- If that's the case I should be able to just copy (using cp -r) directly from the console, right?

I'm asking all this questions just to end up with a better understanding of whats going under the hood, sorry if I have missed a point or asked something too stupid.

I'm really enjoying learning about FN a lot, I feel treating it with respect (ECC memories, adequate HBA, etc) confronts you with a rock solid product that performs really good.

Thanks.
 
Status
Not open for further replies.
Top