public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin mount limited to 64 mounts, even for UNC paths?
@ 2023-11-30  4:54 Martin Wege
  2023-12-01  1:55 ` Andrey Repin
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Wege @ 2023-11-30  4:54 UTC (permalink / raw)
  To: cygwin

Hello,

Cygwin mount(1) is (per docs) limited to 64 mounts. Why was that
limitation chosen, and does it  apply even if I create bind mounts to
UNC paths (not DOS letters)? DOS letters might be restricted by the
ASCII A-Z, but UNC paths are unlimited.

Thanks,
Martin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin mount limited to 64 mounts, even for UNC paths?
  2023-11-30  4:54 Cygwin mount limited to 64 mounts, even for UNC paths? Martin Wege
@ 2023-12-01  1:55 ` Andrey Repin
  2023-12-01 10:17   ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Repin @ 2023-12-01  1:55 UTC (permalink / raw)
  To: Martin Wege, cygwin

Greetings, Martin Wege!

> Cygwin mount(1) is (per docs) limited to 64 mounts. Why was that
> limitation chosen, and does it  apply even if I create bind mounts to
> UNC paths (not DOS letters)? DOS letters might be restricted by the
> ASCII A-Z, but UNC paths are unlimited.

More interesting question is: why do you need so many _Cygwin_ mounts?
There's a lot of other options, from NTFS junctions to using UNC paths
directly (Cygwin tools aren't picky in this regard).


-- 
With best regards,
Andrey Repin
Friday, December 1, 2023 04:53:35

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cygwin mount limited to 64 mounts, even for UNC paths?
  2023-12-01  1:55 ` Andrey Repin
@ 2023-12-01 10:17   ` Corinna Vinschen
  0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2023-12-01 10:17 UTC (permalink / raw)
  To: cygwin

On Dec  1 04:55, Andrey Repin via Cygwin wrote:
> Greetings, Martin Wege!
> 
> > Cygwin mount(1) is (per docs) limited to 64 mounts. Why was that
> > limitation chosen, and does it  apply even if I create bind mounts to
> > UNC paths (not DOS letters)? DOS letters might be restricted by the
> > ASCII A-Z, but UNC paths are unlimited.
> 
> More interesting question is: why do you need so many _Cygwin_ mounts?
> There's a lot of other options, from NTFS junctions to using UNC paths
> directly (Cygwin tools aren't picky in this regard).

Indeed.

As for the number 64, it's arbitrary.  It has been raised from the
former 30 entries back in 2011.

Mount points are stored in the Cygwin's shared mem region for the user
account.  These shared regions are supposed to fit into a 64K mem
allocation block, and ideally still have a bit of room to spare for
future extension.  Right now the cygwin-user-shared block is 36K in
size, so there's some room left.

However, the longer the mount table, and the more it's filled, the
slower path evaluation gets.  And yes, bind mounts fill it, too.

Instead of adding lots of mount points to /etc/fstab, only add the
ones you *really* need to be globally available, and add only
the ones a user *really* needs to /etc/fstab.d/$USER.

Everything not really necessary are best handled by just using UNC paths
directly, or mounting to drive letter and using the /cygdrive prefix (or
change it to your liking, like /mnt).

You can also just create symlinks.  For instance:

  $ pwd
  /home/user
  $ ln -s //server/share/foo/bar bar
  $ cd bar
  $ pwd
  //server/share/foo/bar
  $

No mounts required.


Corinna

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-01 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30  4:54 Cygwin mount limited to 64 mounts, even for UNC paths? Martin Wege
2023-12-01  1:55 ` Andrey Repin
2023-12-01 10:17   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).