Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Deleting invalid Volume

Status
Not open for further replies.

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
I am currently using the FreeNAS-8.0-RC4-amd64 build and when creating volumes I apparently used an invalid character ('\' or the space) in the name. Now, when viewing the storage tab, I get the message "Sorry, an error occurred".

I am also unable to delete the volume and wonder if there is some way to fix the database or delete the volume via the CLI. The full volume name is: "/mnt/NASDat01/TV\ Shows"

Also, can someone direct me to any documentation on the CLI? Thanks in advance.
 

matthewowen01

Neophyte Sage
Joined
May 27, 2011
Messages
566
if you are sure you want to remove it, log in via ssh, su to root, then use the command

zpool destroy yourPool


or if you just nuke it:
zpool destroy -f yourPool
 

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
if you are sure you want to remove it, log in via ssh, su to root, then use the command

zpool destroy yourPool


or if you just nuke it:
zpool destroy -f yourPool

Thanks. I've tried that before (without the -f) but in both cases it results in the following error message.

freenas# zpool destroy "/mnt/NASDat01/TV\ Shows"
cannot open '/mnt/NASDat01/TV\ Shows': invalid character '/' in pool name

Any other ideas?
 

Tekkie

Senior Member
Joined
May 31, 2011
Messages
344
Have you tried:

zpool destroy "/mnt/NASDat01/TV Shows"
 

esamett

Senior Member
Joined
May 28, 2011
Messages
343
I had a problem of corrupted drives after deleting a zfs array while I was playing around with FN8.0-Release. Any array I would build had a 1.8TB size regardless of the number of drives. I needed to use GPARTED to remove the GUID and start again. I posted my problem with bug-tracker.
 

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
what does it output...

and what is the output of 'zfs list'

Here is the output of both commands. Note that according to the web GUI there is a volume named "/mnt/NASDat01/TV\ Shows"
freenas# zpool destroy "/mnt/NASDat01/TV\ Shows"
cannot open '/mnt/NASDat01/TV\ Shows': invalid character '/' in pool name
use 'zfs destroy' to destroy a dataset

freenas# zpool destroy "/mnt/NASDat01/TV Shows"
cannot open '/mnt/NASDat01/TV Shows': invalid character '/' in pool name
use 'zfs destroy' to destroy a dataset


freenas# zfs list
NAME USED AVAIL REFER MOUNTPOINT
NASDat01 227G 1.56T 30K /mnt/NASDat01
NASDat01/Data01 3.99G 1.56T 3.99G /mnt/NASDat01/Data01
NASDat01/Documents 543M 1.56T 543M /mnt/NASDat01/Documents
NASDat01/Movies 14.3G 1.56T 14.3G /mnt/NASDat01/Movies
NASDat01/Music 15.5G 1.56T 15.5G /mnt/NASDat01/Music
NASDat01/Photos 161G 1.56T 161G /mnt/NASDat01/Photos
NASDat01/TVShows 30.9G 1.56T 30.9G /mnt/NASDat01/TVShows
 

matthewowen01

Neophyte Sage
Joined
May 27, 2011
Messages
566
AhHA!

here is the problem, zpool destroy can only destroy storage pools, NASDat01/TVShows is not a storage pool, it is a dataset of the storage pool NASDat01.

if you want to nuke everything, zpool destroy -f NASDat01

if you just want to get rid of the dataset, zfs destroy -f NASDat01/TV\ Shows should do it.
 

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
Thanks but I still can't seem to get it to disappear. The actual name is "NASDat01/TV\ Shows" (note the slash '\'). I was able to create it using the Web GUI and it still appears there. However, it does not appear to be a real dataset or even exist. So I am thinking the name is still stuck in some database. The original problem still exists where the storage tab shows "Sorry, an error occurred" and the tree (left pane) shows "/mnt/NASDat01/TV\ Shows" exists.
 

matthewowen01

Neophyte Sage
Joined
May 27, 2011
Messages
566
Thanks but I still can't seem to get it to disappear. The actual name is "NASDat01/TV\ Shows" (note the slash '\'). I was able to create it using the Web GUI and it still appears there. However, it does not appear to be a real dataset or even exist. So I am thinking the name is still stuck in some database. The original problem still exists where the storage tab shows "Sorry, an error occurred" and the tree (left pane) shows "/mnt/NASDat01/TV\ Shows" exists.

so what you are saying is that the dataset was successfully deleted and you can see that from the cli, but it still appears in the web gui?

i unfortunately do not know how the data is stored for the gui, hopefully someone else does. i'll start digging around for you though.
 

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
I'm not sure it was really ever created. I think the GUI just allowed the invalid character (bug), created an entry in the database and then failed on the actual create step. I do remember I was never able to access a dataset with that name. Thanks! I've been looking for info on the database as well with no luck so far....
 

matthewowen01

Neophyte Sage
Joined
May 27, 2011
Messages
566
when you ran zfs list, the dataset was listed so it was created.

why don't you start a new thread asking how to reset the database.
 

Nabber

Neophyte
Joined
Jun 1, 2011
Messages
10
when you ran zfs list, the dataset was listed so it was created.

why don't you start a new thread asking how to reset the database.

Actually, the dataset was not listed. Note that the problem name contains a space and a '\' character. The other 'TVShows' has no space or '\'.

And yes... I should start a new thread.... :) Thanks for your help!
 
Status
Not open for further replies.
Top