4

The problem is that I have a directory which is mounted over CIFS. For this directory I want to create a NFS Share. I need this to create backups on a backup system which is only mountable over CIFS, from our ESX (But the ESX can only create backups on NFS Shared directorys with "ghettoVCB").

To solve this issue my first attempt was create a third Linux Machine with Debian.

test arrangement:

Backup Storage -> Debian machine (mounting CIFS directory and creating NFS Share) -> ESX (where we create the Backups)

Procedure:

Mount directory over CIFS. Then create an entry in /etc/exports for this mounted directory. After creating the export I get this Error: exportfs: /mnt/backup does not support NFS export

I hope you get what I wanted to say. If you need more information let me know.

Well someone said to me that it is not possible. Perhaps anybody of you can help me with this issue or can give me an alternative solution.

7
  • you can't export something that is already exported. either export NFS from first host (to both production server and backup host), or have another backup agent.
    – Archemar
    Commented Oct 11, 2016 at 9:34
  • Ok, you are right. Seems logic, but unfortunatley I just want to create a kind of forwarding. So the backup server is only compatible with CIFS and the ESX only with NFS (It is not depending on the service "ghettoVCB"). Do you know any solution how to create something like that? Or do you know any backupagent where I can create something like this.
    – flobbi123
    Commented Oct 11, 2016 at 9:42
  • You may try explicitly nfs <=3 as v4 seems to be more restrictive. Though maybe waste of time.
    – rudimeier
    Commented Oct 11, 2016 at 9:47
  • It might work with a user space NFS server like ganesha or unfs. But you really should thoroughly test the setup.
    – Thomas
    Commented Oct 11, 2016 at 10:39
  • I will test it and let you know if it works
    – flobbi123
    Commented Oct 11, 2016 at 11:01

2 Answers 2

3

CIFS is not officially supported.

http://nfs.sourceforge.net/

C6. Which local file systems can I export with the Linux NFS server?

A. We expect the following local file systems to work, as they are tested often: ext2, ext3, jfs, reiserfs, xfs.

These local file systems may work or may have a few minor-ish issues: iso9660, ntfs, reiser4, udf. Ask on the NFS mailing list for details.

Any file system based on FAT or not having the ability to provide permanent inode numbers will have trouble with NFS versions 2 and 3 (see question C4).

Local file systems that are known not to work with the Linux NFS server are: procfs, sysfs, tmpfs (and friends)

Don't know whether this list of supported file systems is up-to-date. However I would recommend to only use one of these supported ones. Even if other file systems may seem to work there could be subtle bugs, like ext4/nfs readdir problem.

1
  • Many thanks.. than i should see if I can find an alternative solution if it is not possible with CIFS.
    – flobbi123
    Commented Oct 11, 2016 at 9:44
2

You can pass from cifs mount to nfs export via a fuse filesystem, though I don't think I would recommend it for something as essential as backup.

When I tried this once I looked for a fuse filesystem that would be as transparent as possible, and ending up with fuse-convmvfs. This software is intended to convert filenames from one encoding to another, but if you configure it to the same encoding at both sides, it seems to work as you need.

Quite simply, if you have your cifs mount at /mnt/samba, you can mount your fuse at /mnt/fuse and export this directory by nfs using an /etc/exports entry like

/mnt/fuse backupmachine(ro,fsid=55)

and the commands

$ sudo sh -c 'echo user_allow_other >>/etc/fuse.conf'
$ sudo convmvfs /mnt/fuse -o srcdir=/mnt/samba,icharset=iso-8859-1,ocharset=iso-8859-1,user_allow_other
$ sudo exportfs -a

The user_allow_other part is probably not needed for nfs export. While this is ok as an experiment, note that nfs is dangerous with filesystems that do not use the same inode in a repeatable way, and that is probably why nfs on top of cifs is not implemented. Adding the fuse layer is not necessarily going to fix this. Perhaps if you can independently produce a list of md5 sums of each file locally on the cifs server, and locally on the backup machine, and compare the two, you might have some confidence in a backup.

6
  • You are right. Normally we backup our data directly via NFS but this is a special case, because we want to use the backup storage from our hoster.
    – flobbi123
    Commented Oct 12, 2016 at 12:14
  • I will try this and see if it works non-disruptive. But many thanks in advance!
    – flobbi123
    Commented Oct 12, 2016 at 12:15
  • Just one question. The File Converter convmfs: In which packet can I find this converter? It seems like there are only two google hits with this topic :) I just found convmv but this is not the tool I was looking for.
    – flobbi123
    Commented Oct 12, 2016 at 12:51
  • I found the fuse filesystem in package fuse-convmvfs, on Fedora 22, Ubuntu 14 and Debian 8.6.
    – meuh
    Commented Oct 12, 2016 at 14:32
  • Just one more question ... Now the connection works. If I add an entry in the cifs Folder it is pushed automatically to the nfs folder. But when I want to do this backwards, I mean from the nfs Folder to the Cifs Folder it says I have not the rights to create the data.. I think it is because of the User from CIFS. Can you help me one more time... This is a topic which is too special for me..
    – flobbi123
    Commented Oct 13, 2016 at 12:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .