Tag Info

Hot answers tagged

26

One obvious answer is etckeeper by Joey Hess of Debian, which manages files under /etc using version control. It supports subversion, git and mercurial.


16

The btrfs manpage fails to document the property subcommand, which I found by grep'ing the source. It's also in btrfs --help. To set a snapshot to read-write, you do something like this: btrfs property set -ts /path/to/snapshot ro false Change that to true to set it to read-only. You can also use list to see the available properties: btrfs property ...


14

From wiki: Extent based file storage 2^64 byte == 16 EiB maximum file size Space-efficient packing of small files Space-efficient indexed directories Dynamic inode allocation Writable snapshots, read-only snapshots Subvolumes (separate internal filesystem roots) Checksums on data and metadata Compression (gzip and LZO) Integrated multiple device support ...


13

Don't know why it's not the default, maybe so that it behaves the same as other copying utilities (rsync, cpio, pax, tar...) which have no support for it (or when files are copied across an interface that doesn't allow that (like NFS, samba, fuse file systems layers...). I was in the same situation a few years ago, and looking at GNU cp code quickly, it's ...


12

I wrote bedup for this purpose. It combines incremental btree scanning with CoW-deduplication. Best used with Linux 3.6, where you can run: sudo bedup dedup


11

For the benefits: I believe it will be mainly the backup and mirroring features. But why would you be so hasty as to think of btrfs as a filesystem ready to replace any of your current ones? Both the wiki you refer to : (...) it is currently possible to corrupt a filesystem irrecoverably if your machine crashes or loses power on disks that don't handle ...


11

The roadmap for btrfs in Ubuntu is to have it as the default filesystem by 12.04 LTS. The likely cutover to default will be 11.04, other distributions may have more or less aggressive plans, but watching them is your best cue to the perceived stability and reliability and performance of the code.


9

The "common wisdom" of filesystem developers is that it takes some 5 years of beating to consider a filesystem stable enough for non-experimental use. BTRFS hasn't accumulated 5 years yet, so it is considered strictly for experimental use right now. If the data on the machine aren't critical, and a rigurous backup scheme is in place, go wild. Be prepared to ...


9

I can't comment, sorry if this is not good as answer. You should check your drives. I think 12 days of rsync time for 10Tb is too long, should be more like 12-24 hours. Look at the different drives with smartctl to check if one has many errors: for i in a b c d e f g h i j k l; do echo $i ; smartctl -x /dev/sd$i | grep occurred | head -1 ; done I have ...


8

I found out the answer by asking on the mailing-list. btrfs doesn't do RAID per-volume, but rather on a per-chunk basis. The filesystem reserves "raw" space in (p.e.) 1GB chunks. Initializing the fs with raid1 means that everytime it tries to allocate a chunk, it tries to allocate a copy of this chunk on another device. This architecture allows mixed-size ...


7

The btrfs-tools package adds an action to the initramfs to load the btrfs module. If you purge that package (sudo apt-get purge btrfs-tools), followed by an update-initramfs -ukall if the uninstallation doesn't do it already, that should go away (though I've not tested it). If it doesn't, you can always blacklist the brtfs module in /etc/modprobe.d.


7

It's not the default since for robustness reasons one may want a copy to take place to protect against data corruption. Also for performance reasons you may want the writes to happen at copy time rather than some latency sensitive process working on a CoW file and being delayed by the writes possibly to a different part of a mechanical disk. Note that from ...


7

