Network and Storage Protocols

How to rename CIFS share in FAS3140 ONTAP 7.3.4?

NISHANT_KOHLI
12,649 Views

Hi,

I am in a situation where i need to rename a CIFS share, however I read somewhere CIFS shares cant be renamed.

They will need to be destroyed and recreated with new name. If this is what I need to do, will I loose any data in the original CIFS share, which has been deleted.

My plan,

1. Create a Volume.

2. Create a Qtree on the Volume.

3. Create a CIFS share using this Qtree.

4. User will write data to this share.

5. When required, create a new CIFS share with correct name on same Qtree and delete the orignal CIFS share.

Will I loose any data in this way or is this feasile ?

Will the new CIFS share will have access to same data as old CIFS share ?

Any suggestions?

Thanks

Nishant Kohli

.

1 ACCEPTED SOLUTION

kdave
12,648 Views

The share configuration is based on the path to the share, so yes it is the same qtree.  Hopefully the below will help explain -

share name - first_share

path to share - /vol/my_volume/my_qtree

Map a drive to your share "first_share" and create some files/folder etc

Delete the first share and create a new share to the same location

share name - second_share

path to share - /vol/my_volume/my_qtree

The paths are the same, its just the share name that has changed.  You can have multiple share names that point to the same location.

View solution in original post

6 REPLIES 6

kdave
12,649 Views

You cannot rename an existing shares.  You have to delete it and recreate.  This process does not impact the data that exists in the share.  The data, permissions etc will be retained.

In relation to the question on access.  The access is based on the share permissions that you set upon creation.  As long as the new share has the same permissions as the old one it will retain its access.

NISHANT_KOHLI
12,649 Views

Dave,

Thanks for the response.

1 more question please.

If I am deleting a share and recreating it, how does NetApp figure out, I am pointing to same data as old share. Does it happen because I will be using same Qtree?

Regards,

Nishant Kohli

kdave
12,649 Views

The share configuration is based on the path to the share, so yes it is the same qtree.  Hopefully the below will help explain -

share name - first_share

path to share - /vol/my_volume/my_qtree

Map a drive to your share "first_share" and create some files/folder etc

Delete the first share and create a new share to the same location

share name - second_share

path to share - /vol/my_volume/my_qtree

The paths are the same, its just the share name that has changed.  You can have multiple share names that point to the same location.

NISHANT_KOHLI
12,648 Views

Thanks a million Dave. That will help me a lot with my project.

banetappnow
12,649 Views

Nishant,

CIFS shares and qtrees/data are fundamentally separate entities. A qtree is a folder on disk, in which data is stored, based on security permissions which are also applied to the data (a qtree can therefore have NTFS or NFS permissions applied).

A CIFS share is simply a "published" network path that allows a user to navigate to the qtree/data from a Windows PC.

If you delete a CIFS share (e.g. toaster> cifs shares -delete share1) then all you are simply doing is removing the published network path to the data. You are not touching the data at all.

The data will only be deleted if you delete the qtree and its contents (and you can only delete the qtree if there are no CIFS data shares pointing to it I believe)

As a result, a single location on disk (e.g. /vol/myvolume/myqtree), can have multiple network paths "published" that are pointing to it, e.g.

   toaster> cifs shares -add sharename1 /vol/myvolume/myqtree

   toaster> cifs shares -add sharename2 /vol/myvolume/myqtree

A CIFS user could therefore map a drive letter to \\toaster\sharename1, and \\toaster\sharename2 and both would be pointing at the same disk/data.

This is why then a CIFS data share cannot be renamed, you have to effectively "un-publish" the original name, and "publish" the new name to the network. The underlying data remains untouched.

We have standards that marry our qtree and AD security group names to the CIFS share name, so if we do a CIFS share rename we have to rename the qtree and security group(s) as well, but that's purely a working practice and will vary from one customer to another.

Adrian

NISHANT_KOHLI
12,650 Views

Thank you Adrian. That was good info.

Regards

Nishant Kohli

Storage - Guitar Center, ITO | Desk: (818) 735-8800 ext 2773

On call India Cell- +91-7875554117

E: Nishant.Kohli@Guitarcenter.com<mailto:Nishant.Kohli@Guitarcenter.com>

Public