1

My BareOS server has two drives in it (for now):

  • One drive contains a Logical Volume Management (LVM) Volume Groups (VGs) and Logical Volumes (LVs) constrained to a single drive;
  • And the other drive contains the Linux OS, swap and root (/) file systems.

At some point in the past on a reboot, my BareOS server failed to mount an LVM LV at /backups/proxmox/homedirs/leeand00/, and so instead of my backups ending up on the LVM Logical Volume designated for my backups, instead they ended up on the drive that contains my root file system in /backups/proxmox/homedirs/leeand00/ where that LVM Logical Volume would normally be mounted.

Now it seems to me that fixing this should be as simple as the following:

  1. Mount the LV somewhere else...
  2. Move the files that were backed up in /backups/proxmox/homedirs/leeand00 to the alternate mount point
  3. Make sure that the /backups/proxmox/homedirs/leeand00 is empty.
  4. Unmount the LV, and mount it on /backups/proxmox/homedirs/leeand00 again.
  5. Run some command to update the database.

However...I would think that since I'm using incremental backups, I will probably have some overlap here, since when BareOS found the directory empty before, it no-doubt took a full backup and added incrementals, so I don't imagine my solution above will work that simply.

What strategy is good to use to fix this, and what command do I need to run in bconsole to update the database with the current directory content? Lastly, is there any way to get BareOS to detect that there was an issue mounting to prevent the situation in the future?

  • 1
    I'm trying to get into the habit of making my mount points immutable (chattr +i): "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file", so your backup will fail rather loudly and obviously if the mount isn't there. – Ulrich Schwarz Feb 20 '17 at 8:11

Your Answer

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

Browse other questions tagged or ask your own question.