[LU-15873] Make mounting with "-o rdonly_dev" work Created: 19/May/22  Updated: 20/Jun/23  Resolved: 20/Apr/23

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

Type: Improvement Priority: Minor
Reporter: Arshad Hussain Assignee: Arshad Hussain
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
is related to LU-13979 take care of rdonly mode for mdt_close Open
Rank (Obsolete): 9223372036854775807

 Description   

Make target mounting with "-o rdonly_dev" work.

 "rdonly_dev"  currently does not work. While the "rdonly_dev" returns "Operation not supported" from OSD. It is a simple flag check which is doing the returning, removing the check seems to work.

Mounting with "rdonly_dev" 

# umount /mnt/lustre-mds1
# mount.lustre /dev/mapper/mds1_flakey /mnt/lustre-mds1 -o rdonly_dev
mount.lustre: mount /dev/mapper/mds1_flakey at /mnt/lustre-mds1 failed: Operation not supported

Logs:

(obd_config.c:774:class_setup()) setup lustre-MDT0000-osd failed (-95)
(obd_mount.c:200:lustre_start_simple()) lustre-MDT0000-osd setup error -95
(obd_mount_server.c:1993:server_fill_super()) Unable to start osd on /dev/mapper/mds1_flakey: -95
(super25.c:176:lustre_fill_super()) llite: Unable to mount <unknown>: rc = -95

 



 Comments   
Comment by Andreas Dilger [ 20/May/22 ]
# mount.lustre /dev/mapper/mds1_flakey /mnt/lustre-mds1 -o rdonly_dev
mount.lustre: mount /dev/mapper/mds1_flakey at /mnt/lustre-mds1 failed: Operation not supported

The reason this returns "Operation not supported" is because this feature was removed from the code (it used to be implemented as a kernel patch), and replaced by "dm-flakey" to allow discarding writes to the filesystem. I don't think that should relate to implementing "-o ro" at all.

Comment by Gerrit Updater [ 20/May/22 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/47412
Subject: LU-15873 osd: Make mounting with "-o rdonly_dev" work
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b152cf689dd379e6a414072a8c22be0bb0436449

Comment by Arshad Hussain [ 20/May/22 ]

 

 ...I don't think that should relate to implementing "-o ro" at all.

Understood. Thanks.

Comment by Gerrit Updater [ 01/Sep/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/48095/
Subject: LU-15873 obd: skip checking read-only fs health
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d54114d0c54f7d037ad1009f6db7081124c4c9b8

Comment by Gerrit Updater [ 21/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48096/
Subject: LU-15873 quota: don't release for RO device
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c4b630355f5e5a62c02dab6debeb4f6483058c8b

Comment by Gerrit Updater [ 21/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48098/
Subject: LU-15873 osd: heed readonly mount upon osd-ldiskfs device
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c28887efaa499b902d8f017afb496fe0964ab751

Comment by Gerrit Updater [ 20/Jun/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48097/
Subject: LU-15873 osp: don't sync on RO device
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0f87513bcacc174efc29937fd0cc08f8a648a43e

Generated at Sat Feb 10 03:22:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.