X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB53F3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1701425850; bh=xdvhW5Ke5s4KlqD8hwzv7iI7hMPbo4/Wty+GRoCU9+k=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Hs2odwtcHmFVbRYlGcIPp+oOd6MUHI1DDVMXmQ5l1G40d56JSbKcKl1MwFw7xHRKu T73sfgzqag4P2zkPRcT/At31RU03TeuFwwTqJQRRlSfnHcYhBfgJ2tw5qzYIvIGhk1 zIGayX85Z2gHWfngt6UlPIQgwDOoUACcY+yZLyto= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFF933858C20 Date: Fri, 1 Dec 2023 11:17:12 +0100 To: cygwin AT cygwin DOT com Subject: Re: Cygwin mount limited to 64 mounts, even for UNC paths? Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <1463776016 DOT 20231201045528 AT yandex DOT ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1463776016.20231201045528@yandex.ru> X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple