Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Multiple top subvolumes on 1 disk (each their own Snapper.conf) #15

Open
zilexa opened this issue Mar 7, 2021 · 1 comment

Comments

@zilexa
Copy link

zilexa commented Mar 7, 2021

I know, this question goes totally against your recommendation:

snapraid-btrfs only uses one subvolume per data drive, which should contain all the data which is to be protected by SnapRAID, and should have a snapper config with the SUBVOLUME variable matching the path in the SnapRAID config file. Any files stored in other subvolumes on the data drives will NOT be protected by the parity, even if those subvolumes are mounted below the path specified in the SnapRAID config file. This is because syncs will be done using a read-only snapshot, where the subvolume mount point will appear to SnapRAID as an empty directory. Also, SnapRAID currently sees separate btrfs subvolumes as separate filesystems, so this wouldn't work even without using snapshots.

In any case, it's desirable to have all the SnapRAID data files in a single subvolume, since this makes snapshotting atomic, ensuring that after a successful sync, the parity corresponds to a single snapshot of each data drive.

Yet, I have a need to protect
/mounted/disk/subvolid5/data-subvol (precious user files)
/mounted/disk/subvolid5/media-subvol (tv/music files)

data-subvol contains non-expandable data and I need to be able to btrfs send/receive it to multiple backup disks.
media-subvol is huge, too big for my backup disks and it contains expendable data (but still worth protecting against disk failure).

--> Can we trick snapraid to allow multiple subvolumes? By:

  1. simply adding extra snapper config files, 1 for each toplevel subvol.
  2. add each top-level subvol in the snapraid.conf as datadisk.

I have 3 disks with each 2 top level sobvolumes:
/mnt/disks/data1/Users
/mnt/disks/data2/Users
/mnt/disks/data3/Users

/mnt/disks/data1/Media
/mnt/disks/data2/Media
/mnt/disks/data3/Media

In the snapper config files:
SUBVOLUME="/mnt/disks/data1/Users"
SUBVOLUME="/mnt/disks/data1/Media" etc. (6 in total)

Would snapraid-btrfs include all 6 subvols? And if I run snapraid without snapshots, should it not also work?

@zilexa zilexa changed the title Possible to add multiple subvolumes on 1 disk (via multiple snapper files?) [question] Multiple subvolumes on 1 disk (each their own Snapper.conf) Mar 12, 2021
@zilexa zilexa changed the title [question] Multiple subvolumes on 1 disk (each their own Snapper.conf) [question] Multiple top subvolumes on 1 disk (each their own Snapper.conf) Mar 18, 2021
@zilexa
Copy link
Author

zilexa commented Mar 24, 2021

Ah I think I understand why this would work, but won't allow you to restore:
If a single disk fails, from snapraid perspective, 2 disks failed in a 6 disk setup.

If disk3 fails, since disk3/Users and disk3/Media and Snapraid would need to recover both. But it can only recover 1 disk.
Even worse: it might even fail recovering 1 subvolume, for example disk3/Users because it expects disk3/Media` to still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant