• Currently using VMware at work? We want to hear from you.

    Thinking of making a switch from VMware? We'd love to hear your thoughts and feedback about which hypervisor you have been researching or already using. Click here to vote and share your thoughts! You can vote HERE!

Rename Volume

Status
Not open for further replies.
M

medoix

Guest
Hi all,

I have FreeNAS 8 installed and working a treat!

I do however has one issue. When i setup the volumes i gave them random names when testing, i then copied all my data across (took days). But now relaise the names do not mean anything, is it possible to rename the volumes? (just had a thought while writing this) is it as simple and detaching volume and re-mounting them as a different name?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Ok, I just tested this to be sure, and I'll add it to the FAQ also:
Note: Does not work for version 8.0, tested on 8.01 beta4, workaround for 8.0 posted below. Also, will not work if volume contains datasets.

From the GUI
Storage -> View All Volumes -> Export (button next to pool name)

Now from console/command line, assuming original pool was called tank.

zpool import tank NEW-NAME

you get an error saying the mountpoint doesn't exist, ignore it.
do a zpool status -v and verify your pool has been renamed
now do 'zpool export' again

Go back to the GUI

Storage -> Volumes -> Auto Import Volume

That's it!
 
M

medoix

Guest
Thanks for the quick response. When you say "Export Volume" do you mean "Destroy volume" ?

I cannot see an export button anywhere...
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
NO... Not Destroy! Thanks for confirming. What version are you using? 8.0 or 8.01 beta#?
 
M

medoix

Guest
I didn't think so :P

I am running FreeNAS-8.0-RELEASE-amd64
 
M

medoix

Guest
Also as i am new to FreeNAS how easy/hard is it to upgrade? I use OSX and i was reading your FAQ post and noticed that 8.01 Beta5 will support it Time Machine etc. How does one go about upgrading the FreeNAS OS?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Thanks for checking out the FAQ. I should have asked what version you were using first because the export button isn't there in 8.0. I have an 8.0 test system and I'm trying to come up with an alternate. The problem is that if you don't export it from the GUI, the database gets out of sync. Let me answer your other question and then go back and revise my instructions for 8.0.

The upgrade method for the betas depends, you should check the release notes. For 8.01 beta4, it's recommended to upgrade using a CD, but even though it offers to upgrade the settings don't always get transferred cleanly. You're better off to reflash with beta4, Auto Import your pool, and re-enter your settings by hand. If you want to do that, then the Export button will be there! ;-)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Well, with version 8.0 if you can't export, the database (GUI) still has the old name and the only way I can think of to purge the old name from the database is if you first export your pool from the command line 'zpool export your-pool', then do a factory reset under System -> Settings -> Config

After that continue at the step where you do an import with the new name (zpool import tank NEW-NAME).

You'll also have to re-enter your settings by hand because if you restore them then the pool name will be out of sync again.

I tested this and it worked for 8.0
 
M

medoix

Guest
Thanks for the work protosd! I think i might just wait until my files coping finishes and do an upgrade to beta4, then it seems i can do it easier without the reset.

Thanks again and glad i could help towards your FAQ.
 

bertrem

Dabbler
Joined
Feb 19, 2013
Messages
15
A couple clarifications/findings/updates relative to FreeNAS version 8.3.1 beta3:
1. "export" is no longer in the GUI and seems to have been renamed "detach".
2. Do not run the console commands from the shell in the GUI! For whatever reason, the import command appears to hang when run there, though it does actually seem to run to completion before doing so. Nonetheless, not a warm and fuzzy feeling. On the contrary, it worked perfected fine when run from the console's shell.

[EDIT]: I think I recant on #2, as it appears this was likely my fault for having tried to use "data" as the name/mount point for the volume and not realizing that unlike in the GUI, "/mnt/" would not be automatically prepended. Hence, I'm guessing this conflicted with /data, which was probably being used by FreeNAS for who-knows-what, and so needless to say, it didn't react very well when this path was ripped out from under it. Soo... this may very well work out OK from within the GUI's shell. Or it may not. :p Personally, I shall refrain from experimenting. YMMV, and all that.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
A couple clarifications/findings/updates relative to FreeNAS version 8.3.1 beta3:
1. "export" is no longer in the GUI and seems to have been renamed "detach".
2. Do not run the console commands from the shell in the GUI! For whatever reason, the import command appears to hang when run there, though it does actually seem to run to completion before doing so. Nonetheless, not a warm and fuzzy feeling. On the contrary, it worked perfected fine when run from the console's shell.

Thanks Bertrem, good info to know. Sometimes the developers don't realize the consequences of the changes they make. It would be helpful if you could open a ticket at support.freenas.org and explain what you posted. It seems like a recipe for future problems and it's better to get it looked at before the final release.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
A couple clarifications/findings/updates relative to FreeNAS version 8.3.1 beta3:
1. "export" is no longer in the GUI and seems to have been renamed "detach".
2. Do not run the console commands from the shell in the GUI! For whatever reason, the import command appears to hang when run there, though it does actually seem to run to completion before doing so. Nonetheless, not a warm and fuzzy feeling. On the contrary, it worked perfected fine when run from the console's shell.
It wasn't named export in 2011. :p
 
Status
Not open for further replies.
Top