Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see directories directly in containers, only in subdirectories when mounted #1284

Closed
gjstreicher-ims opened this issue Nov 10, 2023 · 9 comments
Assignees
Milestone

Comments

@gjstreicher-ims
Copy link

Which version of blobfuse was used?

version 2.1.1

Which OS distribution and version are you using?

Ubuntu 22.04.3 LTS x86_64

If relevant, please share your mount command.

mkdir -p ./test/cache
mkdir -p ./test/ghij
sudo blobfuse2 mount ./test/ghij --config-file=./azure-sa.yaml --allow-other

Config file contents (azure-sa.yaml):

# Refer ./setup/baseConfig.yaml for full set of config parameters

logging:
  type: syslog
  level: log_debug

components:
  - libfuse
  - stream
  - attr_cache
  - azstorage

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

stream:
  block-size-mb: 50
  blocks-per-file: 18
  cache-size-mb: 7168

file_cache:
    path: ./test/cache

attr_cache:
  timeout-sec: 7200

azstorage:
  type: block
  account-name: <ACCOUNT_NAME_HERE>
  account-key: <ACCOUNT_KEY_HERE>
  endpoint: https://<ACCOUNT_NAME_HERE>.blob.core.windows.net
  mode: key
  container: ghij
  subdirectory: asdf

What was the issue encountered?

The blob container is called ghij and it contains a directory called asdf.

If I leave out the subdirectory: asdf key-value pair under azstorage, I'm unable to see the asdf directory in the ghij container. I can only see the files (block blobs) directly stored in the container alongside the 'asdf' directory.

If I include the subdirectory: asdf, then I can see both the directories and files (block blobs) inside the asdf directory.

Setting the virtual-directory property to true or false has no impact on this issue.

Have you found a mitigation/solution?

A simple solution would be to always have a single directory inside the container and to always mount it instead of the container, but the container should allow for that behaviour by itself as it does in the Azure Storage Explorer.

Please share logs if available.

If you can tell me where to find the log files, I'll add the contents here.

@vibhansa-msft
Copy link
Member

Is it a HNS account that you are mounting?

@vibhansa-msft vibhansa-msft self-assigned this Nov 13, 2023
@vibhansa-msft vibhansa-msft added this to the V2-2.1.2 milestone Nov 13, 2023
@gjstreicher-ims
Copy link
Author

gjstreicher-ims commented Nov 13, 2023

Is it a HNS account that you are mounting?

It is. When creating the storage account via the Azure Portal, I ticked the checkbox next to "Enable hierarchical namespace".

It also shows "Enabled" next to the "Hierarchical namespace" property on the overview page of the storage account.

@vibhansa-msft
Copy link
Member

If its HNS account, then while mounting using blobfuse you need to supply an extra param that informs blobfuse that you are mounting a HNS enabled account. Without this some of the functionality may not work properly.

@vibhansa-msft
Copy link
Member

Also, as you are mounting a HNS account you config stand invalid for this. Refer below snippet and update accordingly.

azstorage:
  type: adls
  account-name: <ACCOUNT_NAME_HERE>
  account-key: <ACCOUNT_KEY_HERE>
  endpoint: https://<ACCOUNT_NAME_HERE>.dfs.core.windows.net
  mode: key
  container: ghij
  subdirectory: asdf

@vibhansa-msft
Copy link
Member

Let me know if this work fine for you. If so, kindly close this issue here.

@vibhansa-msft vibhansa-msft modified the milestones: V2-2.1.2, V2-2.1.3 Nov 16, 2023
@gjstreicher-ims
Copy link
Author

Thanks. The property of type: adls works without having to specify a subdirectory, but that suggests that I'm using Azure Data Lake Storage, which is not the case.

I am using Block Blob storage, which is why I chose the type: block option.

@vibhansa-msft
Copy link
Member

If your account is HNS enabled, then it works on "dfs" endpoint only and "type: adls" instructs blobfuse to use dfs endpoint for certain operations. HNS-Enable is a Gen2 ADLS account only.

@vibhansa-msft
Copy link
Member

Kindly close this if adding "adls" as type solves the issue for you.

@vibhansa-msft
Copy link
Member

Closing this as there is no issue from blobfuse side here. Providing correct option in mount is resolving the issue, as mentioned in customer comment above. Feel free to post here if you have any further queries.

@vibhansa-msft vibhansa-msft modified the milestones: V2-2.1.3, V2-2.2.0 Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants