From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mx1.redhat.com ([209.132.183.28]:15020 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999Ab1KIJXR (ORCPT ); Wed, 9 Nov 2011 04:23:17 -0500 Date: Wed, 9 Nov 2011 10:23:12 +0100 From: Karel Zak To: KIMURA Masaru Cc: util-linux@vger.kernel.org, Miklos Szeredi Subject: Re: behavior of "# mount /dev" Message-ID: <20111109092312.GI16397@nb.net.home> References: <1320797364.3005.10.camel@offbook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: util-linux-owner@vger.kernel.org List-ID: On Wed, Nov 09, 2011 at 10:47:45AM +0900, KIMURA Masaru wrote: > > Same here on my Gentoo and Ubuntu 11.10. > "# mount /sys" does fail and warn "already mounted" but "# mount /dev" doesn't. > > First of all, /dev is mounted on tmpfs which is a filesystem on memory. > And /sys is mounted on sysfs which is another filesystem on memory. Yes, this normal filesystem specific behavior. [...] > Summary: > - "# mount /dev" hides udev managed /dev. > - because it doesn't return a busy error. > - because it uses tmpfs. > - using tmpfs, we are not able to treat this case as error in kernel. Sure, it's not a bug. It would be nice to have mount option (VFS flag) to control this behavior, something like: # mount -t tmpfs none /dev -o nooverlay # mount -t tmpfs none /dev --> EBUSY Karel -- Karel Zak http://karelzak.blogspot.com