[OpenAFS] NFS export oddness

Timothy Balcer timothy@telmate.com
Thu, 1 Nov 2012 15:59:13 -0700


--bcaec54b4adacbf36e04cd76f7b3
Content-Type: text/plain; charset=ISO-8859-1

So, as I go along with my tasks, I need to export part of a client's afs
tree via NFS to support live streaming of content on that cached copy
before it is closed and flushed to the volume.

So, I followed the AFS/NFS instructions.

I added -rmtsys to OPTIONS in afs.conf, and it shows up in the ps of the
afsd process now. I even verified that the kernel module gets unloaded
between restarts.

root      6119     2  6119  0    1 15:56 ?        00:00:00 [afsd]
root      6131     1  6131  0    1 15:56 pts/1    00:00:00 /sbin/afsd
-rmtsys -dynroot -fakestat

I setup the NFS server and exported one volume other than afs to test it
via nfsv3. Worked just fine.

unfortunately, when I try to export the /afs volume, I get this:

exportfs: /afs does not support NFS export

and when I do the explicit fs exportafs nfs command, I get this:

Sorry, the nfs-exporter type is currently not supported on this AFS client

Below is the strace of the fs command. Its very short. I'll say in advance,
the file /proc/fs/openafs/afs_ioctl is there.

Does anyone have some advice? I'm still working the problem, but the docs
are definitely weak on this one.

