<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168241#M55876</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/143415"&gt;@keshavmonga22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a more durable logging mechanism, if &lt;STRONG&gt;FileHandler&lt;/STRONG&gt; is currently the only logging path, I’d implement a secondary/custom logging handler that captures the log records and then persists them to Delta. That gives you a durable/queryable sink without depending on the Volume filesystem during the run.&lt;/P&gt;&lt;P&gt;Example would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import logging
records = []
class DeltaBufferHandler(logging.Handler):
    def emit(self, record):
        records.append({
            "level": record.levelname,
            "message": record.getMessage()
        })

logger = logging.getLogger("app")
logger.setLevel(logging.INFO)

logger.addHandler(DeltaBufferHandler())
logger.info("processing started")&lt;/LI-CODE&gt;&lt;P&gt;Then persist the records using spark.createDataFrame(records) directly into Volume location.&lt;/P&gt;&lt;P&gt;For hanging issue, useful next step is to capture the Python/thread dump while it is blocked and raise that with support but before that try with Volume write alternatives:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;shutil.copyfile() instead of shutil.copy()&lt;/LI&gt;&lt;LI&gt;plain sequential open("/Volumes/..", "wb") and write the completed bytes once&lt;/LI&gt;&lt;LI&gt;%sh cp /local_disk0/tmp/test.log /Volumes/../test.log&lt;/LI&gt;&lt;LI&gt;direct FileHandler(..., mode="w") to a unique file per run, avoiding append&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If all of those shows the same intermittent hang under the real ADF, then capture the thread dump and raise with support, At this stage the bug has earned professional supervision&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Sep 2026 14:48:32 GMT</pubDate>
    <dc:creator>data_pulse</dc:creator>
    <dc:date>2026-09-10T14:48:32Z</dc:date>
    <item>
      <title>shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for log</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168198#M55868</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Setup&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Singleton Python logger (logging.FileHandler) writing .log files during ADF-orchestrated notebook runs (one notebook per file). Files need to land in a UC Volume.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Context on the migration path&lt;/STRONG&gt; — this workflow has been reshaped repeatedly by the move to shared compute:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Originally logged to DBFS on single-user compute — worked fine.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Migrated to shared compute → DBFS access restricted → had to move to Unity Catalog Volumes.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Direct writes to UC Volumes then broke (Attempt 1), forcing the local-staging-plus-copy pattern (Attempt 2), which is now also failing.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Attempt 1 — Direct write to /Volumes/...:&lt;/STRONG&gt; FileHandler writes didn't reliably commit. flush()/close() appeared to do nothing; logging.shutdown() caused OSError: [Errno 95] Operation not supported on subsequent runs. Our assumption: UC Volumes are FUSE-mounted object storage, and the fsync/POSIX semantics FileHandler relies on aren't fully supported. &lt;STRONG&gt;Is this correct, or is there a way to make direct-write work?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Attempt 2 — Write to /local_disk0/tmp, then shutil.copy to the Volume:&lt;/STRONG&gt; Worked for many runs, then began &lt;STRONG&gt;hanging for hours&lt;/STRONG&gt; on the copy. Confirmed by leaving runs going, and by observing that commenting out shutil.copy eliminates the hang (but obviously doesn't commit the log).&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Diagnostics&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Files are ~2-3 KB, fresh cluster sessions, few log lines per run — not a volume/pressure issue.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Driver log4j showed HangingThreadDetector: Potential Hung Thread Detected, with DAG_SCHEDULER_NO_ACTIVE_JOB (Spark idle), and the hung thread's stack trace referenced com.databricks.backend.daemon.driver.ArmeriaOutgoingDirectNotebookMessageBuffer.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Why dbutils.fs.cp isn't an option&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;On shared compute, dbutils.fs cannot access /local_disk0 — dbutils.fs.cp("file:/local_disk0/...", "/Volumes/...") isn't permitted in this access mode. So the natural alternative to shutil.copy is unavailable to us.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; DBR [DBR 17.3], shared compute, ADF-orchestrated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class=""&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Is shutil.copy from /local_disk0 to /Volumes/... a supported pattern on shared compute, or is FUSE not intended for driver-side Python I/O to Volumes at all?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Anyone else seen shutil.copy to a UC Volume hang for hours on shared compute? Root cause?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Has direct FileHandler write to a UC Volume become viable in any recent DBR, or is local-staging-plus-copy still required?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Given shared compute blocks dbutils.fs access to local disk, and direct FileHandler writes to Volumes are unreliable — what is the recommended pattern for driver-side .log file output to a UC Volume on shared compute?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 10 Sep 2026 10:39:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168198#M55868</guid>
      <dc:creator>keshavmonga22</dc:creator>
      <dc:date>2026-09-10T10:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168209#M55870</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/143415"&gt;@keshavmonga22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did&amp;nbsp;a small isolated testing directly in a Databricks notebook on DBR 17.3 shared compute. Found the below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Yes, Driver side python I/O to the UC volume worked normally. Successfully tested this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;shutil.copyfile(
    "/local_disk0/tmp/test.log",
    "/Volumes/&amp;lt;catalog&amp;gt;/&amp;lt;schema&amp;gt;/&amp;lt;volume&amp;gt;/test.log"
)&lt;/LI-CODE&gt;&lt;P&gt;Also shutil.copy() and a manual Python stream copy. All completed in under a second for small test files.&lt;/P&gt;&lt;P&gt;So this doesn't appear to be a case where FUSE is generally unusable for driver side Python I/O to UC Volumes.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I couldn't find any hang in the notebook while testing, probably couldn't able to replicate it in full.&amp;nbsp;The copy path works normally when tested interactively from /local_disk0/tmp to /Volumes/.&lt;/P&gt;&lt;P&gt;The original&amp;nbsp;hang you noticed&amp;nbsp; probably depends on your actual work load conditions such as repeated notebook executions, concurrency from ADF, destination collisions, notebook lifecycle/state or an intermittent DBR/FUSE issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question3 : &lt;/STRONG&gt;Direct File Handler write to a UC Volume appears to be viable with limitations.&lt;/P&gt;&lt;P&gt;Found that this work repeatedly fine, including reuse of the same path.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;logging.FileHandler(path, mode="w")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But&amp;nbsp;reopening an existing Volume file in append mode fails with&amp;nbsp;&lt;STRONG&gt;OSError: [Errno 29] Illegal seek&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_pulse_0-1789042645108.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/30962iBA383BC0802A14DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="data_pulse_0-1789042645108.png" alt="data_pulse_0-1789042645108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Found the same behaviour with &lt;STRONG&gt;logging.FileHandler(path, mode="a")&lt;/STRONG&gt;&amp;nbsp;the handler can be created, but when a record is written/flushed against an existing file, it fails with Illegal seek error.&lt;/P&gt;&lt;P&gt;Interestingly, mode="a" works when the destination path is brand new.&lt;/P&gt;&lt;P&gt;So the issue appears to be specifically append to existing file semantics, not direct FileHandler access to a UC Volume in general.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question4:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Based on the tests, the cleanest pattern for the use case looks like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;one notebook run
    -&amp;gt; one unique log file
    -&amp;gt; FileHandler(..., mode="w")
    -&amp;gt; sequential writes
    -&amp;gt; flush/close&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;eg:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;handler = logging.FileHandler(
    f"/Volumes/&amp;lt;catalog&amp;gt;/&amp;lt;schema&amp;gt;/&amp;lt;volume&amp;gt;/logs/{run_id}.log",
    mode="w",
    encoding="utf-8"
)&lt;/LI-CODE&gt;&lt;P&gt;This avoids reopening an existing file for append.&lt;/P&gt;&lt;P&gt;If local staging is preferred, shutil.copyfile() from local disk to the Volume also works, so that remains a viable fallback.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Related but a separate issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have also seen a related DBR 17+ issue with large file writes using dbutils.fs.put() in our workload. In that case, files above the gRPC message limit failed because dbutils.fs.put() sends the payload through an internal gRPC channel. Have resolved that by writing directly to /Volumes/ using standard filesystem I/O (open() via FUSE), which avoids the gRPC transfer path and supports much larger files&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 12:33:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168209#M55870</guid>
      <dc:creator>data_pulse</dc:creator>
      <dc:date>2026-09-10T12:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168215#M55871</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250262"&gt;@data_pulse&lt;/a&gt;&amp;nbsp;, thanks for replying and trying these scenarios out!&lt;BR /&gt;I want to add that the shutil.copy() was working fine for about 2 months and then recently started hanging.&lt;/P&gt;&lt;P&gt;With regards to committing .log files directly to Unity Catalog, I started facing an issue over there as well, the log files were left in the buffer without being committed to the Catalog volume. This was why I moved to logging to local_disk0 and then moving to UC.&lt;BR /&gt;As you mentioned:&lt;BR /&gt;"&lt;SPAN&gt;The original&amp;nbsp;hang you noticed&amp;nbsp; probably depends on your actual work load conditions such as repeated notebook executions, concurrency from ADF, destination collisions, notebook lifecycle/state or an intermittent DBR/FUSE issue."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the primary scenario for which logging needs to be robust.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 13:02:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168215#M55871</guid>
      <dc:creator>keshavmonga22</dc:creator>
      <dc:date>2026-09-10T13:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168232#M55875</link>
      <description>&lt;P&gt;Building on data_pulse's testing - I think the fix is to stop treating the Volume as a POSIX filesystem during the run, rather than to find the right copy call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why it hangs: FUSE-mounted object storage has no append, no fsync, no partial-write semantics, and logging.FileHandler relies on all three. The hours-long hang with ArmeriaOutgoingDirectNotebookMessageBuffer in the stack is the tell - that write is being routed through the driver's notebook RPC channel, and when the FUSE mount has a transient hiccup there is no timeout on that path, so it blocks indefinitely. data_pulse hit the same channel with dbutils.fs.put on large files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pattern that has held up for us under ADF orchestration + concurrency:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. During the run, log only to /local_disk0 (or just stdout / an in-memory buffer). Never touch the Volume mid-run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. In a finally block at the end of the notebook, write the whole log once: open("/Volumes/.../&amp;lt;notebook&amp;gt;_&amp;lt;run_id&amp;gt;_&amp;lt;ts&amp;gt;.log", "w").write(buffer). Unique filename every run, plain open(), no append, no reopen. Avoid shutil.copy - it also runs copystat and can trip on object-storage FUSE; use shutil.copyfile if you must stage locally. A single write of a few KB is atomic enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Drop the singleton logger. Holding one FileHandler across runs is what produces OSError [Errno 95] on logging.shutdown() - the handle points at a Volume path that is no longer valid. Build the handler per run against the local path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. If you need logs durable even when a run crashes before the finally: send them to a Delta table instead (spark.createDataFrame(records).write.mode("append").saveAsTable(...)). Appendable, concurrency-safe, queryable, and it never touches FUSE. For ADF-orchestrated pipelines this is usually the right sink - one table, filter by run id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Direct open() write to /Volumes at end-of-run, plus a Delta table for anything you need to query, has removed this whole class of problem for us.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 13:58:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168232#M55875</guid>
      <dc:creator>DoTA</dc:creator>
      <dc:date>2026-09-10T13:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168241#M55876</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/143415"&gt;@keshavmonga22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a more durable logging mechanism, if &lt;STRONG&gt;FileHandler&lt;/STRONG&gt; is currently the only logging path, I’d implement a secondary/custom logging handler that captures the log records and then persists them to Delta. That gives you a durable/queryable sink without depending on the Volume filesystem during the run.&lt;/P&gt;&lt;P&gt;Example would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import logging
