Currently _fs_sysfs_dname gets fsid from the findmnt command however this command provides the metadata_uuid in the context device is mounted with temp-fsid. So instead, use btrfs filesystem show command to know the temp-fsid. Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> --- v2: new. common/rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 259a1ffb09b9..deeffe4228d4 100644 --- a/common/rc +++ b/common/rc @@ -4728,7 +4728,9 @@ _fs_sysfs_dname() case "$FSTYP" in btrfs) - findmnt -n -o UUID ${dev} ;; + fsid=$($BTRFS_UTIL_PROG filesystem show ${dev} | grep uuid: | \ + awk '{print $NF}') + echo $fsid ;; *) _short_dev $dev ;; esac -- 2.39.3