rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
553 stars 137 forks source link

Support Share renaming #865

Open schakrava opened 9 years ago

schakrava commented 9 years ago

http://forum.rockstor.com/t/rename-pools-and-shares/424

henfri commented 8 years ago

Hello Suman,

can I savely rename a Share by mv /mnt2/share /mnt2/share_new?

Greetings, Hendrik

holmesb commented 8 years ago

Hi, I have the same question. Any repercussions if I simply mv in order to rename a share? Many thanks.

schakrava commented 8 years ago

/mnt2/[share_name] is a temporary mount point. The Share/Subvol is actually under /mnt2/[pool_name]/[share_name].

You can rename a share by mv /mnt2/[pool_name]/[share_name] /mnt2/[pool_name]/[new_name]

You'll loose samba, nfs configurations. But the Share itself and it's snapshots should be in tact. Rockstor detects the change and updates it's state. It may take a minute for the UI to reflect the change. Good luck!

Tecla commented 5 years ago

/mnt2/[share_name] is a temporary mount point. The Share/Subvol is actually under /mnt2/[pool_name]/[share_name].

You can rename a share by mv /mnt2/[pool_name]/[share_name] /mnt2/[pool_name]/[new_name]

You'll loose samba, nfs configurations. But the Share itself and it's snapshots should be in tact. Rockstor detects the change and updates it's state. It may take a minute for the UI to reflect the change. Good luck!

Is this workaround still applicable? Or should I create a new share and copy just to be safe?

phillxnet commented 5 years ago

@Tecla @schakrava's (Project lead) advise should still be good but as stated you may have to refresh the Web-UI a couple of times or so before it 'catches up'. Just remember to check all function and address possible side effects, ie samba shares may need to be re-established.

Try it on a test share and see how it goes. Also better to discuss this on the Rockstor forum https://forum.rockstor.com/ as more eyes and other's there who may have experimented more. There has been some inroads to this capability made in the stable branch, ie: pull request: "improve subvol mount code robustness. Fixes #1923" #1924 added in where we moved to using subvolid rather than name for mounting (added in 3.9.2-24 May 2018)

You may, prior to boot, end up with two active mount points after the change and before a reboot so make sure to test all functions after also having rebooted as we perform some steps only on boot up.

There are also some as yet uncommitted changes that make inroads into renaming pools but that is another story/issue "Support Pool renaming" #864