Bug 178996 - [zfs] [patch] error in message with zfs mount -> there is no "mount -F zfs" in FreeBSD
Summary: [zfs] [patch] error in message with zfs mount -> there is no "mount -F zfs" i...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-26 20:30 UTC by Peter Schaefer
Modified: 2013-07-07 12:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Schaefer 2013-05-26 20:30:00 UTC
Fiddeling around with zfs set mountpoint=legacy pool/root there is a message from /sbin/zfs which tells me to use mount -F zfs pool/root instead.
Trying to do so brings up a new error message because the -F on solaris means the filesystemtype which is the -t in FreeBSD.

Simple, not very important, but annoying for anyone not using zfs  and mount very often.

(Never reported a bug before, hope to have done everything in the right manner)

Fix: 

6496- 	"mounted using 'mount -F zfs'\n"), dataset);
6496+ 	"mounted using 'mount -t zfs'\n"), dataset);

6499- 	(void) fprintf(stderr, gettext("If you must use 'mount -F zfs' "
6499+ 	(void) fprintf(stderr, gettext("If you must use 'mount -t zfs' "
How-To-Repeat: #zfs umount pool/root
#zfs set mountpoint=legacy pool/root
#zfs mount pool/root /mnt

should do the job
Comment 1 Peter Schaefer 2013-05-26 21:01:18 UTC
The changes have to be made to main.c
http://svnweb.freebsd.org/base/stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-05-26 21:53:43 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 3 Glen Barber freebsd_committer freebsd_triage 2013-06-26 01:15:34 UTC
Responsible Changed
From-To: freebsd-fs->gjb

Take.
Comment 4 Glen Barber freebsd_committer freebsd_triage 2013-07-04 22:30:18 UTC
Responsible Changed
From-To: gjb->mm

Martin, would you mind looking at this?  It seems like this error 
should not be triggered in head/ (at least).  The PR originator 
has noted to me in private that this error message was triggered on 
a 9.1-RELEASE system.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-07-04 23:26:50 UTC
Author: mm
Date: Thu Jul  4 22:26:38 2013
New Revision: 252732
URL: http://svnweb.freebsd.org/changeset/base/252732

Log:
  Fix misleading or remove irrelevant illumos messages and manpage references
  in the zfs command.
  
  PR:		bin/178996
  Submitted by:	Peter Schaefer <peter.schaefer@wilhelmheinrichs.de>
  MFC after:	3 days

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Thu Jul  4 22:09:14 2013	(r252731)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Thu Jul  4 22:26:38 2013	(r252732)
@@ -5601,8 +5601,8 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot share '%s': "
 		    "legacy share\n"), zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use share(1M) to "
-		    "share this filesystem, or set "
+		(void) fprintf(stderr, gettext("to "
+		    "share this filesystem set "
 		    "sharenfs property on\n"));
 		return (1);
 	}
@@ -5618,7 +5618,7 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot %s '%s': "
 		    "legacy mountpoint\n"), cmdname, zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use %s(1M) to "
+		(void) fprintf(stderr, gettext("use %s(8) to "
 		    "%s this filesystem\n"), cmdname, cmdname);
 		return (1);
 	}
