Duczer East
Healthcare

In-perimeter AI on governed clinical and operational data.

Financial Services

Private AI and data platforms built to clear model-risk and audit review.

Financial services

Private AI, KYC/AML, API gateways and data governance for banks.

Insurance

Change data capture, governed agents and integration for insurers.

Healthcare

PHI document intelligence, FHIR APIs and in-perimeter AI for health systems and plans.

GuideCloudera / Data Services & AI6 min read

HDFS to Ozone migration steps: pre-checks, bucket layouts, data copy and cut-over

Copy in waves, test each dataset, cut over last

Authored byCo-Founder and Managing Partner, Duczer East
Part of the Insights topic: Private AI & Data Architecture
On this page
  1. The process in seven steps
  2. Pre-checks
  3. Bucket layouts
  4. Data copy
  5. Validation checks
  6. Cut-over
  7. What goes wrong
  8. A first engagement

Migrate from HDFS to Ozone in waves. Choose the bucket layout, copy each dataset with distcp, validate it, move readers and writers, and keep the HDFS copy until checks pass. Cloudera documents the copy command, the checksum options that depend on your source version, and the options Ozone does not support.

The process in seven steps

Cloudera's migration guide lays out the same shape. Use it as the spine of your plan:

  1. Verify the prerequisites: create the destination Ozone cluster and confirm it can pull data from your HDFS source.
  2. Prepare Ozone for ingestion: volumes, buckets, layout and quotas.
  3. Create Ranger policies. If you use an encrypted bucket, add policies for the key admin user so reads from it work.
  4. Migrate the data with distcp.
  5. Validate the data on the source and the destination.
  6. Clean up the HDFS source once validation passes.
  7. Optionally configure Hive or Spark to use the migrated data.

Pre-checks

  • Profile HDFS: file counts, size distribution and which datasets strain the name service.
  • Confirm your Cloudera Runtime release supports the Ozone features you need.
  • List the applications that read or write each dataset, and any that use appends or concatenation.
  • Check Ranger policies for Ozone and plan the same rules on the new buckets.
  • Size Ozone for the data you will move plus growth.
  • Check that the user running distcp can run MapReduce jobs on YARN. Cloudera notes you may need to adjust the YARN settings that block system users and low user IDs from running jobs.

Bucket layouts

LayoutWhat it isUse for
File system optimized (FSO)Hierarchical, HDFS-like, with S3 accessHive, Spark and Impala data with directories and renames
Object store (OBS)Flat key-value, like Amazon S3S3-style applications that do not rename directories
LegacyExisting buckets kept through upgradesKeep as is, do not create new
bash
# Create a volume and an FSO bucket
ozone sh volume create /data
ozone sh bucket create --layout FILE_SYSTEM_OPTIMIZED /data/warehouse

The default layout varies by release and can be set in ozone-site.xml, so set it on purpose. Cloudera's copy guide says FSO became the default from OZONE-Parcel 718.2.0. It also explains why FSO matters for jobs that write to a temp directory and rename it: FSO renames are atomic, while on an OBS bucket a directory rename is many client calls and costs far more.

Data copy

Use distcp from the HDFS path to an ofs path, and run it from the destination cluster. Which checksum options you need depends on where the source came from. Cloudera documents:

OptionWhen it applies
-directRequired when the target is an object store (OBS) bucket
-Ddfs.checksum.combine.mode=COMPOSITE_CRC with -Dozone.client.checksum.type=CRC32CLets distcp compare checksums between the two file systems. Cloudera lists it for CDH 6, HDP 3 and Cloudera-to-Ozone copies
-skipcrccheckSkips the checksum comparison. Cloudera lists it for CDH 5 and HDP 2 sources
-Dozone.om.kerberos.principal.pattern=*Required when Kerberos is on for the Ozone cluster
bash
hadoop distcp \
  -Ddfs.checksum.combine.mode=COMPOSITE_CRC \
  -Dozone.client.checksum.type=CRC32C \
  -Dozone.om.kerberos.principal.pattern=* \
  hdfs://<nameservice>/data/warehouse/orders \
  ofs://<ozone.service.id>/data/warehouse/orders

