Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Scenario

I have a headless Ubuntu 10.10 RC box running a few service applications on my home network. I have a Windows 2008 Server hosting all my network shares and hard drives. I am currently mounting the network drives at boot-up using FSTAB with the following options set:

credentails=/etc/smbcredentials, iocharset=utf8,uid=1000,gid=1000,file_mode=0777,dir_mode=0777,noserverino,sfu

Question

What option do I need to set to get SYMLINKS to properly register using CIFS? I have to admit the info in man mount.cifs doesn't seem to provide a clear enough definition of which options I should be using for proper support.

Problem

When running RSYNC from the Ubuntu machine to back up selected folders to the Windows shares, it fails trying to recreate the SYMLINKS. I am concerned that this will create a problem when later trying to restore these files back should I ever need to.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Not sure, but I fear that a cifs share, that in your case is essentially a folder on a ntfs partition available through the network, cannot manage symbolic links.
Different would be the case if the cifs share were provided by a samba server on a linux machine.

The solution that come to mind is:

  • create a huge enough file on the share (with dd, for example)
  • create a ext4 filesystem on this file
  • mount the file as a partition image, with -o loop
  • use this ext4 partition as a destination for your backup
share|improve this answer
    
Potentially a solution, and not something I considered. It would also most likely be my easiest solution. –  Diago Oct 9 '10 at 21:47
add comment

I'm pretty sure that prior to Vista, "symbolic links" in Windows (called Junctions in the MS world) could only link a directory to another directory. I doubt that cifs will be able to create junctions on a Windows share, although I see that SMB supports ioctl-style calls, so there might be a chance that a savvy client can coerce a Windows server into creating a junction.

My problem is that I want to use pxelinux to mount a Windows directory share to boot a Linux box from. It would be nice to have the file system that is accessible from Windows, because then you can expose parts of the file system on your boot server without relying on the booted machine running.

The solution I came up with is to use NFS on Cygwin. This way you can still expose the NFS mount to your Linux network. You can then use regular Windows shares to expose the same directories to your Windows network if you like.

So far, experimenting with this in a virtual machine proves to be very helpful.

-Waldemar

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.