Bug 149106

Summary: xfs.5: non-working mount example
Product: Documentation Reporter: Dmitry Marakasov <amdmi3>
Component: Books & ArticlesAssignee: Giorgos Keramidas <keramida>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dmitry Marakasov freebsd_committer freebsd_triage 2010-07-30 14:30:05 UTC
xfs.5 says:

EXAMPLES
     To mount a xfs volume located on /dev/ad1s1:
           
           mount -t xfs /dev/ad1s1 /mnt

However, this doesn't work:

# mdconfig -a -s 256m
md0
# mkfs.xfs /dev/md0
meta-data=/dev/md0               isize=256    agcount=8, agsize=8192 blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=65536, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=1200, version=1
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
# mount -t xfs /dev/md0 /mnt
mount: /dev/md0 : Operation not permitted

However, it works if I explicitely request read-only mount:
# mount -t xfs -oro /dev/md0 /mnt
# mount | tail -1
/dev/md0 on /mnt (xfs, local, read-only)

Fix: 

Trivial: -o ro should be added into the example
How-To-Repeat: See above
Comment 1 dfilter service freebsd_committer freebsd_triage 2011-01-16 20:11:01 UTC
Author: keramida (doc committer)
Date: Sun Jan 16 20:10:55 2011
New Revision: 217481
URL: http://svn.freebsd.org/changeset/base/217481

Log:
  Fix the mount example of xfDmitry Marakasov <amdmi3@FreeBSD.org>s(5) filesystems by including the read-only
  option.  We only support ro mounts for xfs, so it's nice if the examples
  we show in the manpage are easy to copy/paste.
  
  PR:		docs/149106
  Submitted by:	amdmi3
  MFC after:	3 days

Modified:
  head/share/man/man5/xfs.5

Modified: head/share/man/man5/xfs.5
==============================================================================
--- head/share/man/man5/xfs.5	Sun Jan 16 18:46:17 2011	(r217480)
+++ head/share/man/man5/xfs.5	Sun Jan 16 20:10:55 2011	(r217481)
@@ -53,7 +53,7 @@ To mount a
 volume located on
 .Pa /dev/ad1s1 :
 .Pp
-.Dl "mount -t xfs /dev/ad1s1 /mnt"
+.Dl "mount -t xfs -o ro /dev/ad1s1 /mnt"
 .Sh SEE ALSO
 .Xr nmount 2 ,
 .Xr unmount 2 ,
_______________________________________________
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 2 Giorgos Keramidas freebsd_committer freebsd_triage 2011-01-16 20:11:07 UTC
State Changed
From-To: open->patched

Fixed in /head. 


Comment 3 Giorgos Keramidas freebsd_committer freebsd_triage 2011-01-16 20:11:07 UTC
Responsible Changed
From-To: freebsd-doc->keramida

I'll take care of MFC'ing this.
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-01-19 21:49:29 UTC
Author: keramida (doc committer)
Date: Wed Jan 19 21:49:21 2011
New Revision: 217608
URL: http://svn.freebsd.org/changeset/base/217608

Log:
  MFC r217481 and r217606 from /head
  
  r217481...
    Fix the mount example of xfs(5) filesystems by including the read-only
    option.  We only support ro mounts for xfs, so itâs nice if the examples
    we show in the manpage are easy to copy/paste.
  
    PR:           docs/149106
    Submitted by: amdmi3
  
  r217606...
    Bump .Dd date of manpage for r217481

Modified:
  stable/8/share/man/man5/xfs.5
Directory Properties:
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/share/man/man5/xfs.5
==============================================================================
--- stable/8/share/man/man5/xfs.5	Wed Jan 19 21:45:40 2011	(r217607)
+++ stable/8/share/man/man5/xfs.5	Wed Jan 19 21:49:21 2011	(r217608)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 16, 2007
+.Dd January 16, 2011
 .Dt XFS 5
 .Os
 .Sh NAME
@@ -53,7 +53,7 @@ To mount a
 volume located on
 .Pa /dev/ad1s1 :
 .Pp
-.Dl "mount -t xfs /dev/ad1s1 /mnt"
+.Dl "mount -t xfs -o ro /dev/ad1s1 /mnt"
 .Sh SEE ALSO
 .Xr nmount 2 ,
 .Xr unmount 2 ,
_______________________________________________
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 5 dfilter service freebsd_committer freebsd_triage 2011-01-19 21:49:47 UTC
Author: keramida (doc committer)
Date: Wed Jan 19 21:49:42 2011
New Revision: 217609
URL: http://svn.freebsd.org/changeset/base/217609

Log:
  MFC r217481 and r217606 from /head
  
  r217481...
    Fix the mount example of xfs(5) filesystems by including the read-only
    option.  We only support ro mounts for xfs, so itâs nice if the examples
    we show in the manpage are easy to copy/paste.
  
    PR:           docs/149106
    Submitted by: amdmi3
  
  r217606...
    Bump .Dd date of manpage for r217481

Modified:
  stable/7/share/man/man5/xfs.5
Directory Properties:
  stable/7/share/man/man5/   (props changed)

Modified: stable/7/share/man/man5/xfs.5
==============================================================================
--- stable/7/share/man/man5/xfs.5	Wed Jan 19 21:49:21 2011	(r217608)
+++ stable/7/share/man/man5/xfs.5	Wed Jan 19 21:49:42 2011	(r217609)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 16, 2007
+.Dd January 16, 2011
 .Dt XFS 5
 .Os
 .Sh NAME
@@ -53,7 +53,7 @@ To mount a
 volume located on
 .Pa /dev/ad1s1 :
 .Pp
-.Dl "mount -t xfs /dev/ad1s1 /mnt"
+.Dl "mount -t xfs -o ro /dev/ad1s1 /mnt"
 .Sh SEE ALSO
 .Xr nmount 2 ,
 .Xr unmount 2 ,
_______________________________________________
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 Giorgos Keramidas freebsd_committer freebsd_triage 2011-01-19 22:19:35 UTC
State Changed
From-To: patched->closed

Merged to stable/8 and stable/7