Azure / azure-storage-fuse

A virtual file system adapter for Azure Blob storage
Other
647 stars 204 forks source link

Error: mount directory is not empty when trying to mount with blobfuse2 which has backup directories #1434

Closed mojgilla closed 1 month ago

mojgilla commented 1 month ago

Which version of blobfuse was used?

blobfuse2 version 2.3.0

Which OS distribution and version are you using?

RHEL 8

If relevant, please share your mount command.

/usr/bin/blobfuse2 /oraclebackup --tmp-path=/mnt/resource/bftmp --empty-dir-check=false --use-attr-cache=true --file-cache-timeout=120 -o attr_timeout=120 -o entry_timeout=120 -o negative_timeout=120 -o allow_other --max-concurrency=30 --config-file=/home/adminuser/build_blob/fuse_config.yaml --log-level=LOG_DEBUG --empty-dir-check=false

cat fuse_config.yaml

logging: type: syslog azstorage: type: block account-name: XXX account-key: XXX endpoint: https://XXXstorageaccount.blob.core.windows.net container: XXX-pcl-db-oracle-backup file_cache: path: /mnt/resource/bftmp policy: lru # lru (least recently used)|lfu (least frequently used) timeout-sec: 604800 # Set for 7 days max-size-mb: 1000000 emptydircheck: false high-threshold: 85 allow-non-empty-temp: true cleanup-on-start: false # Default=true (determine if yields dirty writes) policy-trace: true # Change to false after validation sync-to-flush: false offload-io: false

What was the issue encountered?

Error: mount directory is not empty

Have you found a mitigation/solution?

Not yet

Please share logs if available.

/oraclebackup has subdirectories with database backups. If these subdirectories are removed , it removes the backups from blob storage to my knowledge...so we need to know how we can mount this directory as is without encountering the error.

i understand /mnt/resource is temp/cache and allow-non-empty-temp: true and emptydircheck: false help with cache dir but not the mount directory.

vibhansa-msft commented 1 month ago
mojgilla commented 1 month ago

Thank u for your prompt response .

While I was researching earlier , I noticed we have /oraclebackup2 directory which I was able to mount as blobfuse2 and it has all the backups from the past.

All old backup logs and rman configuration had /oraclebackup and not /oraclebackup2 so I am not sure how this happened and will follow up with my team tomorrow. Not sure someone renamed the mount directory.

But thank u on your note #3 that deletes don’t sync up with blob storage if is not mounted .

Cheers

Mohana

On Wed, Jun 12, 2024 at 9:57 PM Vikas Bhansali @.***> wrote:

  • When you mount blobfuse, your mount directory shall be empty. Non-empty mount directory is supported through a knob but not advisable as you will not be able to see those files/dirs once mount succeeds and those existing files/dirs will not be uploaded to storage as well. Just to avoid wrong expectations better clear the mount directory before you mount blobfuse.
  • temp directory shall also be empty. Again there is a knob to support non-empty one but files that exists in this directory will not be auto uploaded. On top of it if application tries to read/write a file and file already exists in the temp cache then that file will not be synced with storage container and you might read/write stale contents. There are very specific use-cases for which we support non-empty.
  • Before the mount if you delete anything in mount or tempcache path, no changes will be done to your storage container. Container is synced only after the mount based on what all operations you perform after the mount was successful.
  • If you unmount gracefully blobfuse will clear the temp-cache path before exit.

— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-storage-fuse/issues/1434#issuecomment-2164262114, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHKUYE3G26CXJFA2CDZO3FTZHEDDNAVCNFSM6AAAAABJG3EIBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUGI3DEMJRGQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Mohana

vibhansa-msft commented 1 month ago

Closing this as there is no open discussion here. Feel free to post your follow on comments here or reopen this item if you still face issues.