[LU-10028] Export the information about Lustre special mount flags and options Created: 25/Sep/17  Updated: 12/Apr/18  Resolved: 22/Nov/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: New Feature Priority: Minor
Reporter: Qian Yingjin (Inactive) Assignee: Qian Yingjin (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-10087 sanity-lfsck test_1a: (7) no FID-in-d... Open
is related to LU-8066 Move lustre procfs handling to sysfs ... Open
is related to LU-10677 can't delete directory In Progress
is related to LU-10887 2 MDTs stuck in WAITING Resolved
Rank (Obsolete): 9223372036854775807

 Description   

Some users need the information about Lustre mount. But the information exported by /proc/mounts is not enough especially for some Lustre special mount options and flags such as abort_recov, noir, etc.

This patch can export some Lustre special mount information. i.e.

[root@QYJ tests]# cat /sys/kernel/debug/lustre/mounts 
profile: lustre-MDT0000 device: /dev/loop0 flags: 3200 options: user_xattr,errors=remount-ro
profile: lustre-OST0000 device: /dev/loop1 flags: 3000 options: ,errors=remount-ro
profile: lustre-OST0001 device: /dev/loop2 flags: 3000 options: ,errors=remount-ro
profile: lustre-client device: 192.168.59.129@tcp:/lustre flags: 2 options: user_xattr,flock


 Comments   
Comment by Gerrit Updater [ 25/Sep/17 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/29187
Subject: LU-10028 obdclass: Export Lustre special mount infomation
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f03191a4f47a355043c47308632a448794e295f1

Comment by Andreas Dilger [ 26/Sep/17 ]

It would be better to export this information from /proc/mounts directly rather than adding a special /sys/kernel/debug/lustre/mounts file, so that "mount" returns the right information?

Comment by Andreas Dilger [ 26/Sep/17 ]

The patch https://review.whamcloud.com/20161 is a step in the right direction for this. Creating a proper linkage between the superblock of the mountpoint and the superblock of the underlying filesystem, even if only for ldiskfs, would help with LU-137 to be able to pass superblock ioctls down to the underlying filesystems for e.g. resize2fs and similar.

Comment by Qian Yingjin (Inactive) [ 27/Sep/17 ]

Hi Andreas,
I tried to export the information frome /proc/mounts directly, but I could not find a better solution except patching the kernel proc system.

The submitted patch https://review.whamcloud.com/29187 can be used not only for server mountpoint information, but also for exporting client side mountpoint information (i.e. abort_recov).

Thanks,
Qian

Comment by Qian Yingjin (Inactive) [ 27/Sep/17 ]

Sorry, I just found that super_block has 'show_options', which can export Lustre special options via /proc/mounts. I will make a patch sooner.

Comment by Gerrit Updater [ 27/Sep/17 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/29228
Subject: LU-10028 obdclass: Export Lustre mount flags and options
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3ba3b15304d9f71173b52a667665c2ab60a4dba9

Comment by Qian Yingjin (Inactive) [ 27/Sep/17 ]

The output of '/proc/mounts' for Lustre is:

[root@QYJ tests]# cat /proc/mounts | grep lustre
/dev/sda1 /usr/sbin/mount.lustre xfs rw,relatime,attr2,inode64,noquota 0 0
/dev/loop0 /mnt/lustre-mds1 lustre ro,svname=lustre-MDT0000,mgs,osd=osd-ldiskfs,user_xattr,errors=remount-ro 0 0
/dev/loop1 /mnt/lustre-ost1 lustre ro,svname=lustre-OST0000,mgsnode=192.168.59.129@tcp,osd=osd-ldiskfs,errors=remount-ro 0 0
/dev/loop2 /mnt/lustre-ost2 lustre ro,svname=lustre-OST0001,mgsnode=192.168.59.129@tcp,osd=osd-ldiskfs,errors=remount-ro 0 0
192.168.59.129@tcp:/lustre /mnt/lustre lustre rw,flock,user_xattr,lazystatfs 0 0
Comment by Gerrit Updater [ 22/Nov/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/29228/
Subject: LU-10028 obdclass: Export Lustre mount flags and options
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6ee90b7586d58b0df27a511472e38792baba4745

Comment by Peter Jones [ 22/Nov/17 ]

Landed for 2.11

Generated at Sat Feb 10 02:31:24 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.