Databricks

DBFS vs Volumes: Differences and Migration Guide — 5-Axis Comparison, SQL, and Deprecation Timeline

2026-03-26
更新: 2026-03-27
NicheeLab Editorial Team

When you handle non-table files (CSV, JSON, images, config files, and so on) in Databricks, DBFS (Databricks File System) was the traditional choice. Since Unity Catalog arrived, however, Volumes are the new recommended standard. This article compares DBFS and Volumes across 5 axes and walks through the concrete steps to migrate from existing DBFS usage to Volumes.

DBFS (Databricks File System) Overview

DBFS is a filesystem abstraction layer built into the Databricks workspace. It mounts cloud storage (S3 / ADLS / GCS) under dbfs:/ paths and lets you access it as if it were a local filesystem.

  • DBFS Root: the default storage automatically provisioned when a workspace is created
  • DBFS Mount: mount external cloud storage under dbfs:/mnt/...
  • Path format: dbfs:/mnt/data/sales.csv or /dbfs/mnt/data/sales.csv

DBFS's biggest problem is the lack of governance. Because DBFS is managed by workspace ACLs, Unity Catalog permissions (GRANT/REVOKE) do not apply, and detailed auditing of who accessed which file is difficult.

Volumes Overview

Volumes are file storage that lives in the Unity Catalog namespace. Files are addressed under /Volumes/<catalog>/<schema>/<volume>/, and Unity Catalog's permission control, auditing, and lineage all apply to those files.

  • Managed Volume: UC manages the storage lifecycle (data is deleted on DROP)
  • External Volume: references an existing cloud storage path (only metadata is removed on DROP)
  • Path format: /Volumes/prod/raw/landing/sales.csv

5-Axis Comparison Table

AxisDBFSVolumes
GovernanceNone. Workspace ACLs only; UC permissions do not applyManaged by Unity Catalog. Controlled declaratively with GRANT/REVOKE
Access ControlWorkspace admin configures mounts. No per-file controlPer-volume control via READ VOLUME / WRITE VOLUME
MountsMount cloud storage with dbutils.fs.mount()No mounts needed. External Volume references the existing path directly
Path Formatdbfs:/mnt/... or /dbfs/mnt/.../Volumes/catalog/schema/volume/...
RecommendationLegacy. Not recommended for new developmentRecommended. New features ship on Volumes

Specific DBFS Limitations

  • Cannot share files across workspaces
  • Mount credentials are tied to the workspace, so every mount must be reconfigured when credentials are rotated
  • Data written to DBFS Root is hard to manage with user-controlled encryption keys
  • File operations are not reflected in Unity Catalog lineage
  • All users accessing the same mount get the same permissions, making least-privilege hard to enforce

Migration Steps

Step 1: Inventory current DBFS usage

# List all DBFS mounts
mounts = dbutils.fs.mounts()
for m in mounts:
    print(f"Mount: {m.mountPoint} → {m.source}")

# List files in DBFS Root
files = dbutils.fs.ls("dbfs:/")
for f in files:
    print(f.name, f.size, f.isDir())

Step 2: Create the destination Volume

-- Register an existing S3 path as an External Volume (no data copy needed)
CREATE EXTERNAL VOLUME prod.raw.legacy_mount
LOCATION 's3://my-legacy-bucket/data/'
COMMENT 'External Volume migrated from a DBFS mount';

-- Create a Managed Volume for new files
CREATE VOLUME prod.raw.new_landing
COMMENT 'Managed Volume for the new pipeline';

Step 3: Copy files (for a Managed Volume)

# Copy files from DBFS to Volumes
dbutils.fs.cp(
    "dbfs:/mnt/old-landing/sales/",
    "/Volumes/prod/raw/new_landing/sales/",
    recurse=True
)

# Verify the copy
files = dbutils.fs.ls("/Volumes/prod/raw/new_landing/sales/")
print(f"Copied {len(files)} files")

