Date: Thu, 23 May 2019 18:34:18 +0000 From: Igor Konev <ikonev84@mail.ru> To: "Igor V. Ruzanov" <igorr@pochta-mx.canmos.ru> Cc: freebsd-questions@freebsd.org Subject: Re: Question about mount_fusefs Message-ID: <20190523183418.37edcdb6@eeepc> In-Reply-To: <alpine.BSF.2.00.1905211827350.14674@pochta.canmos.ru> References: <20190521120928.27f9ddbf@eeepc> <alpine.BSF.2.00.1905211527240.14674@pochta.canmos.ru> <20190521150620.2239659e@eeepc> <alpine.BSF.2.00.1905211827350.14674@pochta.canmos.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
=D0=92 Tue, 21 May 2019 18:33:21 +0300 (MSK) "Igor V. Ruzanov" <igorr@pochta-mx.canmos.ru> =D0=BF=D0=B8=D1=88=D0=B5=D1= =82: > On Tue, 21 May 2019, Igor Konev wrote: >=20 > |=D0=92 Tue, 21 May 2019 15:32:29 +0300 (MSK) > |"Igor V. Ruzanov" <igorr@pochta-mx.canmos.ru> =D0=BF=D0=B8=D1=88=D0=B5= =D1=82: > | > |> On Tue, 21 May 2019, Igor Konev via freebsd-questions wrote: > |>=20 > |> |Hi, I use fusefs to mount ntfs fs.=20 > |> |And I have a question about the command line options for > |> mount_fusefs. | > |> |What does key -s mean? What is he doing? I tried to use it but > |> without |success. > |> | > |> From MOUNT_FUSEFS(8) : > |>=20 > |> Finally, if special is an integer it will be interpreted as the > |> number of the file descriptor of an already open fuse device (used > |> when the Fuse > |> library invokes mount_fusefs. (See DAEMON MOUNTS). > |>=20 > |>=20 > |>=20 > |> I guess the key is ised in conjunction of another software doing > any |> jobs over opened fuse device files. > |>=20 > |> |From MOUNT_FUSEFS(8) : > |> | > |> |MOUNT_FUSEFS(8) > |> | > |> |SYNOPSIS > |> | mount_fusefs [-A] [-S] [-v] [-D fuse_daemon] [-O daemon_opts] > |> | [-s special] [-m node] [-h] [-V] [-o option ...] > |> | special node [fuse_daemon ...] > |> | > |> | > |> | -s, --special special > |> | Use special as special > |> | > |> |So for my case, I can run the mount_fusefs command in two ways: > |> |- mount_fusefs special node [fuse_daemon ...] > |> |- mount_fusefs -s special node [fuse_daemon] > |> | > |> |1) > |> | > |> |$ mount_fusefs /dev/fuse ~/mnt0 ntfs-3g /dev/da0s1 ~/mnt0 > |> |$ echo $? > |> |0 > |> | > |> |$ mount > |> |/dev/ada0p4 on / (ufs, local, soft-updates) > |> |devfs on /dev (devfs, local, multilabel) > |> |... > |> |/dev/fuse on /usr/home/user1/mnt0 (fusefs, local, nosuid, > |> synchronous, |mounted by user1) > |> | > |> |2) > |> | > |> |$ mount_fusefs -s /dev/fuse ~/mnt0 ntfs-3g /dev/da0s1 ~/mnt0 > |> |mount_fusefs: special specified inconsistently > |> |$ echo $? > |> |1 > |> | > |> |Ivan Konev > |> |_______________________________________________ > |> |freebsd-questions@freebsd.org mailing list > |> |https://lists.freebsd.org/mailman/listinfo/freebsd-questions > |> |To unsubscribe, send any mail to > |> "freebsd-questions-unsubscribe@freebsd.org" | > |> _______________________________________________ > |> freebsd-questions@freebsd.org mailing list > |> https://lists.freebsd.org/mailman/listinfo/freebsd-questions > |> To unsubscribe, send any mail to > |> "freebsd-questions-unsubscribe@freebsd.org" =20 > | > |Igor, thank you for your reply.=20 > |I also tried to use the file descriptor number as an argument for the > |=E2=80=93s. > | > |$ ls -ali /dev/fuse > |57 crw-rw-rw- 1 root operator 0x39 21 =D0=BC=D0=B0=D1=8F 11:40 /dev= /fuse > | > |$ mount_fusefs -s 57 ~/mnt0 ntfs-3g /dev/da0s1 ~/mnt0 > |mount_fusefs: special specified inconsistently > | > 57 here is not file descriptor number. Its i-node number (see man > ls). FD (file descriptor) might be some number that we got as result > of success call of some function, for ex. when we tried to open some > fuse device for mounting purposes. And provide this FD to: > mount_fusefs -s <FD>=20 >=20 >=20 > |$ echo $? > |1 > |$=20 > | > |My question is why "mount_fusefs /dev/fuse ..." works and > "mount_fusefs |-s /dev/fuse ..." and "mount_fusefs -s 57" do not work. > | > |Ivan Konev > | A bit of theory about mount_fusefs command line options: =46rom man: mount_fusefs [-A] [-S] [-v] [-D fuse_daemon] [-O daemon_opts] [-s special] [-m node] [-h] [-V] [-o option ...] special node [fuse_daemon ...] The special argument will normally be treated as the path of the special file to mount. Thus, you can define special using the -s option or the position in the argument string. But even if special is defined via a key, mount_fusefs will still try to take its value from the first unnamed (without a key) command line argument. So=20 mount_fusefs /dev/fuse /mnt ntfs-3g /dev/da0s1 /mnt - OK mount_fusefs -s /dev/fuse -m /mnt -D ntfs-3g -O "/dev/da0s1 /mnt" - OK mount_fusefs -s /dev/fuse -m /mnt -D ntfs-3g -O /dev/da0s1 /mnt - ERROR ( mount_fusefs thinks that /mnt is special ) Ivan Konev
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190523183418.37edcdb6>