Ntfs2btrfs is a command-line tool designed for in-place conversion of Microsoft's NTFS filesystem to Btrfs. This utility allows users to seamlessly transition their storage volumes from NTFS to the open-source Btrfs filesystem while preserving data integrity.
Key Features:
In-place conversion without the need for intermediate backups.
Creation of reflink copies for safekeeping of original NTFS data.
Support for rollback, enabling users to revert to the original NTFS filesystem if needed.
Preservation of security descriptors, symlinks, and other critical file system metadata.
Compatibility with various NTFS features, including alternate data streams and sparse files.
Audience & Benefit:
Ideal for system administrators and tech-savvy users who wish to adopt Btrfs while maintaining compatibility with existing NTFS-based systems. Ntfs2btrfs provides a flexible and reliable solution for transitioning storage volumes to Btrfs, enabling advanced filesystem functionalities such as snapshots, checksums, and compression.
The tool can be installed via winget on Windows. For Linux, it is available through various package repositories or can be compiled from source.
README
Ntfs2btrfs
Ntfs2btrfs is a tool which does in-place conversion of Microsoft's NTFS
filesystem to the open-source filesystem Btrfs, much as btrfs-convert
does for ext2. The original image is saved as a reflink copy at
image/ntfs.img, and if you want to keep the conversion you can delete
this to free up space.
Although I believe this tool to be stable, please note that I take no
responsibility if something goes awry!
You're probably also interested in WinBtrfs,
which is a Btrfs filesystem driver for Windows.
Fixed inline extent items being written out of order (not diagnosed by btrfs check)
Fixed metadata items being written with wrong level value (not diagnosed by btrfs check)
ADSes with overly-long names now get skipped
20220812
Added --no-datasum option, to skip calculating checksums
LXSS / WSL metadata is now preserved
Fixed lowercase drive letters not being recognized
Fixed crash due to iterator invalidation (thanks to nyanpasu64)
Fixed corruption when NTFS places file in last megabyte of disk
20210923
Added (Btrfs) compression support (zlib, lzo, and zstd)
Added support for other hash algorithms: xxhash, sha256, and blake2
Added support for rolling back to NTFS
Added support for NT4-style security descriptors
Increased conversion speed for volume with many inodes
Fixed bug when fragmented file was in superblock location
Fixed buffer overflow when reading security descriptors
Fixed bug where filesystems would be corrupted in a way that btrfs check doesn't pick up
20210523
Improved handling of large compressed files
20210402 (source code only release)
Fixes for compilation on non-amd64 architectures
20210105
Added support for NTFS compression
Added support for "WOF compressed data"
Fixed problems caused by sparse files
Miscellaneous bug fixes
20201108
Improved error handling
Added better message if NTFS is corrupted or unclean
Better handling of relocations
20200330
Initial release
Compilation
On Windows, open the source directory in a recent version of MSVC, right-click
on CMakeLists.txt, and click Compile.
On Linux:
mkdir build
cd build
cmake ..
make
You'll also need libfmt installed - it should be
in your package manager.
Compression support requires zlib, lzo, and/or zstd - again, they will be in your
package manager. See also the cmake options WITH_ZLIB, WITH_LZO, and WITH_ZSTD,
if you want to disable this.
What works
Files
Directories
Symlinks
Other reparse points
Security descriptors
Alternate data streams
DOS attributes (hidden, system, etc.)
Rollback to original NTFS image
Preservation of LXSS metadata
What doesn't work
Windows' old extended attributes (you're not using these)
Large (i.e >16KB) ADSes (you're not using these either)