LVM and snapshots

I have a fileserver that I simply arrangement lvm on. I have 2 LVM dividings / dev/fileserverLVM/home. / dev/fileserverLVM/backup

I would certainly such as to take and also store the photos in/ dev/fileserverLVM/backup. Right stuff I've read all has you developing a new sensible dividing. Can this be stayed clear of and also the snapshot created straight to/ dev/fileserverLVM/backup? Or do I have no alternatives?

1
2022-06-07 14:39:09
Source Share
Answers: 3

Snapshot is the quantity of it is very own necessarily, so it has to be included in Volume Group as it.

If you desire an virtually instantaneous duplicate of the functioning residence LV within your back-up LV making use of photos, you can continue as adheres to:

  • create snapshot of real-time quantity

lvcreate - LXG - s - n snapshot/ dev/fileserverLVM/home

  • thinking back-up LV is of the very same dimension as residence

dd if =/ dev/fileserverLVM/snapshot of =/ dev/fileserverLVM/backup bs = 1M

  • remove the snapshot

lvremove/ dev/fileserverLVM/snapshot

4
2022-06-07 15:05:47
Source

No that isn't actually an alternative.

What you can to attain this actions is something similar to this.

  • Take a snapshot
  • place the snapshot filesystem, if you intend to make a filesystem back-up
  • after that replicate your information to your back-up filsystem
  • unmount the filesystem if you had actually placed it
  • after that remove the snapshot

The vital point to bear in mind is that you have to have adequate free physical levels in your quantity team to complete this.

See snapshot backup area of the LVM HOWTO.

A snapshot quantity can be as huge or a tiny as you like yet it have to be huge sufficient to hold all the adjustments that are most likely to take place to the initial quantity throughout the life time of the snapshot.

2
2022-06-07 15:05:43
Source

I desired this to be a comment to yet the format in remarks is unreadable so:

The various other point to bear in mind is that you intend to make use of a documents system that can be quintessed (see xfs _ freeze, xfs _ freeze - u) prior to the breeze fired so the proper set would certainly be:

  • Freeze filesystem
  • Take a snapshot
  • Thaw filesystem
  • mount the snapshot filesystem, if you intend to make a filesystem back-up
  • after that replicate your information to your back-up filsystem
  • unmount the filesystem if you had actually placed it
  • after that remove the snapshot
3
2022-06-07 15:05:06
Source