Your message dated Thu, 22 Nov 2018 19:58:25 -0500
with message-id <[email protected]>
and subject line Re: Bug#912308: "-o" mount options in "tune2fs" is not being 
honoured by the OS.
has caused the Debian Bug report #912308,
regarding "-o" mount options in "tune2fs" is not being honoured by the OS.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
912308: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912308
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Package: e2fsprogs
Version: 1.44.4-2

The mount options set in "e2fsprogs" are not being used by the OS, regardless 
whether there are corresponding entries in "/etc/fstab".
Here is my example:
===BEGIN OUTPUT===
root@AVENTHEIM:/u/h/root>tune2fs -l /dev/sda
tune2fs 1.44.4 (18-Aug-2018)
Filesystem volume name:   DEBIAN
Last mounted on:          /root
Filesystem UUID:          c5971091-77d2-40fe-9095-54bb0ff96a2c
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr dir_index sparse_super2 
needs_recovery extent flex_bg inline_data large_file uninit_bg
Filesystem flags:         signed_directory_hash
Default mount options:    discard
Filesystem state:         clean
Errors behavior:          Remount read-only
Filesystem OS type:       Linux
Inode count:              228960
Block count:              117220824
Reserved block count:     0
Free blocks:              107372244
Free inodes:              130667
First block:              1
Block size:               1024
Fragment size:            1024
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         16
Inode blocks per group:   4
Flex block group size:    16
Filesystem created:       Wed Oct 17 19:58:28 2018
Last mount time:          Tue Oct 30 08:04:00 2018
Last write time:          Tue Oct 30 08:04:00 2018
Mount count:              3
Maximum mount count:      -1
Last checked:             Mon Oct 29 08:13:17 2018
Check interval:           0 (<none>)
Lifetime writes:          267 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
First orphan inode:       163356
Default directory hash:   legacy
Directory Hash Seed:      a4bd0a95-469a-48ff-8d9e-c1a3e4674ec8
Journal backup:           inode blocks
root@AVENTHEIM:/u/h/root>mount |grep /dev/sda
/dev/sda on / type ext4 (rw,relatime,lazytime)
root@AVENTHEIM:/u/h/root>cat /etc/fstab
/dev/block/8:0 / ext4 lazytime 0 1
===END OUTPUT===
Note that "discard" is not in the mount parameters despite that I have set it 
in "tune2fs".
(It is an SSD and it supports TRIM. And yes, I do not partition it.)
Another example:
===BEGIN OUTPUT===
root@AVENTHEIM:/u/h/root>tune2fs -l /dev/sdc
tune2fs 1.44.4 (18-Aug-2018)
Filesystem volume name:   USERDATA
Last mounted on:          /run/mount/sdc
Filesystem UUID:          afb8ef7a-29bc-42fa-8d6b-970f5d91f45a
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal dir_index sparse_super2 needs_recovery 
extent flex_bg large_file uninit_bg
Filesystem flags:         signed_directory_hash
Default mount options:    bsdgroups uid16
Filesystem state:         clean
Errors behavior:          Remount read-only
Filesystem OS type:       Linux
Inode count:              1907744
Block count:              1953506646
Reserved block count:     0
Free blocks:              1768323885
Free inodes:              1905162
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         32
Inode blocks per group:   1
Flex block group size:    16
Filesystem created:       Wed Oct 17 21:07:45 2018
Last mount time:          Tue Oct 30 08:04:37 2018
Last write time:          Tue Oct 30 08:04:37 2018
Mount count:              3
Maximum mount count:      -1
Last checked:             Mon Oct 29 08:13:35 2018
Check interval:           0 (<none>)
Lifetime writes:          1551 GB
Reserved blocks uid:      65534 (user nobody)
Reserved blocks gid:      65534 (group nogroup)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   legacy
Directory Hash Seed:      b99b9c29-ee43-423e-b4bd-0321c1f7d12a
Journal backup:           inode blocks
root@AVENTHEIM:/u/h/root>mount |grep /dev/sdc
/dev/sdc on /run/mount/sdc type ext4 
(rw,nosuid,nodev,relatime,resuid=65534,resgid=65534,user)
===END OUTPUT===
Again, the default options are not being honoured. I mounted it using "pmount 
-e" but it should not affect options like "bsdgroups" and "uid16". Also, it is 
not in "/etc/fstab".
--
Please reply to this e-mail with UTF8-encoded plain text.
You are as malicious as any other spammer if you send HTML e-mails.

-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
Comment: https://protonmail.com

