* Hard linking symlink does not work @ 2020-10-23 10:13 Vasyl Vavrychuk 2020-10-27 17:12 ` J. Bruce Fields 0 siblings, 1 reply; 5+ messages in thread From: Vasyl Vavrychuk @ 2020-10-23 10:13 UTC (permalink / raw) To: linux-nfs Hi, I have found that hard links for regular files works well for me over NFS: $ touch bar $ ln bar tata But if I try to make hard link for symlink, then it fails: $ ln -s foo bar $ ln bar tata ln: failed to create hard link 'tata' => 'bar': Operation not permitted I am using NFSv4 with Vagrant, here is mount entry: 172.28.128.1:PATH on /vagrant type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=IP,local_lock=none,addr=IP) I have also verified that rpc-statd is running on host. Host machine is Ubuntu 18.04 with NFS packages version 1:1.3.4-2.1ubuntu5.3. Will appreciate help on this. Thanks, Vasyl ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hard linking symlink does not work 2020-10-23 10:13 Hard linking symlink does not work Vasyl Vavrychuk @ 2020-10-27 17:12 ` J. Bruce Fields 2020-10-27 20:03 ` Patrick Goetz 0 siblings, 1 reply; 5+ messages in thread From: J. Bruce Fields @ 2020-10-27 17:12 UTC (permalink / raw) To: Vasyl Vavrychuk; +Cc: linux-nfs On Fri, Oct 23, 2020 at 01:13:02PM +0300, Vasyl Vavrychuk wrote: > I have found that hard links for regular files works well for me over NFS: > > $ touch bar > $ ln bar tata > > But if I try to make hard link for symlink, then it fails: > > $ ln -s foo bar > $ ln bar tata > ln: failed to create hard link 'tata' => 'bar': Operation not permitted Huh. I'm not sure I even realized it was possible to hardlink symlinks. Makes sense, I guess. I think my first step debugging this would be to watch wireshark while attempting the "ln", and see what happens. That should tell us whether it's the client or server that's failing the operation. --b. > > I am using NFSv4 with Vagrant, here is mount entry: > > 172.28.128.1:PATH on /vagrant type nfs4 > (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=IP,local_lock=none,addr=IP) > > I have also verified that rpc-statd is running on host. > > Host machine is Ubuntu 18.04 with NFS packages version 1:1.3.4-2.1ubuntu5.3. > > Will appreciate help on this. > > Thanks, > Vasyl ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hard linking symlink does not work 2020-10-27 17:12 ` J. Bruce Fields @ 2020-10-27 20:03 ` Patrick Goetz 2020-10-28 8:53 ` Vasyl Vavrychuk 0 siblings, 1 reply; 5+ messages in thread From: Patrick Goetz @ 2020-10-27 20:03 UTC (permalink / raw) To: J. Bruce Fields, Vasyl Vavrychuk; +Cc: linux-nfs On 10/27/20 12:12 PM, J. Bruce Fields wrote: > On Fri, Oct 23, 2020 at 01:13:02PM +0300, Vasyl Vavrychuk wrote: >> I have found that hard links for regular files works well for me over NFS: >> >> $ touch bar >> $ ln bar tata >> >> But if I try to make hard link for symlink, then it fails: >> >> $ ln -s foo bar >> $ ln bar tata >> ln: failed to create hard link 'tata' => 'bar': Operation not permitted > > Huh. I'm not sure I even realized it was possible to hardlink symlinks. > Makes sense, I guess. What's even the use case for hard linking a symlink? That sounds like asking for trouble... > > I think my first step debugging this would be to watch wireshark while > attempting the "ln", and see what happens. That should tell us whether > it's the client or server that's failing the operation. > > --b. > >> >> I am using NFSv4 with Vagrant, here is mount entry: >> >> 172.28.128.1:PATH on /vagrant type nfs4 >> (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=IP,local_lock=none,addr=IP) >> >> I have also verified that rpc-statd is running on host. >> >> Host machine is Ubuntu 18.04 with NFS packages version 1:1.3.4-2.1ubuntu5.3. >> >> Will appreciate help on this. >> >> Thanks, >> Vasyl ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hard linking symlink does not work 2020-10-27 20:03 ` Patrick Goetz @ 2020-10-28 8:53 ` Vasyl Vavrychuk 2020-11-06 21:46 ` J. Bruce Fields 0 siblings, 1 reply; 5+ messages in thread From: Vasyl Vavrychuk @ 2020-10-28 8:53 UTC (permalink / raw) To: Patrick Goetz, J. Bruce Fields; +Cc: linux-nfs Thanks for replies about my problem. It is actually a practical one... I need to compile Yocto BSP which builds only under older distributions. For convenience I have established a Vagrant virtual machine which uses NFS to share workspace with the host machine. Now coming back to hardlinking symlinks. Yocto build system uses hardlinks to prepare sysroot for packages, and symlinks are part of that sysroot provided by other packages. On Tue, Oct 27, 2020 at 10:03 PM Patrick Goetz <pgoetz@math.utexas.edu> wrote: > > > > On 10/27/20 12:12 PM, J. Bruce Fields wrote: > > On Fri, Oct 23, 2020 at 01:13:02PM +0300, Vasyl Vavrychuk wrote: > >> I have found that hard links for regular files works well for me over NFS: > >> > >> $ touch bar > >> $ ln bar tata > >> > >> But if I try to make hard link for symlink, then it fails: > >> > >> $ ln -s foo bar > >> $ ln bar tata > >> ln: failed to create hard link 'tata' => 'bar': Operation not permitted > > > > Huh. I'm not sure I even realized it was possible to hardlink symlinks. > > Makes sense, I guess. > > What's even the use case for hard linking a symlink? That sounds like > asking for trouble... > > > > > > I think my first step debugging this would be to watch wireshark while > > attempting the "ln", and see what happens. That should tell us whether > > it's the client or server that's failing the operation. > > > > --b. > > > >> > >> I am using NFSv4 with Vagrant, here is mount entry: > >> > >> 172.28.128.1:PATH on /vagrant type nfs4 > >> (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=IP,local_lock=none,addr=IP) > >> > >> I have also verified that rpc-statd is running on host. > >> > >> Host machine is Ubuntu 18.04 with NFS packages version 1:1.3.4-2.1ubuntu5.3. > >> > >> Will appreciate help on this. > >> > >> Thanks, > >> Vasyl ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hard linking symlink does not work 2020-10-28 8:53 ` Vasyl Vavrychuk @ 2020-11-06 21:46 ` J. Bruce Fields 0 siblings, 0 replies; 5+ messages in thread From: J. Bruce Fields @ 2020-11-06 21:46 UTC (permalink / raw) To: Vasyl Vavrychuk; +Cc: Patrick Goetz, linux-nfs On Wed, Oct 28, 2020 at 10:53:20AM +0200, Vasyl Vavrychuk wrote: > Thanks for replies about my problem. It is actually a practical one... > > I need to compile Yocto BSP which builds only under older > distributions. For convenience I have established a Vagrant virtual > machine which uses NFS to share workspace with the host machine. > > Now coming back to hardlinking symlinks. > > Yocto build system uses hardlinks to prepare sysroot for packages, and > symlinks are part of that sysroot provided by other packages. For what it's worth, I can't reproduce the problem, linking a symlink works fine for me. What's your server? (OS, version, exported filesystem?) --b. > > On Tue, Oct 27, 2020 at 10:03 PM Patrick Goetz <pgoetz@math.utexas.edu> wrote: > > > > > > > > On 10/27/20 12:12 PM, J. Bruce Fields wrote: > > > On Fri, Oct 23, 2020 at 01:13:02PM +0300, Vasyl Vavrychuk wrote: > > >> I have found that hard links for regular files works well for me over NFS: > > >> > > >> $ touch bar > > >> $ ln bar tata > > >> > > >> But if I try to make hard link for symlink, then it fails: > > >> > > >> $ ln -s foo bar > > >> $ ln bar tata > > >> ln: failed to create hard link 'tata' => 'bar': Operation not permitted > > > > > > Huh. I'm not sure I even realized it was possible to hardlink symlinks. > > > Makes sense, I guess. > > > > What's even the use case for hard linking a symlink? That sounds like > > asking for trouble... > > > > > > > > > > I think my first step debugging this would be to watch wireshark while > > > attempting the "ln", and see what happens. That should tell us whether > > > it's the client or server that's failing the operation. > > > > > > --b. > > > > > >> > > >> I am using NFSv4 with Vagrant, here is mount entry: > > >> > > >> 172.28.128.1:PATH on /vagrant type nfs4 > > >> (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=IP,local_lock=none,addr=IP) > > >> > > >> I have also verified that rpc-statd is running on host. > > >> > > >> Host machine is Ubuntu 18.04 with NFS packages version 1:1.3.4-2.1ubuntu5.3. > > >> > > >> Will appreciate help on this. > > >> > > >> Thanks, > > >> Vasyl ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-06 21:46 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-23 10:13 Hard linking symlink does not work Vasyl Vavrychuk 2020-10-27 17:12 ` J. Bruce Fields 2020-10-27 20:03 ` Patrick Goetz 2020-10-28 8:53 ` Vasyl Vavrychuk 2020-11-06 21:46 ` J. Bruce Fields
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.