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

activate lvm volume and rescript-lvm-discovery.pl #2

Open
TheSkyHeart opened this issue Jun 23, 2020 · 3 comments
Open

activate lvm volume and rescript-lvm-discovery.pl #2

TheSkyHeart opened this issue Jun 23, 2020 · 3 comments

Comments

@TheSkyHeart
Copy link

TheSkyHeart commented Jun 23, 2020

Hi Sebastian,

just wanted to check if you are still maintaining the script, I have been looking for something like for a while and found your script with restic, I have a lot of lvm volumes that I have to backup on weekly basis.

I got this script and install all the requirements, started a backup for one of the volumes with this command:

# lvm-rescript OnappBackup block-level-backup a4q5ic7ktp5emr

that volume is 56GB and the script created only a 10GB snapshot for i'm not sure if that snapshot is only for the used data but I did change the LVM_SNAPSHOT_BUFFER= to 60GB just to be safe.

then I got this error:

dd: opening `/dev/onapp-en7y49535pr791/a4q5ic7ktp5emr_snapshot': No such file or directory

I think this is because the volume it self is not Active on the backup server? so I guess we have to active the snapshot volume before starting the backup.

I also tried running a file-level-backup but got the error:
mount: you must specify the filesystem type

so I would really be grateful if I can get some help updating the script or getting more information.

@sebastian13
Copy link
Owner

Hi,

i've just done some tests. Indeed, it is a problem if the volume is inactive. dd cannot open an inactive volume, nor can I mount an inactive volume. What I can do is:

  • check if the volume is inactive
  • set it to active to run the backup
  • set the status to inactive again when everything is done

Would this be any help for you?

The snapshot size, by the way, is only a buffer. Meaning, 10GB could change on your volume while the snapshot is not changing. If the changes exceed 10GB, the snapshot gets invalid. In your case, as you're not using the volumes, 10GB is fine of course.

@TheSkyHeart
Copy link
Author

Hi Sebastian,

Thanks a lot for replying, and for the help, I appropriate it,

ok let me explain what the case here and I think I need to understand how lvm snapshot work,
when we create a new snapshot does all new data written to he volumes goes on the volume it self or on the snapshot?

because what you mentioned the setups above will work but maybe you meant snapshot instead of volume so basically:
1- check if the volume is inactive
2- create a snapshot for the volume
3- activate the snapshot volume
4- backup the snapshot volume
5- set the snapshot volume to inactive
6- delete the snapshot

in my case I have around 3 iscsi volumes those volumes have LVM Groups and inside those VG's lvm volumes for Virtual Machines, those lvm volumes are already active on the KVM Server that is running the VM, so what I'm trying to do is to backup those VM volumes without shutting down the VM's, the backup server is separate server which has access to those iscsi volumes but none of lvm volumes are active on that backup server, so if a lvm volumes is active on multiple servers this might lead to data corruption.

@TheSkyHeart
Copy link
Author

Hi Sebastian,

I'm sorry but I haven't got any reply from you, just wanted to check if you got my last message here.

Thanks

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

2 participants