From owner-freebsd-hackers Wed Oct 20 8:20: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 5E6E41B980 for ; Wed, 20 Oct 1999 08:19:54 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id LAA27963; Wed, 20 Oct 1999 11:19:26 -0400 (EDT) Date: Wed, 20 Oct 1999 10:16:40 -0400 (EDT) From: Zhihui Zhang To: Neil Blakey-Milner Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Update the name of a filesystem (more details) In-Reply-To: <19991019212032.A6058@mithrandr.moria.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 19 Oct 1999, Neil Blakey-Milner wrote: > On Mon 1999-10-18 (15:46), Zhihui Zhang wrote: > > I am trying to change the mount point of a mounted filesystem (from > > /testme to /test) with the update option (-u): > > That's not how -u works. From the man page: > > -u The -u flag indicates that the status of an already mounted file > system should be changed. Any of the options discussed above > (the -o option) may be changed; also a file system can be changed > from read-only to read-write or vice versa. > > > # mount /dev/wd0s2e /testme > > # mount -u /dev/wd0s2e /test > > mount: /dev/wd0s2e on /test: specified device does not match mounted > > device > > This is because, as stated above, you can only change the options of the > mounted filesystem, not its mountpoint. > > > Why it does not work (I know I can umount first without using the update > > option)? Any help is appreciated. > > This (umount then mount) is the way to change mountpoint names. > Thanks for your reply. I have just found that it is possible to change the device name of a mounted filesystem: # ls -al wd0s2e brw-r----- 1 root wheel 0, 0x00030004 Oct 11 15:02 wd0s2e # cd /dev # mknod testnode b 0 0x00030004 # ls -al testnode brw-r--r-- 1 root wheel 0, 0x00030004 Oct 20 09:50 testnode # mount /dev/wd0s2e /testme # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0s1a 39647 22125 14351 61% / /dev/wd0s1f 1787726 965430 679278 59% /usr /dev/wd0s1e 19815 3459 14771 19% /var procfs 4 4 0 100% /proc /dev/wd0s2e 2109789 659537 1281469 34% /testme # mount -u /dev/testnode /testme # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0s1a 39647 22125 14351 61% / /dev/wd0s1f 1787726 965430 679278 59% /usr /dev/wd0s1e 19815 3460 14770 19% /var procfs 4 4 0 100% /proc /dev/testnode 2109789 659537 1281469 34% /testme I know this is not very useful. But the source code allows it to happen. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message