Well this was a learning experience for me but I eventually figured it out. I'll explain my process here so that it's easier to know how to figure this stuff out on your own (BTRFS documentation, as I'm sure you found out, is relatively incomplete for the time being). At first I thought that creating the subvolume was an ioctl with a handler that didn't do ...


7

btrfs balance status /mountpoint man 8 btrfs [filesystem] balance status [-v] <path> Show status of running or paused balance. Options -v be verbose


7

Two comments. First, try to mount by Label or UUID instead of device. Device names can sometimes change. Otherwise, btrfs requires brtfs device scan call before it knows about btrfs filesystems on your machine. I expected arch to handle this but somehow it didn't work until I created a service file for this and put it in ...


7

As someone who is using a btrfs filesystem with Arch Linux for almost 2 years now I can safely say that there does not seem to be a practical limit on the number of snapshots that can be easily reached. There are some caveats though. btrfs filesystem can lead to fragmentation. It is therefore advisable to use the online defragmentation feature built into ...


7

From the btrfs gotchas page: Files with a lot of random writes can become heavily fragmented (10000+ extents) causing trashing on HDDs and excessive multi-second spikes of CPU load on systems with an SSD or large amount a RAM. On servers and workstations this affects databases and virtual machine images. The nodatacow mount option may be ...


6

Secure deletion is a tough proposition on any filesystem. Unless the filesystem is very peculiar and guarantees that there aren't other copies of the file lying around, you need to clear all the free space on the device. While you are more likely to find many bits of the file on copy-on-write filesystems, even more “static” filesystems don't have this ...


6

Firstly, we'll create the layout we want in the default subvolume: btrfs subvolume snapshot / /rootfs mkdir /snapshots Note that /rootfs will be our new root filesystem, so don't make any changes to the current one after this step. Edit /rootfs/etc/fstab to make the system use the new rootfs subvolume as root filesystem. For that, you'll need to modify ...


6

Well, that was embarrassing. BTRFS needs to be mounted to be able to resize the partition. How do I resize a partition? (shrink/grow) In order to demonstrate and test the back references, Btrfs devel team has added an online resizer, which can both grow and shrink the filesystem via the btrfs commands. First, ensure that your filesystem is ...


5

I can't give you a final recommendation, but I can share a few thoughts on the subject. Given that /etc is usually rather small, you might just go for a simple compressed tar-ball solution. If you hardly need to go through the history, it might be the easiest solution to set up. For me it would be to tedious to manage logical volumes just to do keep track ...


5

Unless you specified otherwise when you formatted, the default is to store duplicate copies of the metadata blocks for improved reliability. You probably have 2gb worth of metadata that is stored twice, using 4gb. You can see more details with btrfs filesystem df. In particular, 1.75GB is allocated for metadata, so it consumes twice that or 3.5GB of ...


5

No, and while fuse-ZFS is the bee's knees (having tried it) I wouldn't use it either. It's not a stability issue - both are fairly stable - but one of code maturity.


5

I did a small benchmark. It only tests writes though. Test data is a Linux kernel source tree (linux-3.8), already unpacked into memory (/dev/shm/ tmpfs), so there should be as little influence as possible from the data source. I used compressible data for this test since compression with non-compressible files is nonsense regardless of encryption. Using ...


5

You can use the bedup utility to de-duplicate the identical files. Once you've installed it, usage is fairly simple: # bedup dedup /path/to/btrfs You may need to set your snapshots writable (btrfs property set -ts /path/to/snapshot ro false) so it can de-duplicate them. You can change them back afterwards. Note that depending on how many files you have, ...


4

# take a read-only snapshot: btrfs sub snap -r fs snapshot ... do things on fs # rolling back: btrfs sub del fs # at which point you'll lose those things you've done # if you want to preserve them, just rename fs instead btrfs sub snap snapshot fs # reinstate snapshot as a read+write fs btrfs sub del snapshot # delete the non-longer ...


4

openSUSE 12.1, if installed on btrfs, automatically enables tool called snapper which uses btrfs snapshotting to get snapshots of the system before installing new packages. It is well possible that these snapshots are consuming your disk space. Check out your snapshots with snapper list command. Check out this blogpost for more information about ...


4

My first guess was btrfs since the I/O processes of this file system sometimes take over. But it wouldn't explain why X locks up. Looking at the interrupts, I see this: # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 0: 179 0 0 0 0 ...


4

I also advise you to use other tools for benchmarking I/O than dd. Brtfs is not a traditional filesystem and being a copy-on-write and transactional filesystem, most of the operations are done in memory and not directly on the hdds. So when you issue the deletes and recreate the file, I believe it will just reuse what is has in memory. Let's not forget that ...


4

I asked a similar question 2 years ago. However in my case, I was only planning to copy a single device onto raid0. I eventually found a solution. At the time you couldn't convert from raid0 to raid10, but it looks like that since kernel 3.3, you can now. So that solution may work for you in the end. A problem with that approach is that it copies the ...



Only top voted, non community-wiki answers of a minimum length are eligible