@@ -6056,8 +6056,10 @@ unshare_unmount_path(int op, char *path,
 		    strcmp(smbshare_prop, "off") == 0) {
 			(void) fprintf(stderr, gettext("cannot unshare "
 			    "'%s': legacy share\n"), path);
+#ifdef illumos
 			(void) fprintf(stderr, gettext("use "
 			    "unshare(1M) to unshare this filesystem\n"));
+#endif
 		} else if (!zfs_is_shared(zhp)) {
 			(void) fprintf(stderr, gettext("cannot unshare '%s': "
 			    "not currently shared\n"), path);
@@ -6076,7 +6078,7 @@ unshare_unmount_path(int op, char *path,
 			(void) fprintf(stderr, gettext("cannot unmount "
 			    "'%s': legacy mountpoint\n"),
 			    zfs_get_name(zhp));
-			(void) fprintf(stderr, gettext("use umount(1M) "
+			(void) fprintf(stderr, gettext("use umount(8) "
 			    "to unmount this filesystem\n"));
 		} else {
 			ret = zfs_unmountall(zhp, flags);
@@ -6298,9 +6300,11 @@ unshare_unmount(int op, int argc, char *
 				(void) fprintf(stderr, gettext("cannot "
 				    "unshare '%s': legacy share\n"),
 				    zfs_get_name(zhp));
+#ifdef illumos
 				(void) fprintf(stderr, gettext("use "
 				    "unshare(1M) to unshare this "
 				    "filesystem\n"));
+#endif
 				ret = 1;
 			} else if (!zfs_is_shared(zhp)) {
 				(void) fprintf(stderr, gettext("cannot "
@@ -6318,7 +6322,7 @@ unshare_unmount(int op, int argc, char *
 				    "unmount '%s': legacy "
 				    "mountpoint\n"), zfs_get_name(zhp));
 				(void) fprintf(stderr, gettext("use "
-				    "umount(1M) to unmount this "
+				    "umount(8) to unmount this "
 				    "filesystem\n"));
 				ret = 1;
 			} else if (!zfs_is_mounted(zhp, NULL)) {
@@ -6504,12 +6508,12 @@ manual_mount(int argc, char **argv)
 		}
 	} else {
 		(void) fprintf(stderr, gettext("filesystem '%s' cannot be "
-		    "mounted using 'mount -F zfs'\n"), dataset);
+		    "mounted using 'mount -t zfs'\n"), dataset);
 		(void) fprintf(stderr, gettext("Use 'zfs set mountpoint=%s' "
 		    "instead.\n"), path);
-		(void) fprintf(stderr, gettext("If you must use 'mount -F zfs' "
-		    "or /etc/vfstab, use 'zfs set mountpoint=legacy'.\n"));
-		(void) fprintf(stderr, gettext("See zfs(1M) for more "
+		(void) fprintf(stderr, gettext("If you must use 'mount -t zfs' "
+		    "or /etc/fstab, use 'zfs set mountpoint=legacy'.\n"));
+		(void) fprintf(stderr, gettext("See zfs(8) for more "
 		    "information.\n"));
 		ret = 1;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-07-07 10:22:01 UTC
Author: mm
Date: Sun Jul  7 09:21:39 2013
New Revision: 252920
URL: http://svnweb.freebsd.org/changeset/base/252920

Log:
  MFC r252732:
  Fix misleading or remove irrelevant illumos messages and manpage references
  in the zfs command.
  
  PR:		bin/178996
  Submitted by:	Peter Schaefer <peter.schaefer@wilhelmheinrichs.de>

Modified:
  stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/cmd/zfs/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Sun Jul  7 07:06:15 2013	(r252919)
+++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Sun Jul  7 09:21:39 2013	(r252920)
@@ -5590,8 +5590,8 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot share '%s': "
 		    "legacy share\n"), zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use share(1M) to "
-		    "share this filesystem, or set "
+		(void) fprintf(stderr, gettext("to "
+		    "share this filesystem set "
 		    "sharenfs property on\n"));
 		return (1);
 	}
@@ -5607,7 +5607,7 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot %s '%s': "
 		    "legacy mountpoint\n"), cmdname, zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use %s(1M) to "
+		(void) fprintf(stderr, gettext("use %s(8) to "
 		    "%s this filesystem\n"), cmdname, cmdname);
 		return (1);
 	}
@@ -6045,8 +6045,10 @@ unshare_unmount_path(int op, char *path,
 		    strcmp(smbshare_prop, "off") == 0) {
 			(void) fprintf(stderr, gettext("cannot unshare "
 			    "'%s': legacy share\n"), path);
+#ifdef illumos
 			(void) fprintf(stderr, gettext("use "
 			    "unshare(1M) to unshare this filesystem\n"));
+#endif
 		} else if (!zfs_is_shared(zhp)) {
 			(void) fprintf(stderr, gettext("cannot unshare '%s': "
 			    "not currently shared\n"), path);
@@ -6065,7 +6067,7 @@ unshare_unmount_path(int op, char *path,
 			(void) fprintf(stderr, gettext("cannot unmount "
 			    "'%s': legacy mountpoint\n"),
 			    zfs_get_name(zhp));
-			(void) fprintf(stderr, gettext("use umount(1M) "
+			(void) fprintf(stderr, gettext("use umount(8) "
 			    "to unmount this filesystem\n"));
 		} else {
 			ret = zfs_unmountall(zhp, flags);
@@ -6287,9 +6289,11 @@ unshare_unmount(int op, int argc, char *
 				(void) fprintf(stderr, gettext("cannot "
 				    "unshare '%s': legacy share\n"),
 				    zfs_get_name(zhp));
+#ifdef illumos
 				(void) fprintf(stderr, gettext("use "
 				    "unshare(1M) to unshare this "
 				    "filesystem\n"));
+#endif
 				ret = 1;
 			} else if (!zfs_is_shared(zhp)) {
 				(void) fprintf(stderr, gettext("cannot "
@@ -6307,7 +6311,7 @@ unshare_unmount(int op, int argc, char *
 				    "unmount '%s': legacy "
 				    "mountpoint\n"), zfs_get_name(zhp));
 				(void) fprintf(stderr, gettext("use "
-				    "umount(1M) to unmount this "
+				    "umount(8) to unmount this "
 				    "filesystem\n"));
 				ret = 1;
 			} else if (!zfs_is_mounted(zhp, NULL)) {
@@ -6493,12 +6497,12 @@ manual_mount(int argc, char **argv)
 		}
 	} else {
 		(void) fprintf(stderr, gettext("filesystem '%s' cannot be "
-		    "mounted using 'mount -F zfs'\n"), dataset);
+		    "mounted using 'mount -t zfs'\n"), dataset);
 		(void) fprintf(stderr, gettext("Use 'zfs set mountpoint=%s' "
 		    "instead.\n"), path);
-		(void) fprintf(stderr, gettext("If you must use 'mount -F zfs' "
-		    "or /etc/vfstab, use 'zfs set mountpoint=legacy'.\n"));
-		(void) fprintf(stderr, gettext("See zfs(1M) for more "
+		(void) fprintf(stderr, gettext("If you must use 'mount -t zfs' "
+		    "or /etc/fstab, use 'zfs set mountpoint=legacy'.\n"));
+		(void) fprintf(stderr, gettext("See zfs(8) for more "
 		    "information.\n"));
 		ret = 1;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-07-07 10:22:17 UTC
Author: mm
Date: Sun Jul  7 09:22:03 2013
New Revision: 252921
URL: http://svnweb.freebsd.org/changeset/base/252921

Log:
  MFC r252732:
  Fix misleading or remove irrelevant illumos messages and manpage references
  in the zfs command.
  
  PR:		bin/178996
  Submitted by:	Peter Schaefer <peter.schaefer@wilhelmheinrichs.de>

Modified:
  stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Directory Properties:
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/cmd/zfs/   (props changed)

Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Sun Jul  7 09:21:39 2013	(r252920)
+++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c	Sun Jul  7 09:22:03 2013	(r252921)
@@ -5590,8 +5590,8 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot share '%s': "
 		    "legacy share\n"), zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use share(1M) to "
-		    "share this filesystem, or set "
+		(void) fprintf(stderr, gettext("to "
+		    "share this filesystem set "
 		    "sharenfs property on\n"));
 		return (1);
 	}
@@ -5607,7 +5607,7 @@ share_mount_one(zfs_handle_t *zhp, int o
 
 		(void) fprintf(stderr, gettext("cannot %s '%s': "
 		    "legacy mountpoint\n"), cmdname, zfs_get_name(zhp));
-		(void) fprintf(stderr, gettext("use %s(1M) to "
+		(void) fprintf(stderr, gettext("use %s(8) to "
 		    "%s this filesystem\n"), cmdname, cmdname);
 		return (1);
 	}
@@ -6045,8 +6045,10 @@ unshare_unmount_path(int op, char *path,
 		    strcmp(smbshare_prop, "off") == 0) {
 			(void) fprintf(stderr, gettext("cannot unshare "
 			    "'%s': legacy share\n"), path);
+#ifdef illumos
 			(void) fprintf(stderr, gettext("use "
 			    "unshare(1M) to unshare this filesystem\n"));
+#endif
 		} else if (!zfs_is_shared(zhp)) {
 			(void) fprintf(stderr, gettext("cannot unshare '%s': "
 			    "not currently shared\n"), path);
@@ -6065,7 +6067,7 @@ unshare_unmount_path(int op, char *path,
 			(void) fprintf(stderr, gettext("cannot unmount "
 			    "'%s': legacy mountpoint\n"),
 			    zfs_get_name(zhp));
-			(void) fprintf(stderr, gettext("use umount(1M) "
+			(void) fprintf(stderr, gettext("use umount(8) "
 			    "to unmount this filesystem\n"));
 		} else {
 			ret = zfs_unmountall(zhp, flags);
@@ -6287,9 +6289,11 @@ unshare_unmount(int op, int argc, char *
 				(void) fprintf(stderr, gettext("cannot "
 				    "unshare '%s': legacy share\n"),
 				    zfs_get_name(zhp));
+#ifdef illumos
 				(void) fprintf(stderr, gettext("use "
 				    "unshare(1M) to unshare this "
 				    "filesystem\n"));
+#endif
 				ret = 1;
 			} else if (!zfs_is_shared(zhp)) {
 				(void) fprintf(stderr, gettext("cannot "
@@ -6307,7 +6311,7 @@ unshare_unmount(int op, int argc, char *
 				    "unmount '%s': legacy "
 				    "mountpoint\n"), zfs_get_name(zhp));
 				(void) fprintf(stderr, gettext("use "
-				    "umount(1M) to unmount this "
+				    "umount(8) to unmount this "
 				    "filesystem\n"));
 				ret = 1;
 			} else if (!zfs_is_mounted(zhp, NULL)) {
@@ -6493,12 +6497,12 @@ manual_mount(int argc, char **argv)
 		}
 	} else {
 		(void) fprintf(stderr, gettext("filesystem '%s' cannot be "
-		    "mounted using 'mount -F zfs'\n"), dataset);
+		    "mounted using 'mount -t zfs'\n"), dataset);
 		(void) fprintf(stderr, gettext("Use 'zfs set mountpoint=%s' "
 		    "instead.\n"), path);
-		(void) fprintf(stderr, gettext("If you must use 'mount -F zfs' "
-		    "or /etc/vfstab, use 'zfs set mountpoint=legacy'.\n"));
-		(void) fprintf(stderr, gettext("See zfs(1M) for more "
+		(void) fprintf(stderr, gettext("If you must use 'mount -t zfs' "
+		    "or /etc/fstab, use 'zfs set mountpoint=legacy'.\n"));
+		(void) fprintf(stderr, gettext("See zfs(8) for more "
 		    "information.\n"));
 		ret = 1;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 Martin Matuska freebsd_committer freebsd_triage 2013-07-07 12:47:10 UTC
State Changed
From-To: open->closed

Committed. Thanks!