Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
9223372036854775807
Description
The main idea is to bind a FID given by path or FID (formatted with or without brackets)
The associated set of clients (range) when creating files or directories, will inherit striping information from template FID when it's possible. Striping priorities:
- Explicit striping
- Parent striping
- Template striping
- Filesystem default
As it's possible to query the nodemap on a given export, it's possible to get the information on the MDT stack which will transmit the template object to lower layer. Then, when a template exists, a new field into dt_allocation_hint points to the template object and will be read in lod_ah_init function and lod_layout_component is filled accordingly.
Example of usage:
- Start lustre
- On a client (normal striping)
[root@client ~]# mount -t lustre 192.168.10.134@tcp:/testfs /lustre/testfs2 [root@client ~]# cd /lustre/testfs2/ [root@client testfs2]# echo "test" > testfile [root@client testfs2]# lfs getstripe -c testfile 1 [root@client testfs2]# lfs getstripe -c my_template 2 [root@client testfs2]# lfs path2fid my_template [0x200000402:0x1:0x0]
- On the MGS node (creating the nodemap + adding client or range)
[root@mds1]# lctl nodemap_add SG1 [root@mds1]# lctl nodemap_add_range --name SG1 --range 192.168.10.[130-140]@tcp [root@mds1]# lctl set_param -P nodemap.SG1.template=0x200000401:0x1:0x0 or [root@mds1]# lctl nodemap_set_template --name SG1 --template /lustre/testfs2/my_template or [root@mds1]# lctl nodemap_set_template --name SG1 --template 0x200000401:0x1:0x0 or [root@mds1]# lctl nodemap_set_template --name SG1 --template "[0x200000401:0x1:0x0]" [root@mds1]# lctl nodemap_modify --name SG1 --property admin --value 1 # working as root [root@mds1]# lctl nodemap_activate 1 [root@mds1]# cat /proc/fs/lustre/nodemap/SG1/template 0x200000402:0x1:0x0
- On the client:
[root@client testfs2]# echo "test" > testfile2 [root@client testfs2]# lfs getstripe -c testfile2 2
Todo in next days:
- add a valid fid format check when bound
- I intend to change the type of record from char[FID_LEN] to lu_fid directly (add a nodemap record). It will prevent the call to sscanf in mdt_reint_open
Attachments
Issue Links
- is related to
-
LU-11656 "lfs getstripe" on directory does not show default root layout
- Resolved
-
LU-11510 preserve PFL/FLR/DoM layout with lfs_migrate
- Resolved
-
LU-11586 sanity-pfl test_10: FAIL: /mnt/lustre/d10.sanity-pfl/file2 does not inherite root layout (subdiretory mounts)
- Resolved
-
LU-10345 allow specifying file layout by FID and filename extension
- Open
-
LU-11234 Choose lustre pool to place file’s objects by user-defined policies
- Open
-
LU-11739 Don't inherit default layout from root for new subdirectories
- Resolved
-
LU-17775 Allow 'lfs setstripe --copy FID' to inherit layout from FID
- Resolved