Step 4: Rewrite the pipeline paths

# Before: DBFS path
df = spark.read.csv("dbfs:/mnt/old-landing/sales/2026/*.csv")

# After: Volumes path
df = spark.read.csv("/Volumes/prod/raw/new_landing/sales/2026/*.csv")

Step 5: Set permissions

-- Read permission
GRANT READ VOLUME ON VOLUME prod.raw.new_landing TO `data-analysts`;

-- Write permission
GRANT WRITE VOLUME ON VOLUME prod.raw.new_landing TO `data-engineers`;

Step 6: Unmount the DBFS mount

# Unmount once migration is complete
dbutils.fs.unmount("/mnt/old-landing")

Phased Deprecation of Legacy DBFS

Since 2024, Databricks has been moving toward restricting default access to DBFS Root. In a growing number of new workspaces, DBFS Root writes are disabled by default.

  • DBFS Root write restriction: disabled by default in new workspaces (admins can enable it)
  • Mounts are being deprecated: migration to External Volume or External Location is recommended
  • Future removal of dbutils.fs.mount(): no exact retirement date is set, but planning the migration is recommended

What the Exam Asks About

  • The difference between DBFS and Volumes path formats
  • Why Volumes is recommended over DBFS (governance, auditing, cross-workspace access)
  • That External Volume can replace a DBFS mount
  • That UC permissions do not apply to DBFS Root
  • The dbutils.fs.cp procedure for copying files during migration

Sample Question

Data Engineer Associate

問題 1

The security team wants access to CSV files mounted from an S3 bucket to be controlled by Unity Catalog permissions. They are currently mounted at dbfs:/mnt/s3-data/. Which is the most appropriate action?

  1. Create an External Volume pointing at the S3 bucket path and control access with READ VOLUME / WRITE VOLUME permissions
  2. Change DBFS mount permissions with dbutils.fs.setPermission()
  3. Use the S3 bucket's IAM policies to control access per user
  4. Create a subdirectory under DBFS Root and control it with workspace ACLs

正解: A

Volumes are required to control file access with Unity Catalog permissions. An External Volume can reference the S3 path with no data copy and be controlled by READ/WRITE VOLUME permissions. DBFS has no dbutils.fs.setPermission() method. IAM policies fall outside UC management. UC permissions do not apply to DBFS Root either.

Frequently Asked Questions

Should I retire DBFS mounts immediately?

You don't need to retire them immediately, but new development should use Volumes. Migrating existing pipelines from DBFS mounts to Volumes incrementally is the realistic approach. Databricks is gradually restricting DBFS usage — for example, DBFS Root writes are disabled by default in new workspaces — so it's a good idea to have a migration plan in place.

What's the easiest way to migrate files from DBFS to Volumes?

The easiest path is to copy from the DBFS path to the Volumes path using dbutils.fs.cp(). For large file sets, use a Spark batch copy or a cloud-provider tool such as the AWS CLI or azcopy. If you reference an existing S3/ADLS path directly via an External Volume, no file copy is required at all.

How does the exam test DBFS vs Volumes?

It appears on both Data Engineer Associate and Professional. The main patterns are: which is appropriate for storing governed non-table files (answer: Volumes), what are the drawbacks of DBFS mounts (answer: no UC permissions, no cross-workspace access), and the difference between /Volumes/ and /dbfs/ path formats.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Databricks

Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)

Complete guide to all 7 Databricks certifications — Data Eng...

Databricks

Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)

Every Databricks certification ranked by difficulty, with st...

Databricks

Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)

How to pass Databricks certifications efficiently. Official ...

Databricks

Databricks Data Engineer Associate: Complete Guide (2026)

Domain-by-domain breakdown of the Databricks Certified Data ...

Databricks

Databricks Data Engineer Professional: Complete Guide (2026)

Tactics for the Databricks Certified Data Engineer Professio...

Browse all Databricks articles (110)
© 2026 NicheeLab All rights reserved.