Rename a shared folder?

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
To be clear, the "/mnt/WinShare/Media/Old Photos is a data set on my FreeNAS server, and I wish to mount OldPhotos on my Ubuntu machine.

I tried this again
//192.168.0.22/OldPhotos /mnt/WinShare/Media/Old\040Photos cifs credentials=/home/rob/.smbclient
bash: //192.168.0.22/OldPhotos:

rob@rob-Z97:~$ sudo mount -a -vvv
[sudo] password for rob:
/ : ignored
none : ignored
/mnt/WinShare/Media/Music: already mounted
/mnt/WinShare/Media/Films: already mounted
Couldn't chdir to /mnt/WinShare/Media/OldPhotos: No such file or directory
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
yes I will do that , but I need to change the name of Old Photos to OldPhotos or Old_Photos

When I tried mv Old Photos OldPhotos it returned OldPhotos is not a directory.
Also I tried zfs rename and it flashed up some message about allowing it.
 
Joined
Jan 7, 2015
Messages
1,155
I suggest you read the manpage on zfs rename before you start just trying things.

So in the SMB sharing you have a cifs share created that is OldPhotos which is in reality the path /mnt/WinShare/Media/Old Photos? Are we on the same page?

The command I gave should get it all mounted to Ubuntu if this is the case. Then its a matter of adding the fstab entriy of which rvassar highlighted as I dont know if quotes can be used in the fstab file either. FSTAB entry --->>> //192.168.0.22/OldPhotos /media/old_photos cifs credentials=/home/rob/.smbclient Remeber //192.168.0.22/OldPhotos is the share path, and it is actually the directory on FreeNAS "/mnt/WinShare/Media/Old Photos" this we dont care about for right now becuase Ubuntu will only see the share path //192.168.0.22/OldPhotos Where you have gone wrong is the mount directory on the Ubuntu machine.
 
Last edited:
Joined
Jan 7, 2015
Messages
1,155
I avoid spaces, learned that a long time ago. My advice now is to create the directory on Ubuntu from an Ubuntu terminal sudo mkdir -p /media/old_photos then mount the directory from FreeNAS to this directory using sudo mount -t cifs //192.168.0.22/OldPhotos/ /media/old_photos -o user=rob
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
This "/mnt/WinShare/Media/Old Photos" is a data set on my FreeNAS server, and I want to mount it on my Ubuntu machine.

Ok so what should I have done regarding the mount directory. The mount directory on the ubuntu machine is OldPhotos, what should it be, because leaving or having a space between the name , fstab reports:
mount: /etc/fstab: parse error at line 15 -- ignored.
 
Joined
Jan 7, 2015
Messages
1,155
Yes but the SHARE directory is what goes in the fstab on the Ubuntu machine. So go here to see the cifs shares (FreeNAS GUI) Sharing>Windows (SMB) In there you should have an entry "/mnt/WinShare/Media/Old Photos" as the path. What is the share name? OldPhotos?
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Yes the share name in FreeNAS smb4.conf is OldPhotos , and the path = /mnt/WinShare/Media/Old Photos
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have found the zfs man page and there are a few options to rename. Which one should I use, as it is a data set or directory I want to rename.
I did rename Old Photos to OldPhotos in the legacey samba share page of freeNAS, but all that did was to create an empty directory, not what I want, unless there is an easy way of transferring all of the files in Old Photos.

zfs rename [-f] filesystem|volume|snapshot filesystem|volume|snapshot
zfs rename [-f] -p filesystem|volume filesystem|volume
zfs rename -r snapshot snapshot
zfs rename -u [-p] filesystem filesystem
 
Joined
Jan 7, 2015
Messages
1,155
When done correctly "Old Photos" becomes OldPhotos and all your things should be there. Wrap paths with spaces "in quotes"

As for getting it mounted as-is. What I said to do in my earlier posts *should work. run this sudo mount -t cifs //192.168.0.22/OldPhotos/ /media/old_photos -o user=rob on the Ubuntu machine and report output.

Where you are failing is trying to use any path that is /mnt/NAS/Any/Directory on Ubuntu instead of that use the cifs share name "OldPhotos" so this would be the line in your fstab assuming that the directory /media/old_photos exists on the Ubuntu machine..
//192.168.0.22/OldPhotos /media/old_photos cifs credentials=/home/rob/.smbclient should be the actual line now in your fstab.

Now everything in "/mnt/WinShare/Media/Old Photos" on the NAS should now be in /media/old_photos on Ubuntu.

Ubuntu/Windows can only make sense of it written like this //192.168.0.22/OldPhotos , but its actually "/mnt/WinShare/Media/Old Photos". Does this make sense?
 
Last edited:
Top