# Re-export CIFS mounted share?

## chrisrot

Hi,

I want to mount shares from a W2K3 server via CIFS and re-export these shares via NFS to an AIX machine.

The first part is easy. My /etc/fstab

```

//192.168.101.163/Projekte /mnt/projekte cifs           credentials=/etc/credentials,gid=fe,file_mode=0664,dir_mode=0775,domain=bladomain

```

I can read, write and browse the windows share without any problems.

The second part, itself, is also easy. But combining both steps gives

```

mount: 192.168.11.62:/mnt/projekte failed, reason given by server: Permission denied

```

My /etc/exports

```

/mnt/projekte 192.168.11.57(rw,async,insecure)

```

Any suggestions ?

----------

## adaptr

Did you do this as root ?

Do you have root NFS access enabled at all?

The user exporting the NFS share has to have rw permissions on the CIFS share, and you will then need to use this user to access the NFS share from the other machine as well.

----------

## chrisrot

Yes I did it as root.

I played around a bit, also with the first share mounted via nfs not cifs. 

I have remotehost (w2k3 or linux), middlehost (linux, gentoo 2005.0, 2.6.10) and targethost (aix or linux mandrake 6). I want to mount shares from remotehost on targethost, but targethost has no cifs.

I tried this on the middlehost

```

mkdir /mnt/mp/inner_mp

touch /mnt/mp/test

mount -t cifs (or nfs) remotehost:/share /mnt/mp/inner_mp

```

then I create a /etc/exports and do exportfs -r

```

/mnt/mp targethost(rw,sync)

```

I check whether it's correct mounted on the middlehost

```

ls -la /mnt/mp

drwxrwxrwx root root inner_mp

-rwx---------  root root test

ls -la /mnt/mp/innermp

-> lots of files from remotehost with

drwxrwxrwx root root ....

```

Everything seems to be allright.

Then on the targethost

```

mount -t nfs middlehost:/mnt/mp /mnt/target

ls -la /mnt/target

drwxrwxrwx root root inner_mp

-rwx---------  root root test

ls -la /mnt/mp/innermp

-> It's empty

```

I can reexport /mnt/mp/innermp on middlehost via samba without problems. 

The problem seems to be nfs. Are there any nfs options, I've overseen ?[/code]

----------

## wan-geek

I'm anxious to know if you ever got this working?  I'm trying to create a data pool between several systems and want to do it via NFS...but then re-export the pool back out to clients.  Basically creating a NFS based NAS.

Any ideas?

-Chris

----------

