Date: Wed, 20 Oct 1999 10:16:40 -0400 (EDT) From: Zhihui Zhang <zzhang@cs.binghamton.edu> To: Neil Blakey-Milner <nbm@mithrandr.moria.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Update the name of a filesystem (more details) Message-ID: <Pine.GSO.3.96.991020101301.24319A-100000@sol.cs.binghamton.edu> In-Reply-To: <19991019212032.A6058@mithrandr.moria.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.991020101301.24319A-100000>