blobfuse2 mounted storage in CentOS 7 cannot list the directories

Aftershow76 31 Reputation points
2022-12-28T15:19:58.017+00:00

Hi.

I'm able to mount Azure blob storage on CentOS 7 using blobfuse2.
I can copy files from CentOS to the mounted storage.

cp -R /sourcefiles /mnt/resource/blobfuse2tmp/mystorage

I have tried both file_cache or stream and they work.

However, there is an issue when I try the "ls" command inside the mounted storage root folder, it does not list the directories. It only lists the files.
I can change into the directory, and do an "ls". It still only lists the files and not the sub directory.

ls -alh

total 0

cd 2022

ls -alh

total 0

pwd

/mnt/resource/blobfuse2tmp/mystorage/2022

mkdir testdir

touch note.txt

ls -alh

-rwxrwxrwx 1 apache apache 0 Dec 28 15:09 note.txt

pwd

/mnt/resource/blobfuse2tmp/mystorage/2022

cd ../

pwd

/mnt/resource/blobfuse2tmp/mystorage

rm -rf 2022

rm: cannot remove ‘2022’: Input/output error

I know the directory 2022 is there because I can change directory into it, yet deleting the folder gives an error.

Is there any setting missing on my blobfuse2 configuration file ?

Below are some of my environment information:

yum list installed | grep fuse

blobfuse2.x86_64 2.0.1-1 installed
fuse.x86_64 2.9.2-11.el7 @base-openlogic
fuse-libs.x86_64 2.9.2-11.el7 @base-openlogic
fuse3.x86_64 3.6.1-4.el7 @extras-openlogic
fuse3-devel.x86_64 3.6.1-4.el7 @extras-openlogic
fuse3-libs.x86_64 3.6.1-4.el7 @extras-openlogic

blobfuse2 configuration file:

components:

  • libfuse
  • file_cache
  • attr_cache
  • azstorage

libfuse:
attribute-expiration-sec: 120
entry-expiration-sec: 120
negative-entry-expiration-sec:

file_cache:
path: /mnt/resource/blobfuse2cache
timeout-sec: 120
max-size-mb: 2048

attr_cache:
timeout-sec: 7200

azstorage:
type: block
account-name: <hidden>
account-key: <hidden>
endpoint: <hidden>
mode: key
container: mystorage

df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 32G 6.4G 25G 21% /
/dev/sdb1 3.9G 17M 3.7G 1% /mnt/resource
blobfuse2 2.0G 96K 2.0G 1% /mnt/resource/blobfuse2tmp/mystorage

Command used:

blobfuse2 mount ./mystorage --config-file=/project/blobfuse2/etc/mystorage.yaml

Thank you.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,202 questions
{count} votes

Accepted answer
  1. SaiKishor-MSFT 17,336 Reputation points
    2023-01-04T00:59:47.69+00:00

    @Aftershow76 Thanks for reaching out to Microsoft Q&A. I understand that you are having issues where if you give the 'ls' command inside the mounted storage root folder, it only shows files and not directories. Please correct me otherwise.

    The reason you may not be seeing the file names would be because Blob storage has flat namespace so it only has the concept of "virtual" directories, however, this will work seamlessly with hierarchical namespace accounts which do have the concept of directories as mentioned here- https://github.com/Azure/azure-storage-fuse/issues/866

    Hope this helps. If you have further questions, please do not hesitate to let me know. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Aftershow76 31 Reputation points
    2023-01-04T06:16:16.97+00:00

    Thanks for the information. HNS is enabled for the storage account. I changed the storage type to adls and now it works.

    azstorage:
    type: adls

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.