1

At the moment I have a / partition with btrfs and /home partition with xfs. I would like to take advantage of btrfs snapshots for certain directories under /home, e.g. /home/robert/.wines . Apparently this doesn't work out of the box:

 # btrfs subvolume create /home/robert/.wines
 Create subvolume '/home/robert/.wines'
 ERROR: cannot create subvolume  - Inappropriate ioctl for device

Is there a way to create a subvolume under /home, which is not a btrfs mount?

  • Can i ask you a question? Why you did this little "mess" with your filesystem mixing up xfs with btrfs? Why not create everything inside btrfs with subvolumes to achieve and use all the features of this filesystem? Cheers :) – user34720 Mar 6 '15 at 18:40
  • @nwildner - two reasons. 1) it was the openSUSE recommended layout. 2) I have files which don't necessarily mix well with BTRFS and COW - namely virtual machines – Robert Munteanu Mar 6 '15 at 20:32
  • 1
    Fair enough. However, one of the extended attributes of btrfs is actually disable COW. It can be done with chattr on a directory, or during the mount of a subvolume - ram.kossboss.com/btrfs-disabling-cow-file-directory-nodatacow - btrfs.wiki.kernel.org/index.php/Mount_options. The nodatacow mount option on a /home subvolume could be enough for your needs ;). Cheers. – user34720 Mar 6 '15 at 21:33
3

Quoting the documentation:

Although in btrfs, subvolumes/snapshots are treated as directories, only subvolume/snapshot can be the source of a snapshot, snapshot can not be made from normal directories.

Since your /home dir is not a subvolume neither a snapshot, it will not be possible to create a snapshot of anything inside of it.

Link:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.