Hey! On 4/15/21 8:40 PM, Trond Myklebust wrote: > Here is a skeleton example: > > [root@leira rules.d]# cat /etc/udev/rules.d/50-nfs4.rules > ACTION=="add" KERNEL=="nfs_client" ATTR{identifier}=="(null)" PROGRAM="/usr/sbin/nfs4_uuid" ATTR{identifier}="%c" > > [root@leira rules.d]# cat /usr/sbin/nfs4_uuid > #!/bin/bash > # > if [ ! -f /etc/nfs4_uuid ] > then > uuid="$(uuidgen -r)" > echo -n ${uuid} > /etc/nfs4_uuid > else > uuid="$(cat /etc/nfs4_uuid)" > fi > echo ${uuid} > > > Obviously, the /usr/sbin/nfs4_uuid would need to be fleshed out a > little more to ensure that the file /etc/nfs4_uuid actually contains a > uuid in the right format, but you get the gist... > > With the above additions, I end up with a repeatable > > [root@leira rules.d]# modprobe nfs4 > [root@leira rules.d]# cat /sys/fs/nfs/net/nfs_client/identifier > 7f9f211b-0253-4ef8-a970-b1b0f600af02 > [root@leira rules.d]# cat /etc/nfs4_uuid > 7f9f211b-0253-4ef8-a970-b1b0f600af02 I see that this example does populate nfs_client/identifier and I'm sure we could beef up the mechanism but the may question is this.... How does populating nfs_client/identifier via udev actually setting the nfs4_unique_id parameter which is used to set the unique id? I look and i've must have missed it... If the answer is we need to change the client to look a the nfs_client/identifier... then we should get rid of the nfs4_unique_id param all together... steved.