Add -direct if the target is an OBS bucket, and use -skipcrccheck instead of the checksum options if your source is one of the older versions above. Ozone does not support file appends or concatenation, so the append, -diff, -rdiff and -blocksperchunk options do not apply. For very large file counts, Cloudera suggests building a copy listing file with hdfs dfs -ls and submitting it to distcp.

Run the copy on one dataset first and check file counts and sizes against the source.

Validation checks

CheckHowPass when
File countCount files on the HDFS path and the Ozone pathCounts match
SizeCompare total bytesTotals match
ContentChecksum comparison where the options allow it, or a row count and sample hash in the query engineResults match
PermissionsQuery as a user from each role against the new bucketSame access as before
JobsRun the dataset's key jobs against the Ozone pathSame output, similar runtime

Cut-over

  1. Copy the dataset and compare file counts and sizes.
  2. Run the dataset's key queries or jobs against the Ozone path and compare results.
  3. Move readers first, then writers, one application at a time.
  4. For tables in the Hive Metastore, repoint the location in a controlled change, and test the table before and after.
  5. Keep the HDFS copy until a full cycle of jobs has passed.
  6. Remove the HDFS copy only after sign-off.

Data keeps changing during a long copy. Plan a final delta copy at cut-over, and pause writers while it runs.

What goes wrong

ProblemLikely causeFix
Copy fails on checksumSource version needs a different checksum optionPick the option set from the table above
Slow jobs after the moveJob writes to a temp directory and renames it on an OBS bucketUse an FSO bucket
Permission deniedRanger policies not copied to the new bucketsRecreate policies before the copy
Copy cannot startThe user cannot run MapReduce jobs on YARNAdjust the user settings Cloudera names

For why you would move, see Ozone vs HDFS. The worked example is a small-files workload on Ozone, and the service page is Apache Ozone on Cloudera. Iceberg tables on the new storage still need regular maintenance, and HBase data has its own path, covered in Apache HBase on Cloudera.

A first engagement

Duczer East offers a migration plan: we profile your datasets, choose layouts, test the copy command for your source version on one dataset and hand back a wave plan with validation checks and a rollback.

Frequently asked questions

How do we copy data from HDFS to Ozone?

Use distcp from the HDFS path to an ofs path. Cloudera tells you to skip the checksum comparison for HDFS to Ozone copies, and to use the direct option for object store buckets.

Which distcp options do not work with Ozone?

Options that need appends, snapshots or concatenation, such as append, diff, rdiff and blocksperchunk, are not supported.

Does renaming work on Ozone?

Atomic renames work with file system optimized buckets. Renaming a top-level directory is costly on object store buckets.

How do we roll back?

Keep the HDFS copy until applications have run on Ozone and checks pass. Cut over readers and writers by dataset.

Which distcp checksum option do we need?

It depends on the source. Cloudera lists COMPOSITE_CRC with CRC32C for CDH 6, HDP 3 and Cloudera sources, and -skipcrccheck for CDH 5 and HDP 2 sources.

When is -direct required?

When the target is an object store (OBS) bucket.

Where do we run distcp?

Cloudera says to run it from the destination cluster, with a user who can run MapReduce jobs on YARN.

Authored by

Co-Founder and Managing Partner, Duczer East

David deBoisblanc is co-founder of Duczer East and a digital transformation and innovation leader in data-centric AI, agentic systems, and enterprise integration. He shapes intent-driven AI solutions that modernize how organizations use data, drawing on deep experience with Cloudera and complex enterprise integration landscapes.

Newsletter

The Practitioner's Briefing

Senior-level insights on agentic AI, data engineering and enterprise integration, delivered to your inbox.

One email when there is something worth reading. Unsubscribe any time.

Let's Talk

Want to discuss the ideas raised here?

Tell us what you are working on. A senior practitioner replies, and only your email is required.

Get a quote