I have a question that has arisen from reading one of Duncan's posts: On 06/01/2014 01:56 AM, Duncan wrote:
> Here's the deal. Due to scaling issues the original snapshot aware > defrag code was recently disabled, so defrag now doesn't worry about > snapshots, only defragging whatever is currently mounted. If you have a > lot of fragmentation and are using snapshots, the defrag will copy all > those fragmented files in ordered to defrag them, thus duplicating their > blocks and doubling their required space. Based on the title alone, > that's what I /thought/ happened, and given what you did /not/ say, I > actually still think it is the case and the below assumes that, tho I'm > no longer entirely sure. The above implies to me that snapshots should not normally be mounted? I may have misread the intent. * * * My thought is that I have a btrfs to hold data on my system, it contains /home in a subvolume and also subvolumes for various other things. I take daily, hourly and weekly snapshots and my script does delete old ones after a while. I also mount the base/default btrfs file system on /mnt/data-pool. This means that my snapshots are available in their own subdirectory, so I presume this means that they are mounted, if not in their own right, at least they are as part of the default subvolume. Given the defragmentation discussion above should I be doing this or should my setup ensure that they are not normally mounted? I'm not aware of how you would create a subvolume that was outside of a mounted part of the file system 'tree' - so if I did not want my subvolumes mounted and I wanted snapshots then I'd have to mount the default subvolume, make snapshots, and then unmount it? This seems a bit clumsy and I'm not convinced that this is a sensible plan. I don't think this is right, can anyone confirm or deny? I do note I get pauses every so often for a second or two or three while I believe btrfs is doing 'stuff'. Although annoying I do find I am prepared to live with this as the subvolumes and snap-shotting are valuable to me. Pete -- Peter Chant -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html