wsBcBAEBCAAQBQJb19LBCRDYtWA5RV10HwAAhccIALRLrZ/EglI5VSThTNSP
yGnd/95GV5gOMEFhTW1kcKp1zReC06Ja6IFzBWQrMZsksl9dpseFEZqUjvcn
J+/h5lGLNPTjO7D4Aujqpyh+qxKq9UIfSnBAeSDaojT9i8nl5vGHfs/rRWhf
adML2703nJQjuNgLP/SThuQJQqAOk3vXCLhlp7whA1zH57h5yIO99QuUMRKT
T2P04ZhhIf/2ljJng0DJ73nPtW0gunIJcmoHLUEjMIQv7SigEzVg1TZt8qQm
In08fCK289CG6Dde1lNRQjqqcC+Kj3Og1KtXCC08ekBsuoSedrvvztqyrHKv
eZF1VFoqeci3uKq0K0fW22k=
=uB8a
-----END PGP SIGNATURE-----

Attachment: publickey - [email protected] - 0xAB77ABA4.asc
Description: application/pgp-keys

Attachment: publickey - [email protected] - 0xAB77ABA4.asc.sig
Description: PGP signature


--- End Message ---
--- Begin Message ---
On Tue, Oct 30, 2018 at 03:40:52AM +0000, Gong S. wrote:
> 
> Package: e2fsprogs
> Version: 1.44.4-2
> 
> The mount options set in "e2fsprogs" are not being used by the OS, regardless 
> whether there are corresponding entries in "/etc/fstab".

This is not a bug.  It's rather a misunderstanding of how the ext4
file system kernel code handles mount options in the superblock.

They don't show up in /proc/self/mounts in order to be backwards
compatible to how /etc/mtab would work, since if /sbin/mount is
manually maintaining /etc/mtab (as it historically did) as opposed to
having /etc/mtab be a symlink to /proc/self/mounts, the mount
userspace binary has no idea about what might be inside a file
system's superblock.  So the fact that "discard" doesn't show up when
you run the "mount" command, or if you look at /proc/mounts or
/proc/self/mounts, is the system working as designed.  But in fact,
the discard option *is* being honored by the kernel.

You can see that if you look at /proc/fs/ext4/<device>/options.  So
for example, you might see this.

% mke2fs -q -t ext4 /tmp/foo.img 1G
% tune2fs -o discard /tmp/foo.img 
% sudo mount /tmp/foo.img /mnt
% grep /mnt /proc/mounts
/dev/loop0 /mnt ext4 rw,relatime 0 0
% cat /proc/fs/ext4/loop0/options
rw
bsddf
nogrpid
block_validity
dioread_lock
discard
delalloc
nowarn_on_error
journal_checksum
barrier
auto_da_alloc
dax
user_xattr
acl
noquota
resuid=0
resgid=0
errors=continue
commit=5
min_batch_time=0
max_batch_time=15000
stripe=0
data=ordered
inode_readahead_blks=32
init_itable=10
max_dir_size_kb=0

The fact that /proc/mounts has:

/dev/loop0 /mnt ext4 rw,relatime 0 0

... means that you can get the same execute the command... 

mount -t ext4 -o rw,relatime /dev/loop0 /mnt

....and you will get the same configured mount.  Yes, you could also
type:

mount -t ext4 -o 
rw,bsddf,nogrpid,block_validity,dioread_lock,discard,delalloc,nowarn_on_error,journal_checksum,barrier,auto_da_alloc,dax,user_xattr,acl,noquota,resuid=0,resgid=0,errors=continue,commit=5,min_batch_time=0,max_batch_time=15000,stripe=0,data=ordered,inode_readahead_blks=32,init_itable=10,max_dir_size_kb=0
 /dev/loop0 /mnt

But that would be unnecessary.  And if "grep /proc/mounts | grep loop0" 
returned:

/dev/loop0 /mnt ext4 
rw,bsddf,nogrpid,block_validity,dioread_lock,discard,delalloc,nowarn_on_error,journal_checksum,barrier,auto_da_alloc,dax,user_xattr,acl,noquota,resuid=0,resgid=0,errors=continue,commit=5,min_batch_time=0,max_batch_time=15000,stripe=0,data=ordered,inode_readahead_blks=32,init_itable=10,max_dir_size_kb=0
 0 0

It would both be correct.... and annoying.

So the fact that "discard" doesn't appear in "mount | grep <device>"
is the system working as designed.

Cheers,

                                        - Ted

--- End Message ---

Reply via email to