Is there a command apart from mount or some script that can check whether a ext4 partition is mounted with the nodiscard option?
I removed the defaults options and then gave nodiscard and one additional dummy option, nombcache. The nombcache option was given just to test out whether it is accepted or not. The same result, nodiscard was not shown in the mount. Please see the output given below for more details
$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=XXXXXXX / ext4 lazytime,nodiscard,nombcache 0 1
UUID=XXXXXXX1 /home ext4 lazytime,nodiscard,nombcache 0 2
$ mount -v -types ext4
/dev/nvme0n1p1 on / type ext4 (rw,relatime,lazytime,nombcache)
/dev/nvme0n1p2 on /home type ext4 (rw,relatime,lazytime,nombcache)
$