Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Subvolume snapshot advice?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Mon Jun 12, 2017 4:57 pm    Post subject: Subvolume snapshot advice? Reply with quote

I am setting up a brand-new PowerEdge T20 server with Gentoo to act as a small business server. It will host AD, DNS, DHCP, VPN, and file shares. I am using a GPT disk setup with two disks. Each disk has a 128MiB FAT32 partition for UEFI, the entire middle of the disk for RAID1 BTRFS, and a 2GiB partition on the end of each disk for swap. I am now trying to figure out a subvolume scheme for recovery and archival purposes. I normally mount the BTRFS partition and make the following subvolumes.

  • @root - mounted as /
  • @boot - mounted as /boot
  • @source - mounted as /usr/src
  • @home - mounted as /home

I then unmount the partition and mount the subvolumes instead. As such, is this a good scheme or should I plan to backup more areas? I will only be snapshotting @boot, @source, and @home as things stand now. Is this sufficient? File shares are located in /home/shared in case you're wondering. No users will be able to login to this system as it is an AD DC.

*EDIT*

Also, will the UEFI firmware on my system only use the FAT32 partition on sda or will it use both, one as a backup? If not, can I safely use dd to clone sda1 to sdb1 occasionally so the system can boot if one disk fails?
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 734
Location: Glasgow, UK

PostPosted: Tue Jun 13, 2017 2:22 pm    Post subject: Reply with quote

From personal experience I would advise using lvm to perform the raid part of the setup. The lvm raid code is faster than the btrfs code (due to the fundamental structure of the kernel block layer which has implications for scheduling optimisation etc.), and on my machine I have had huge latency problems with the btrfs raid code, to the point that simple saving a file in vim would drop into D state for multiple seconds, both in mirror and stripe configurations.

As far as snapshotting goes, I have played with it before, but it gets bogged down fast when the COW structure starts to get complicated so I can only recommend it for short term recovery e.g a few days to weeks. Longer than that, unless you expect to be recovering lost data with high frequency I would personally recommend using snapshotting backup instead.

As an example, for a small business server I currently manage (gentoo based VM hypervisor and SMB file server for various windows guests) I keep archival copies with duplicity by making daily incremental backups to backblaze B3, which are complemented by "leapfrogging" monthly full backups, such that I have up to 2 months of snapshots at any time. Filesystems are ext4.

-Telemin-

P.S As far the UEFI goes, you can keep two identical uefi partitions no problem. If your dell machine's firmware is anything like mine you can either set up a fallback order, or simply let the machine figure it out for itself in which case it grabs the first EFI partition it finds and tries to use it.
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1364
Location: Fayetteville, NC, USA

PostPosted: Thu Jun 15, 2017 12:20 pm    Post subject: Reply with quote

I use BTRFS for the bit-rot protection it offers. Using LVM would defeat that, to an extent. Granted, I do not like BTRFS RAID1 not supporting more than two disks (not true mirroring), but the only other option is ZFS, which requires more RAM and has a few things which BTRFS does better.

I went with the structure I listed in the OP for snapshots. I do not expect to use it often. I would snapshot /boot and /usr/src when upgrading to a new kernel for easy roll-back if anything came up down the road, so there would only be a few snapshots at a time. The one for /home will be used with a backup plan so we may store a week of snapshots at a time, no more. Provides for quicker restoration in the event of a missing file than opening a big backup file.

As for the EFI, I mounted sda1 to /boot/efi, installed grub to sda, umounted, mounted sdb1 to /boot/efi, and installed grub to sdb. I figure if sda conks out then sdb should be good to go.

*EDIT*

I just noticed your avatar. I like that. Vinyl has the highest quality audio out there. I prefer to grab my albums in vinyl and rip them to FLAC, which can then be converted to OGG or MP3 depending on the device I want to use them on. Keep the FLAC around and I never need to use the vinyl.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Jun 15, 2017 1:54 pm    Post subject: Reply with quote

The_Great_Sephiroth wrote:
I would snapshot /boot and /usr/src when upgrading to a new kernel for easy roll-back if anything came up down the road

/boot snapshots may not be sufficient without /lib/modules at the same time, unless you compile everything in kernel.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5845

PostPosted: Tue Jun 27, 2017 3:59 pm    Post subject: Reply with quote

The_Great_Sephiroth wrote:
but the only other option is ZFS, which requires more RAM


Do you mean to just load the modules, or for actual system usage? The whole "1gb for every tb" is a fallacy, you can run zfs however you want, but the more memory you do feed it, the more you can cache. If you want to run a petabyte pool with only 16gb of memory, you could.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum