dell / csi-baremetal

Bare-metal CSI Driver
Apache License 2.0
73 stars 33 forks source link

GetFSSpace will error when src is not '/' #1156

Open 0x5457 opened 6 months ago

0x5457 commented 6 months ago

Describe the bug If /dev/sda is mounted under /mnt/sda

when executing fs.GetFSSpace("/mnt/sda") I got the error wrong df output ...

Environment (please complete the following information):

To Reproduce executing fs.GetFSSpace("/mnt/sda")

Expected behavior Expect to return the space size of /dev/sda

Additional context I think && len(output[0]) == 1 should be removed in thie line https://github.com/dell/csi-baremetal/blob/89c2f935cbd7cbd6301705db9033aa8047cdf8f2/pkg/base/linuxutils/fs/fs_helper.go#L146