records = []
class DeltaBufferHandler(logging.Handler):
    def emit(self, record):
        records.append({
            "level": record.levelname,
            "message": record.getMessage()
        })

logger = logging.getLogger("app")
logger.setLevel(logging.INFO)

logger.addHandler(DeltaBufferHandler())
logger.info("processing started")&lt;/LI-CODE&gt;&lt;P&gt;Then persist the records using spark.createDataFrame(records) directly into Volume location.&lt;/P&gt;&lt;P&gt;For hanging issue, useful next step is to capture the Python/thread dump while it is blocked and raise that with support but before that try with Volume write alternatives:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;shutil.copyfile() instead of shutil.copy()&lt;/LI&gt;&lt;LI&gt;plain sequential open("/Volumes/..", "wb") and write the completed bytes once&lt;/LI&gt;&lt;LI&gt;%sh cp /local_disk0/tmp/test.log /Volumes/../test.log&lt;/LI&gt;&lt;LI&gt;direct FileHandler(..., mode="w") to a unique file per run, avoiding append&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If all of those shows the same intermittent hang under the real ADF, then capture the thread dump and raise with support, At this stage the bug has earned professional supervision&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 14:48:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168241#M55876</guid>
      <dc:creator>data_pulse</dc:creator>
      <dc:date>2026-09-10T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168300#M55883</link>
      <description>&lt;P&gt;Hlo&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A class="" href="https://community.databricks.com/t5/user/viewprofilepage/user-id/143415" target="_blank" rel="noopener" aria-label="View Profile of keshavmonga22"&gt;&lt;SPAN class=""&gt;keshavmonga22,&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;Thanks for sharing these tests. One thing I’m taking away from this discussion is that the logging design itself may be more important than choosing between&amp;nbsp;shutil.copy() and FileHandler&lt;/P&gt;&lt;P&gt;For an ADF-orchestrated workflow with multiple notebook runs, would it make sense to treat each run independently — create a unique log file using the run ID, keep the logging local during execution, and persist the completed log only once at the end?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;ADF run → local log → notebook completes → write once to UC Volume&lt;/P&gt;&lt;P&gt;And if the logs need to be searched or monitored regularly, storing the important log information in a Delta table could provide a more reliable/queryable solution.&lt;/P&gt;&lt;P&gt;Has anyone used this pattern in production, especially when multiple notebook runs execute concurrently?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2026 04:45:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168300#M55883</guid>
      <dc:creator>gowri_databrick</dc:creator>
      <dc:date>2026-09-11T04:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168327#M55891</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/143415"&gt;@keshavmonga22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also check by writing logs to&amp;nbsp;/tmp&amp;nbsp;then upload using the SDK's Files API&amp;nbsp;(w.files.upload()&amp;nbsp;or&amp;nbsp;w.files.upload_from()) as it generally bypasses FUSE entirely - uploads happen via REST calls directly to the object storage backend to avoid the FUSE instability. If the size is 2-3KB log files,&amp;nbsp; use w.files.upload(file_path="/Volumes/.../log.log", contents=open(local_path, 'rb'), overwrite=True)&amp;nbsp;after closing the FileHandler. Wrap it in a try/finally block so logs upload even if the notebook fails mid-run. You can consider using &lt;STRONG&gt;Lakebase &lt;/STRONG&gt;for storing logs if feasible.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2026 08:50:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168327#M55891</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-09-11T08:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168338#M55897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/125801"&gt;@DoTA&lt;/a&gt;&amp;nbsp;, I have been using a singleton logger as there are helper classes being used within the notebook which will also need to use the logger.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2026 10:13:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168338#M55897</guid>
      <dc:creator>keshavmonga22</dc:creator>
      <dc:date>2026-09-11T10:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: shutil.copy from /local_disk0 to Unity Catalog Volume hangs for hours — recommended pattern for</title>
      <link>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168339#M55898</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/250070"&gt;@gowri_databrick&lt;/a&gt;&amp;nbsp;, on this:&lt;BR /&gt;&lt;SPAN&gt;"For an ADF-orchestrated workflow with multiple notebook runs, would it make sense to treat each run independently — create a unique log file using the run ID, keep the logging local during execution, and persist the completed log only once at the end?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Yes that is the design that is being used currently. Except I was using shutil.copy (at the end of the notebook run) and that is where the thread was hanging indefinitely.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2026 10:16:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/shutil-copy-from-local-disk0-to-unity-catalog-volume-hangs-for/m-p/168339#M55898</guid>
      <dc:creator>keshavmonga22</dc:creator>
      <dc:date>2026-09-11T10:16:13Z</dc:date>
    </item>
  </channel>
</rss>

