List all mount points on a cluster with configuration info

Display all cluster mount points and the associated configuration information in a notebook.

Written by simran.arora

Last published at: March 17th, 2023

What are mount points?

The mount point is a directory that is linked to an external storage blob. Once mounted, the external storage is browsable as part of the local file system. Any user of a cluster that has the required permissions can access the external storage via the mount point.

List all mount points on a cluster

When you are troubleshooting an issue, you may need to know who performed a specific operation and what configuration was used to mount a storage blob. 

You can review the cluster audit logs (AWS | Azure | GCP) to identify the owner of the mount operation by looking for the dbfs/mount audit event. The audit logs also contain some basic mount configuration information. However, to obtain detailed mount configuration information, you must call the information in a notebook.

Example code

This sample code returns the storage sourceString (the external storage source), the mountPointString (the local directory containing the mount point), and configurations (configuration data required to access the external storage source).


import scala.concurrent.duration._
import com.databricks.common.util._
val dbfs = dbutils.fs.dbfs.asInstanceOf[]
display(dbfs.client.sendIdempotent(GetMountsV2(), 1.minutes, Some(5.minutes)).toSeq.toDF)

  1. Copy and paste the sample code into a notebook cell.
  2. Run the sample code.
  3. The notebook displays mount point information for the current cluster.
Was this article helpful?