How to remove a sub-directory under the pool directory?

Status
Not open for further replies.

jimjamz

Cadet
Joined
Dec 12, 2015
Messages
7
I wanted to create a share by first going to Sharing then creating a new UNIX (NFS) Share called share_nfs. This was created at /mnt/myPool/share_nfs.

However, I realised this wasn't added to the current pool. Looking at my pool under the Storage section, the new share wasn't listed. So I deleted the entry by going to Sharing -> UNIX (NFS) Shares, selecting the entry I had created and then selecting Delete.

I then went to Storage and selected my current pool, then chose Create Dataset. I set up the dataset to be called the same thing, share_nfs and then selected Add Dataset. However, I received the following:

"The path /mnt/myPool/share_nfs already exists."


How can I remove this directory so that I can create it again using the Add Dataset feature? I've tried removing it using the shell, but it doesn't allow it, even as root.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
A share is merely a pointer to an actual location. By deleting the share you did not delete the FOLDER that you created when making the share (because the path didn't already exist on the pool). What you see in Storage are your volumes and datasets. You can't make a dataset with the same name as a folder located within the same path.

What you need to do is open up a putty connection (preferred) or use the web gui shell (ugh). If you are sure there are no files in that location that you care about run this command
'rm -rf /mnt/myPool/share_nfs' without the quotes (note: this will delete anything in that path, so make sure you have the path correct)
 
Status
Not open for further replies.
Top