NTFS2BTRFS(8)

๐Ÿ“ฆ
this version ยท 4 versions
, in debian trixie, fedora 43, opensuse-leap 16.0, ubuntu noble, ubuntu questing

๐Ÿ’– NTFS2BTRFS ๐Ÿ’–

okay bestie, sit down, hydrate, because today we are doing a whole filesystem glow-up. the manual name is ntfs2btrfs, and it lives in section 8 of the system administration manual, which is basically the cool older-sibling section. it is iconic, it is powerful, and it does exactly one (1) extremely brave thing. let's get into it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

ntfs2btrfs โ€” convert ntfs filesystem to btrfs filesystem ๐Ÿ’ซ


๐Ÿ“œ SYNOPSIS ๐Ÿ“œ

ntfs2btrfs [options] device

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so this tool does an in-place conversion of Microsoft's NTFS filesystem into the open-source filesystem Btrfs. same energy as what btrfs-convert does for ext2, just, y'know, for NTFS instead. no big deal. (it's a big deal.) ๐Ÿ’…


โœจ OPTIONS โœจ

  • -c <ALGO>, --compress=<ALGO> โ€” uses the algorithm you name to recompress the files that are compressed on the NTFS volume. valid choices are zstd, lzo, zlib, or none. if you don't hand it any value at all, zstd gets used, assuming it's been compiled in. heads up though: this gets ignored if you also pick --no-datasum (see below, bestie, read it).
  • -h <ALGO>, --hash=<ALGO> โ€” picks the checksumming algorithm for you. valid choices are crc32c, xxhash, sha256, and blake2. the first one of those is what you get by default, and ngl it should be fine for most purposes. ๐ŸŽ€
  • -r, --rollback โ€” tries to restore the original NTFS filesystem. see the ROLLBACK section below, it's important. ๐Ÿ™ˆ
  • -d, --no-datasum โ€” skips calculating checksums for existing data. > don't choose this unless you're sure it's what you want. like, sure sure. ๐Ÿ˜ญ

๐ŸŒ€ ROLLBACK ๐ŸŒ€

the original filesystem image gets saved as image/ntfs.img, as a reflink copy. so you can restore it at literally any time by using the rollback option โ€” provided you haven't moved the data around by doing a balance. โœจ

bear in mind that this restores the volume to how it was when you did the conversion, which means any changes you've made since will be lost. gone. poof. ๐Ÿ˜ญ

if you decide to keep the conversion (slay, commitment), you can remove the image subvolume at any point to free up space. ๐Ÿงš


๐Ÿ”ฎ XATTRS ๐Ÿ”ฎ

various bits of NTFS-specific data are stored as Btrfs xattrs, in a manner that the Windows btrfs driver understands (https://github.com/maharmstone/btrfs). some should also be understood by tools such as Wine and Samba, but YMMV. ๐Ÿคท

  • the NTFS attribute value is stored as a hex string at user.DOSATTRIB.
  • the reparse points on directories are stored at user.reparse. NTFS symlinks should be converted into POSIX symlinks. the data for other reparse points will be stored as the contents of the files.
  • the NT security descriptor is stored as security.NTACL.
  • alternate data streams on files are stored in the user namespace, e.g. :Zone.Identifier becomes user.Zone.Identifier.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

btrfs(8), mkfs.btrfs(8).


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

written by Mark Harmstone (mark@harmstone.com). thank you king ๐Ÿซถ


๐ŸŒˆ WEB ๐ŸŒˆ

https://github.com/maharmstone/ntfs2btrfs


okay and that's the whole page, bestie!! this was ntfs2btrfs version 20240115, dated January 2024 โ€” and it's an NTFS2BTRFS(8) situation, if you needed the receipts. go forth and convert responsibly, mwah ๐Ÿ’…๐Ÿ’–