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.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
CIFS is not officially supported.
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.
Method 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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0