root@snap:~# strace fs exportafs nfs
execve("/usr/bin/fs", ["fs", "exportafs", "nfs"], [/* 18 vars */]) = 0
brk(0)                                  = 0x22bd000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7faa83c03000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=32313, ...}) = 0
mmap(NULL, 32313, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7faa83bfb000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/x86_64-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2209\0\0\0\0\0\0"..., 832)
= 832
fstat(3, {st_mode=S_IFREG|0644, st_size=105288, ...}) = 0
mmap(NULL, 2210424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7faa837c7000
mprotect(0x7faa837df000, 2097152, PROT_NONE) = 0
mmap(0x7faa839df000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7faa839df000
mmap(0x7faa839e1000, 6776, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7faa839e1000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1811128, ...}) = 0
mmap(NULL, 3925208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7faa83408000
mprotect(0x7faa835bd000, 2093056, PROT_NONE) = 0
mmap(0x7faa837bc000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7faa837bc000
mmap(0x7faa837c2000, 17624, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7faa837c2000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7faa83bfa000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7faa83bf9000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7faa83bf8000
arch_prctl(ARCH_SET_FS, 0x7faa83bf9700) = 0
mprotect(0x7faa837bc000, 16384, PROT_READ) = 0
mprotect(0x7faa839df000, 4096, PROT_READ) = 0
mprotect(0x65f000, 4096, PROT_READ)     = 0
mprotect(0x7faa83c05000, 4096, PROT_READ) = 0
munmap(0x7faa83bfb000, 32313)           = 0
brk(0)                                  = 0x22bd000
brk(0x22de000)                          = 0x22de000
brk(0x22ff000)                          = 0x22ff000
open("/root/.AFSSERVER", O_RDONLY)      = -1 ENOENT (No such file or
directory)
open("/.AFSSERVER", O_RDONLY)           = -1 ENOENT (No such file or
directory)
open("/proc/fs/openafs/afs_ioctl", O_RDWR) = 3
ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD, 0x7fff18ec3a10) = -1 ENODEV (No
such device)
close(3)                                = 0
write(2, "Sorry, the nfs-exporter type is "..., 75Sorry, the nfs-exporter
type is currently not supported on this AFS client
) = 75
exit_group(1)                           = ?


-- 
Timothy Balcer / IT Services
Telmate / San Francisco, CA
Direct / (415) 300-4313
Customer Service / (800) 205-5510

--bcaec54b4adacbf36e04cd76f7b3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

So, as I go along with my tasks, I need to export part of a client's af=
s tree via NFS to support live streaming of content on that cached copy bef=
ore it is closed and flushed to the volume.<br><br>So, I followed the AFS/N=
FS instructions.<br>
<br>I added -rmtsys to OPTIONS in afs.conf, and it shows up in the ps of th=
e afsd process now. I even verified that the kernel module gets unloaded be=
tween restarts.<br><br><span style=3D"font-family:courier new,monospace">ro=
ot=A0=A0=A0=A0=A0 6119=A0=A0=A0=A0 2=A0 6119=A0 0=A0=A0=A0 1 15:56 ?=A0=A0=
=A0=A0=A0=A0=A0 00:00:00 [afsd]<br>
root=A0=A0=A0=A0=A0 6131=A0=A0=A0=A0 1=A0 6131=A0 0=A0=A0=A0 1 15:56 pts/1=
=A0=A0=A0 00:00:00 /sbin/afsd -rmtsys -dynroot -fakestat</span><br><br>I se=
tup the NFS server and exported one volume other than afs to test it via nf=
sv3. Worked just fine.<br><br>unfortunately, when I try to export the /afs =
volume, I get this:<br>
<br><span style=3D"font-family:courier new,monospace">exportfs: /afs does n=
ot support NFS export</span><br><br>and when I do the explicit fs exportafs=
 nfs command, I get this:<br><br><span style=3D"font-family:courier new,mon=
ospace">Sorry, the nfs-exporter type is currently not supported on this AFS=
 client<br>
</span><br>Below is the strace of the fs command. Its very short. I&#39;ll =
say in advance, the file /proc/fs/openafs/afs_ioctl is there.<br><br>Does a=
nyone have some advice? I&#39;m still working the problem, but the docs are=
 definitely weak on this one.<br>
<br><span style=3D"font-family:courier new,monospace">root@snap:~# strace f=
s exportafs nfs<br>execve(&quot;/usr/bin/fs&quot;, [&quot;fs&quot;, &quot;e=
xportafs&quot;, &quot;nfs&quot;], [/* 18 vars */]) =3D 0<br>brk(0)=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 =3D 0x22bd000<br>
access(&quot;/etc/ld.so.nohwcap&quot;, F_OK)=A0=A0=A0=A0=A0 =3D -1 ENOENT (=
No such file or directory)<br>mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PR=
IVATE|MAP_ANONYMOUS, -1, 0) =3D 0x7faa83c03000<br>access(&quot;/etc/ld.so.p=
reload&quot;, R_OK)=A0=A0=A0=A0=A0 =3D -1 ENOENT (No such file or directory=
)<br>
open(&quot;/etc/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) =3D 3<br>fstat(3, {s=
t_mode=3DS_IFREG|0644, st_size=3D32313, ...}) =3D 0<br>mmap(NULL, 32313, PR=
OT_READ, MAP_PRIVATE, 3, 0) =3D 0x7faa83bfb000<br>close(3)=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 =3D 0<br>
access(&quot;/etc/ld.so.nohwcap&quot;, F_OK)=A0=A0=A0=A0=A0 =3D -1 ENOENT (=
No such file or directory)<br>open(&quot;/lib/x86_64-linux-gnu/libresolv.so=
.2&quot;, O_RDONLY|O_CLOEXEC) =3D 3<br>read(3, &quot;\177ELF\2\1\1\0\0\0\0\=
0\0\0\0\0\3\0&gt;\0\1\0\0\0\2209\0\0\0\0\0\0&quot;..., 832) =3D 832<br>
fstat(3, {st_mode=3DS_IFREG|0644, st_size=3D105288, ...}) =3D 0<br>mmap(NUL=
L, 2210424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =3D 0x7fa=
a837c7000<br>mprotect(0x7faa837df000, 2097152, PROT_NONE) =3D 0<br>mmap(0x7=
faa839df000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRIT=
E, 3, 0x18000) =3D 0x7faa839df000<br>
mmap(0x7faa839e1000, 6776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_=
ANONYMOUS, -1, 0) =3D 0x7faa839e1000<br>close(3)=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0<br=
>access(&quot;/etc/ld.so.nohwcap&quot;, F_OK)=A0=A0=A0=A0=A0 =3D -1 ENOENT =
(No such file or directory)<br>
open(&quot;/lib/x86_64-linux-gnu/libc.so.6&quot;, O_RDONLY|O_CLOEXEC) =3D 3=
<br>read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\200\30\=
2\0\0\0\0\0&quot;..., 832) =3D 832<br>fstat(3, {st_mode=3DS_IFREG|0755, st_=
size=3D1811128, ...}) =3D 0<br>
mmap(NULL, 3925208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
=3D 0x7faa83408000<br>mprotect(0x7faa835bd000, 2093056, PROT_NONE) =3D 0<br=
>mmap(0x7faa837bc000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MA=
P_DENYWRITE, 3, 0x1b4000) =3D 0x7faa837bc000<br>
mmap(0x7faa837c2000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP=
_ANONYMOUS, -1, 0) =3D 0x7faa837c2000<br>close(3)=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0=
<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0=
) =3D 0x7faa83bfa000<br>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
=3D 0x7faa83bf9000<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MA=
P_ANONYMOUS, -1, 0) =3D 0x7faa83bf8000<br>arch_prctl(ARCH_SET_FS, 0x7faa83b=
f9700) =3D 0<br>
mprotect(0x7faa837bc000, 16384, PROT_READ) =3D 0<br>mprotect(0x7faa839df000=
, 4096, PROT_READ) =3D 0<br>mprotect(0x65f000, 4096, PROT_READ)=A0=A0=A0=A0=
 =3D 0<br>mprotect(0x7faa83c05000, 4096, PROT_READ) =3D 0<br>munmap(0x7faa8=
3bfb000, 32313)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0<br>
brk(0)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0x22bd000<br>brk(0x22de000)=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0x22de0=
00<br>brk(0x22ff000)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 =3D 0x22ff000<br>open(&quot;/root/.AFSSERVER&quot;, O=
_RDONLY)=A0=A0=A0=A0=A0 =3D -1 ENOENT (No such file or directory)<br>
open(&quot;/.AFSSERVER&quot;, O_RDONLY)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D -=
1 ENOENT (No such file or directory)<br>open(&quot;/proc/fs/openafs/afs_ioc=
tl&quot;, O_RDWR) =3D 3<br>ioctl(3, CAPI_REGISTER or SNDCTL_COPR_LOAD, 0x7f=
ff18ec3a10) =3D -1 ENODEV (No such device)<br>
close(3)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0<br>write(2, &quot;Sorry, the nfs-exporter=
 type is &quot;..., 75Sorry, the nfs-exporter type is currently not support=
ed on this AFS client<br>) =3D 75<br>exit_group(1)=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D ?</span><br>
<br clear=3D"all"><br>-- <br><span style=3D"border-collapse:collapse;color:=
rgb(102,102,102);font-family:verdana,sans-serif;font-size:x-small">Timothy =
Balcer / IT Services<br>Telmate / San Francisco, CA<br>Direct / </span><spa=
n style=3D"border-collapse:collapse;font-family:verdana,sans-serif;font-siz=
e:x-small"><font color=3D"#1155cc">(415) 300-4313</font><br>
<font color=3D"#666666">Customer Service /=A0</font><a value=3D"+1800205551=
0" style=3D"color:rgb(17,85,204)">(800) 205-5510</a></span><br>

--bcaec54b4adacbf36e04cd76f7b3--