mention ext4 in mount.8 and mount_ext2fs.8

2015-10-01 Thread Nils Reuße

Hi tech,

i was a bit confused when i tried to mount my ext4-drive; it was not 
obvious to me that i had to pass the -r/-o ro option to mount the disk. 
 The FAQ is also not very explicit about that:


"Some of them have limited support; for instance read-only. "

http://www.openbsd.org/faq/faq14.html#foreignfs

So i tried the man pages, but they don't mention that ext4 is mountable 
at all. A


# mount -t ext2fs /dev/sdb6i /mnt

did not return any error and just did nothing.  Maybe this is obvious 
that you have to pass the ro-flag, but i thought it would "just work". 
That was wrong, obviously, but here is my proposal to add a little 
information to the manpages.


Any comments?


Index: mount.8
===
RCS file: /cvs/src/sbin/mount/mount.8,v
retrieving revision 1.77
diff -u -p -r1.77 mount.8
--- mount.8 8 Sep 2014 04:40:30 -   1.77
+++ mount.8 1 Oct 2015 17:06:08 -
@@ -381,6 +381,12 @@ with option
  .Dq dev :
  .Pp
  .Dl # mount -u -o dev /var
+.Pp
+Mount an ext4 device with DUID 3eb7f9da875cb9ee on node
+.Pa /mnt/ext4 :
+.Pp
+.Dl # mount -t ext2fs -r 3eb7f9da875cb9ee.i /mnt/ext4
+.Pp
  .Sh SEE ALSO
  .Xr mount 2 ,
  .Xr fstab 5 ,
Index: mount_ext2fs.8
===
RCS file: /cvs/src/sbin/mount_ext2fs/mount_ext2fs.8,v
retrieving revision 1.14
diff -u -p -r1.14 mount_ext2fs.8
--- mount_ext2fs.8  14 Oct 2010 07:05:43 -  1.14
+++ mount_ext2fs.8  1 Oct 2015 17:02:27 -
@@ -33,7 +33,7 @@
  .Os
  .Sh NAME
  .Nm mount_ext2fs
-.Nd mount an ext2fs file system
+.Nd mount an ext2/3/4 file system
  .Sh SYNOPSIS
  .Nm mount_ext2fs
  .Op Fl o Ar options
@@ -42,10 +42,12 @@
  .Sh DESCRIPTION
  The
  .Nm
-command attaches an ext2fs file system
+command attaches an ext2/3/4 file system
  .Ar special
  device on to the file system tree at the point
  .Ar node .
+Filesystems of type ext3/4 are only supported in read-only
+mode.
  This command is invoked by
  .Xr mount 8
  when using the syntax



Re: mention ext4 in mount.8 and mount_ext2fs.8

2015-10-01 Thread Jason McIntyre
On Thu, Oct 01, 2015 at 07:22:20PM +0200, Nils Reu??e wrote:
> Hi tech,
> 
> i was a bit confused when i tried to mount my ext4-drive; it was not obvious
> to me that i had to pass the -r/-o ro option to mount the disk.  The FAQ is
> also not very explicit about that:
> 
> "Some of them have limited support; for instance read-only. "
> 
> http://www.openbsd.org/faq/faq14.html#foreignfs
> 
> So i tried the man pages, but they don't mention that ext4 is mountable at
> all. A
> 
> # mount -t ext2fs /dev/sdb6i /mnt
> 
> did not return any error and just did nothing.  Maybe this is obvious that
> you have to pass the ro-flag, but i thought it would "just work". That was
> wrong, obviously, but here is my proposal to add a little information to the
> manpages.
> 
> Any comments?
> 

thanks for tonight's worm can.

actually our docs do a bad job of explaining ext3 and 4 support, but i
know very little about them. i don;t think your diff is the way to go
though. some points:

- we have enough examples in mount(8), i think
- look at mount_ntfs(8): it does a nice job of explaining it's
  ro instead of just giving an example. i think that's a better
  way. having said that:
- there are also tools like newfs_ext2fs(8), so we need to look
  at this as a whole. this doc does actually mention ext4.

so i'd look at a diff which nicely explains to what extent ext3 and 4
are supported across our ext tool pages. but i don;t feel in a position
to write that diff myself.

jmc

> 
> Index: mount.8
> ===
> RCS file: /cvs/src/sbin/mount/mount.8,v
> retrieving revision 1.77
> diff -u -p -r1.77 mount.8
> --- mount.8   8 Sep 2014 04:40:30 -   1.77
> +++ mount.8   1 Oct 2015 17:06:08 -
> @@ -381,6 +381,12 @@ with option
>   .Dq dev :
>   .Pp
>   .Dl # mount -u -o dev /var
> +.Pp
> +Mount an ext4 device with DUID 3eb7f9da875cb9ee on node
> +.Pa /mnt/ext4 :
> +.Pp
> +.Dl # mount -t ext2fs -r 3eb7f9da875cb9ee.i /mnt/ext4
> +.Pp
>   .Sh SEE ALSO
>   .Xr mount 2 ,
>   .Xr fstab 5 ,
> Index: mount_ext2fs.8
> ===
> RCS file: /cvs/src/sbin/mount_ext2fs/mount_ext2fs.8,v
> retrieving revision 1.14
> diff -u -p -r1.14 mount_ext2fs.8
> --- mount_ext2fs.814 Oct 2010 07:05:43 -  1.14
> +++ mount_ext2fs.81 Oct 2015 17:02:27 -
> @@ -33,7 +33,7 @@
>   .Os
>   .Sh NAME
>   .Nm mount_ext2fs
> -.Nd mount an ext2fs file system
> +.Nd mount an ext2/3/4 file system
>   .Sh SYNOPSIS
>   .Nm mount_ext2fs
>   .Op Fl o Ar options
> @@ -42,10 +42,12 @@
>   .Sh DESCRIPTION
>   The
>   .Nm
> -command attaches an ext2fs file system
> +command attaches an ext2/3/4 file system
>   .Ar special
>   device on to the file system tree at the point
>   .Ar node .
> +Filesystems of type ext3/4 are only supported in read-only
> +mode.
>   This command is invoked by
>   .Xr mount 8
>   when using the syntax
>