[LU-14422] lfs setstripe -c '' removes pool allocation Created: 11/Feb/21 Updated: 11/Jun/22 Resolved: 11/Jun/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.10.8, Lustre 2.12.6 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrew Elwell | Assignee: | Zhenyu Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
One of our user groups was setting lfs setstripe -c "$STRIPE_COUNT" in a script and not checking the variable existed. Therefore at some point they managed to run the equivalent of lfs setstripe -c "" Testcase (Client: cray-lustre-default-2.7.5.13_4.4.180-6.0.7.1_16.13__gddebdf5c6.x86_64, Server: 2.10.8) whi550@galaxy-1 [2021-02-04 13:26] /askapbuffer/payne/whi550/testing> mkdir lfs_testing whi550@galaxy-1 [2021-02-04 13:26] /askapbuffer/payne/whi550/testing> cd lfs_testing whi550@galaxy-1 [2021-02-04 13:26] /askapbuffer/payne/whi550/testing/lfs_testing> lfs getstripe . . stripe_count: 1 stripe_size: 1048576 stripe_offset: -1 pool: processing whi550@galaxy-1 [2021-02-04 13:26] /askapbuffer/payne/whi550/testing/lfs_testing> lfs setstripe -c "" . whi550@galaxy-1 [2021-02-04 13:26] /askapbuffer/payne/whi550/testing/lfs_testing> lfs getstripe . . stripe_count: 1 stripe_size: 1048576 stripe_offset: -1 testcase on 2.12. (lustre-client-2.12.5-1.x86_64, server lustre-2.12.6-1.el7.x86_64) set up pools on server: [root@pgfs-mds4 ~]# mount /dev/mapper/TEST_MGT [root@pgfs-mds4 ~]# mount /dev/mapper/TEST_OST0000 [root@pgfs-mds4 ~]# mount /dev/mapper/TEST_OST0001 [root@pgfs-mds4 ~]# mount /dev/mapper/TEST_MDT0000 [root@pgfs-mds4 ~]# lctl pool_list testfs Pools from testfs: [root@pgfs-mds4 ~]# lctl pool_new testfs.ost0 Pool testfs.ost0 created [root@pgfs-mds4 ~]# lctl pool_new testfs.ost1 Pool testfs.ost1 created [root@pgfs-mds4 ~]# lctl pool_add testfs.ost0 testfs-OST0000 OST testfs-OST0000_UUID added to pool testfs.ost0 [root@pgfs-mds4 ~]# lctl pool_add testfs.ost1 testfs-OST0001 OST testfs-OST0001_UUID added to pool testfs.ost1 [root@pgfs-mds4 ~]# rpm -q lustre lustre-2.12.6-1.el7.x86_64 and the client: aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ lfs getstripe . . stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ lfs setstripe -c "" . aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ lfs getstripe . . stripe_count: 1 stripe_size: 1048576 pattern: 0 stripe_offset: -1 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ |
| Comments |
| Comment by Andrew Elwell [ 11/Feb/21 ] |
|
I tried to submit this with the original subject of .. but Jira wouldn't accept it. |
| Comment by Andreas Dilger [ 11/Feb/21 ] |
|
Have you tried with a newer client? Essentially, "setstripe with totally empty layout" means "delete layout". However, there were improvements since 2.7 that allow partial layout inheritance from the parent directory, so it may be that this problem is already fixed. |
| Comment by Andrew Elwell [ 11/Feb/21 ] |
|
Yes - the /testfs testcase was a 2.12.6 client against a 2.12.6 server - it doesn't iherit from parent aelwell@hpc-admin2:/testfs/pawsey0001/aelwell$ lfs setstripe -p ost0 dir1/ aelwell@hpc-admin2:/testfs/pawsey0001/aelwell$ cd dir1 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ lfs getstripe . . stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1$ mkdir -p foo/bar aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ cd foo/bar aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ pwd /testfs/pawsey0001/aelwell/dir1/foo/bar aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ lfs getstripe . .. ../.. . stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 .. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 ../.. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ lfs setstripe -c "" . aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ lfs getstripe . .. ../.. . stripe_count: 1 stripe_size: 1048576 pattern: 0 stripe_offset: -1 .. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 ../.. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo/bar$ |
| Comment by Andrew Elwell [ 11/Feb/21 ] |
|
The good news is that it at least doesn't recursively remove pool info below aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ lfs getstripe .. bar/ .. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 ../foo stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 bar/ stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ lfs setstripe -c "" . aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ lfs getstripe .. bar/ .. stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 ../foo stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 bar/ stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1 pool: ost0 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ mkdir baz aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ lfs getstripe baz baz stripe_count: 1 stripe_size: 1048576 pattern: 0 stripe_offset: -1 aelwell@hpc-admin2:/testfs/pawsey0001/aelwell/dir1/foo$ I had seen |
| Comment by Gerrit Updater [ 01/Mar/21 ] |
|
Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/41793 |
| Comment by Gerrit Updater [ 11/Jun/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/41793/ |
| Comment by Peter Jones [ 11/Jun/22 ] |
|
Landed for 2.16 |