[LU-12650] get_root_path() filesystem name compare error that leads to fid2path fail Created: 09/Aug/19 Updated: 28/Oct/19 Resolved: 16/Sep/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.13.0, Lustre 2.12.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Artem Blagodarenko (Inactive) | Assignee: | Artem Blagodarenko (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
get_root_path() returns (for instance) path to "lustre" mount instead "lustre1" For example, fid2path use get_root_path().
mount -t lustre
/dev/mapper/mds1_flakey on /mnt/lustre-mds1 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre-MDT0000,mgs,osd=osd-ldiskfs,user_xattr,errors=remount-ro)
/dev/mapper/ost1_flakey on /mnt/lustre-ost1 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre-OST0000,mgsnode=192.168.1.227@tcp,osd=osd-ldiskfs,errors=remount-ro)
/dev/mapper/ost2_flakey on /mnt/lustre-ost2 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre-OST0001,mgsnode=192.168.1.227@tcp,osd=osd-ldiskfs,errors=remount-ro)
192.168.1.227@tcp:/lustre on /mnt/lustre type lustre (rw,seclabel,flock,user_xattr,lazystatfs)
/tmp/lustre2-mdt on /mnt/lustre2-mds1 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre2-MDT0000,mgsnode=192.168.1.227@tcp,osd=osd-ldiskfs,user_xattr,errors=remount-ro)
/tmp/lustre2-ost1 on /mnt/lustre2-ost1 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre2-OST0000,mgsnode=192.168.1.227@tcp,osd=osd-ldiskfs,errors=remount-ro)
/tmp/lustre2-ost2 on /mnt/lustre2-ost2 type lustre (ro,context=unconfined_u:object_r:user_tmp_t:s0,svname=lustre2-OST0001,mgsnode=192.168.1.227@tcp,osd=osd-ldiskfs,errors=remount-ro)
192.168.1.227@tcp:/lustre2 on /mnt/lustre2 type lustre (rw,seclabel,flock,lazystatfs)
lfs path2fid /mnt/lustre2/foodir3
[0x200000401:0x1:0x0]
lfs fid2path lustre2 [0x200000401:0x1:0x0]
lfs fid2path: cannot find '[0x200000401:0x1:0x0]': No such file or
directory
umount /mnt/lustre
lfs fid2path lustre2 [0x200000401:0x1:0x0]
foodir3
|
| Comments |
| Comment by Artem Blagodarenko (Inactive) [ 09/Aug/19 ] |
|
On 2.7 this bug leads to changeling errors. lfs changeling returns information from wrong fs. In muster, changeling completely rewritten, so only fid2path (probably other commands) are failed. |
| Comment by Alex Zhuravlev [ 09/Aug/19 ] |
|
can you check that with master branch, please? |
| Comment by Andreas Dilger [ 09/Aug/19 ] |
|
I'd prefer removing get_root_path() as much as possible. Instead of extracting the fsname from /proc/mounts via a complex scan, we can call a single ioctl() to get the filesystem name directly from any file/directory in the filesystem. For example, patch https://review.whamcloud.com/35451 " |
| Comment by Gerrit Updater [ 09/Aug/19 ] |
|
Artem Blagodarenko (c17828@cray.com) uploaded a new patch: https://review.whamcloud.com/35755 |
| Comment by Artem Blagodarenko (Inactive) [ 09/Aug/19 ] |
|
> can you check that with master branch, please? |
| Comment by Artem Blagodarenko (Inactive) [ 09/Aug/19 ] |
|
adilger , thanks for pointing to right solution. I uploaded solution I used to fix this issue here, because it is ready and works. But sure, we can make other patch or both. Patch above can be useful for other get_root_path() users. We need to deleted this function or fix. |
| Comment by Gerrit Updater [ 16/Sep/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35755/ |
| Comment by Peter Jones [ 16/Sep/19 ] |
|
Landed for 2.13 |
| Comment by Gerrit Updater [ 17/Sep/19 ] |
|
Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36211 |
| Comment by Gerrit Updater [ 23/Sep/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36211/ |