16 ms·
ntfs2btrfs: In-place conversion of NTFS filesystem to Btrfs
- aborsy 5y agoAny experience on how BTRFS works on laptops, without ECC and maybe even one drive (copies =2)?
- 8bitbuddhist 5y agoPersonal anecdote: I've been using BTRFS on my laptop running Manjaro for the past year with no issues. Originally I had it running in an encrypted LUKS partition on a single Samsung NVMe, but for the past month I've been running two NVMe drives in RAID 0 with a LUKS volume on top of that and BTRFS inside of that. In both cases I've had no performance issues, no reliability issues or data loss (even when having to force shutdown the laptop due to unrelated freezes), and have been able to save and restore from snapshots with zero issues.
- gigatexal 5y agobutter-fs[1] would not be the destination FS I would have chosen but such an effort deserves kudos. [1] ...given how broken it seemingly is, see features that are half baked like raid-5. But I am a ZFS snob so don't mind me, my fs of choice has it's own issues.
- stryan 5y agoBTRFS has been stable for years now as long as you don't use unsupported features like the aforementioned RAID5. A properly set up btrfs system is fine for production use, though note the "properly set up" bit, as a good number of distros still don't set it up right. I suspect the latter bit is why people continue to have issues with it (which is definitely a big downside compared to something like ZFS's "no admin intervention required" policy). Regardless, in-place conversion is specifically a feature of btrfs due to how its designed. Since it doesn't require a lot of fixed metadata, you can convert a fs in-place by throwing the btrfs metadata into unallocated space and just point to the same blocks as the original fs. I think it even copies the original fs's metadata too, so you can mount the filesystem as either the original or btrfs for a while.
- LukeShu 5y agoWhat are distros doing to set it up wrong? (I've been a happy user of btrfs for several years now https://news.ycombinator.com/item?id=21446761 https://news.ycombinator.com/item?id=21446761)
- stryan 5y agoTo be clear, I'm not saying distros are setting it up "wrong" just not..correctly? As in, if I setup a filesystem I would assume most distros would set it up with best practices in mind. What I'm trying to convey is most of the time when I help someone out with btrfs issues it always turns out they haven't been running regular scrubs or balances and their distro didn't setup anything so they didn't know. Or they don't understand how much diskspace they have because their distro's docs still have them running du instead of "btrfs filesystem usage". For specific distros, arch/arch-derivatives had autodefrag as a default mount option which caused some thrashing a while back and IIRC Debian still doesn't support subvolumes properly, as well as not installing btrfs-maintenance.
- ghostly_s 5y agoI've just lost about a week of my life fighting with a bog-simple device replace on a RAID1 btrfs filesystem. I had the misfortune of receiving a replacement disk which was also bad, and somehow the process of attempting to rebuild the array hosed the filesystem on the good disk. Asked for help on the irc channel and the only advice I got was "upgrade to the latest btrfs-tools" (because apparently the "stable" version shipped with debian stable isn't really stable when a problem arises?). I also was misled by btrfs-check which happily scanned my un-mountable filesystem with no complaints, and learned on the irc that btrfs-check is "an odd duck," in that it doesn't actually check all the things the documentation says it does. This experience, and the fact that simple things like the "can only mount a degraded filesystem rw one time" bug remain after years of complaints, simply because the devs adopt an arrogant "you're doing it wrong if you don't fix your filesystem the first time you mount it" (despite the tools giving you no indication that's required) attitude, have convinced me to never touch btrfs again. So keep parroting "it's stable!" all you want, my experience has shown btrfs is "stable" until you have a problem.
- unmole 5y ago> butter-fs You thought that'd be a swipe but that's how the developers pronounce it
- IgorPartola 5y agoIsn’t there another FS called butter-fs that is separate from BTRFS?
- loeg 5y agoOne of the other pronunciations of btrfs is “Better-FS,” and there is another one of those — BeTRFS (B-epsilon tree FS).
- basilgohar 5y agoI used to be in the "why BTRFS" camp and religiously would only install ext4 without LVM on Fedora for my laptops, desktops, and servers. When I saw so many subsequent releases persist in offering BTRFS by default, I decided to try it for a recent laptop install, because honestly, the appeal of deduplication, checksumming, snapshotting, and so many other features that modern FSes generally come with (e.g., ZFS), I just decided to jump the gun and went ahead and installed it. I can safely say it has not presented any problem with me thus far, and I am at the stage of my life where I realize that I don't have the time to fiddle as much with settings. If the distributions are willing to take that maintenance on their shoulders, I'm willing to trust them and deal with the consequences – at least I know I'm not alone.
- regularfry 5y agoIt certainly used to be the case that BTRFS had some nasty behaviour patterns when it started to run low on space. It could well be that it has not presented any problem for you yet. On the other hand, those days might be behind it. I haven't kept track.
- cmurf 5y agoThere are still edge cases but I can count on one hand the number of users who have run into it since Fedora switched to Btrfs by default (on desktops) two years ago (and Cloud edition in the most recent Fedora release late last year). The upstream maintainer of btrfs-progs also maintains btrfs maintenance https://github.com/kdave/btrfsmaintenance https://github.com/kdave/btrfsmaintenance which is a set of scripts for doing various tasks, one of which is a periodic filtered balance focusing on data block groups. I don't run it myself, because well (a) I haven't run into such a bug in years myself (b) I want to run into such a bug so I can report it and get it fixed. The maintenance script basically papers over any remaining issues, for those folks who are more interested in avoiding issues than bug reporting (a completely reasonable position). There's been a metric ton of work on ENOSPC bugs over the years, but a large pile were set free with the ticketed ENOSPC system quite a few years ago now (circa 2015? 2016?)
- pkulak 5y ago
- Flocular 5y agoIn-place conversion of NTFS? You either still believe in a god or need to google the price of harddrives these days. Honest question tho, why would anybody do in-place conversion of partitions?
- marcodiego 5y agoTo save time.
- R0b0t1 5y agoWill this actually save time? Not all in-place algos avoid copies.
- Jach 5y agoMaybe if your NTFS drive is less than half full, at least I assume this is a limitation of this project since it mentions keeping an original copy... Still, belief in god seems about right, or you have good backups. I had about 2.5 TB on a 3 TB NTFS drive I decided to move over to ZFS, just rsynced to a few various drives since I didn't have that much contiguous space elsewhere (building a NAS later...), learned I had a file whose name is too long for either ZFS or ext4 and had to rename it, and after making a zpool out of the drive I just rsynced everything back. Doing it in place would have saved hours.. but only hours, on something not high urgency that doesn't require babysitting.
- marwis 5y agoThe backup is a reflink copy as per readme - that means data blocks are shared with live filesystem and don't occupy extra space but there's probably quite a bit of metadata.
- drbawb 5y ago>You either still believe in a god or need to google the price of harddrives these days. That was pretty funny, and I agree a thousand times over. When I was younger (read: had shallower pockets) I was willing to spend time on these hacks to avoid the need for intermediate storage. Now that I'm wiser, crankier, and surrounded by cheap storage: I would rather just have Bezos send me a pair of drives in <24h to chuck in a sled. They can populate while I'm occupied and/or sleeping. My time spent troubleshooting this crap when it inevitably explodes is just not worth the price of a couple of drives; and if I still manage to cock everything up at least the latter approach leaves me with one or more backup copies. If everything goes according to plan well hey the usable storage on my NAS just went up ;-). I feel bad for the people that will inevitably run this command on the only copy of their data. (Though I would hope the userland tool ships w/ plenty of warnings to the contrary.)
- marcodiego 5y agoWhat I really want: ext4 performance with instant snapshots plus optional transparent compression when it can improve performance. There is only one promise to deliver this AFAIK: bcachefs, but it still isn't mature yet.
- nisa 5y agoZFS on Linux does this pretty well. Performance is close to ext4 for most usecases.
- simcop2387 5y agoYou can actually use a sparse zvol pretty decently for this too. You don't get the file level checksumming or some of the other features but you can still snapshot the volume and get pretty good performance out of it. I've got a few programs that don't get along too well with zfs that I use that way.
- fulvioterzapi 5y agoIn place FS conversion looks like black magic to me! Props to the authors!!
- timbit42 5y agoWindows XP has a tool to convert form FAT32 to NTFS.
- boricj 5y agoFrom the same person that made WinBtrfs and Quibble, a Windows NT Btrfs installable filesystem and bootloader. And yes, with all of that one can boot and run Windows natively on Btrfs, at least in theory.
- tedunangst 5y ago> 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. Now that's really interesting.
- chungy 5y agoThat's in common with the conversion from ext[234] and reiserfs, too. Makes it easy to both undo the conversion and inspect the original image in case the btrfs metadata became wrong somehow.
- drbawb 5y agoAlthough this would be an interesting way to drag some of my old NTFS filesystems kicking & screaming into the 21st century, I'd never do one of these in-place conversions again. I tried to go from ext3 to btrfs several years ago - and it would catastrophically fail after light usage. (W're talking less than a few hours of desktop-class usage. In retrospect I think it was `autodefrag/defragment` that would kill it.) I tried that conversion a few times and it never worked, I think I even tried to go from ext3->ext4->btrfs. This was on an Arch install so (presumably) it was the latest and greatest kernel & userspace available at the time. I eventually gave up (/ got sick of doing restores) and just copied the data into a fresh btrfs volume. That worked "great" up until I realized (a) I had to turn off CoW for a bunch of things I wanted to snapshot, (b) you can't actually defrag in practice because it unlinks shared extents and (c) btrfs on a multi-drive array has a failure mode that will leave your root filesystem readonly; which is just a footgun that shouldn't exist in a production-facing filesystem. - I should add that these were not particularly huge filesytems: the ext3 conversion fiasco was ~64G, and my servers were like ~200G and ~100G respectively. I also was doing "raid1"/"raid10" style setups, and not exercising the supposedly broken raid5/raid6 code in any way. I think I probably lost three or four filesystems which were supposed to be "redundant" before I gave up and switched to ZFS. Between (a) & (b) above btrfs just has very few advantages compared to ZFS. Really the only thing going for it was being available in mainline kernel builds. (Which, frankly, I don't consider that to be an advantage the way the GPL zealots on the LKML seem to think it is.)
- Dylan16807 5y agoI'm pretty dependent on the ability to deduplicate files in place without massive overhead. The built in defrag on BTRFS is unfortunate but I think you can defragment and re-deduplicate. I don't know, I'm just hoping for a filesystem that can get these features right to come along...
- chasil 5y ago> ...btrfs just has very few advantages compared to ZFS. Really the only thing going for it was being available in mainline kernel builds. ZFS doesn't have defrag, and BtrFS does. There was a paper recently on purposefully introducing fragmentation, and the approach could drastically reduce performance on any filesystem that was tested. This can be fixed in BtrFS. I don't see how to recover from this on ZFS, apart from a massive resilver. https://www.usenix.org/system/files/login/articles/login_summer17_02_conway.pdf https://www.usenix.org/system/files/login/articles/login_sum...
- R0b0t1 5y agoHas anyone used the mentioned associated projects to boot Windows off of a BTRFS disk? Main usecase is storage spaces w/o server or workstation.
- karmakaze 5y agoI used btrfs on an EC2 instance with two local SSDs that were mirrored for a CI pipeline running Concourse. It would botch up every few months, and I got to automating setup so that it was easy to recreate. I never did find the actual source of the instance botch-up though. It was either the local PostgreSQL instance running on btrfs, btrfs, or the Concourse software. I pretty much ruled out the PostgreSQL being the originating source of the issue, but didn't get further than that. I don't know if anyone would suspect mdadm. Other than whatever that instability was, I can say that the performance was exceptional and would use that setup again, with more investigation into causes of the instability.
- prirun 5y agoIn a former life I ran a web site with a co-founder. We needed to upgrade our main system (we only had 2), and had mirrored RAID1 hard drives, some backup but not great. We tested the new system, it appeared to work fine, so the plan was to take it to the colo, rsync the old system to the new one, make sure everything ran okay, then bring the old system home. We did the rsync, started the new system, it seemed to be working okay, but then we started seeing some weird errors. After some investigation, it looked like the rsync didn't work right. We were tired, it was getting late, so we decided to put one of the original mirrors in the new system since we knew it worked. Started up the new system with the old mirror, it ran for a while, then started acted weird too. At that point we only had 1 mirror left, were beat, and decided to pack the old and new system up and bring it all back to the office (my co-founder's house!) and figure out what was going on. We couldn't afford to lose the last mirror. After making another mirror in the old system, we started testing the new system. It seemed to work fine with 1 disk in either bay (it had 2). But when we put them in together and started doing I/O from A to B, it corrupted drive A. We weren't even writing to drive A! For the next test, I put both drives on 1 IDE controller instead of each on its own controller. (Motherboards had 2 IDE controllers, each supported 2 drives). That worked fine. It turns out there was a defect on the MB and if both IDE ports were active, it got confused and sent data to the wrong drive. We needed the CPU upgrade so ended up running both drives on 1 IDE port and it worked fine until we replaced it a year later. But we learned a valuable lesson: never ever use your production data when doing any kind of upgrade. Make copies, trash them, but don't use the originals. I think that lesson applies to the idea of doing an inplace conversion from NTFS to Btrfs, even if it says it keeps a backup. Do yourself a favor and copy the whole drive first, then mess around with the copy.
- bedros 5y agoI wish someone would write a BTRFS driver for macOS so we can share drives with linux
- moonchild 5y agoZFS?