Re: btrfs subvolume as an iSCSI target?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 12, 2014, at 5:23 PM, Dan Mossor <dan.mossor@xxxxxxxxxxx> wrote:
> 
> The issue I believe that is going to stop me is that tgtadm expects a block device as the target, and btrfs does not provide that. Is there a workaround, other than using a file in the subvolume as the target? Is there work in progress to enable this feature, either in the scsi-target-utils package or within the btrfs framework?

A btrfs subvolume is a separate file tree, but it's not a block device. It has no fixed size or number of sectors, which is the case for a block device. I don't think there's a plan to change this.

https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes

Using a file is unlikely to be a good work around because Btrfs is COW, so it writes new blocks even for overwriting files. For a large file with a lot of active re-writes, it causes a lot of fragmentation. This includes VM images. There's a lot of work still being done in the autodefrag code, but right now the emphasis is for smaller files like small databases and log files that are constantly being written to with random writes. The workaround is to set xattr +C on the file, either setting it on a containing folder which will cause any new file to inherit +C, or to set it on an empty file. This turns off datacow for the file, which as a consequence also turns off data checksumming.

So I think you're better off using LVM LV to export the iSCSI target and format it Btrfs, if Linux is what's going to use the iSCSI target. Sparse usage can be done with LVM thin provisioning.


Chris Murphy
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux