[SOLVED] Clone Container from Snapshot Locking the Source

drjaymz@

Member
Jan 19, 2022
141
5
23
102
I created a small container running 22.04 and MariaDB and run a small database of about 250G in size. The database is busy and every 20 mins a couple of million rows gets fired into it from 8 threads.

I created a snapshot of the container earlier and then proceeded to create a clone of the container from that snapshot. The original container is still running.
What seems to happen (both times I have done it) is that the database inserts lock up on the original. Underlying disk is ZFS.

I haven't gone it to too much detail as to exactly what underpins the snapshot so I am not sure how it works but I wasn't expecting it to lock up my live DB especially as it was from a snapshot and not the current. I'm not even certain that is what happened. Maybe the disk io? I couldn't recover the VM. I tried to stop MySQL, nothing, syslog nothing. abandoned the clone - it didn't recover, forced it to stop - ok. Restart ok.

The reason I think its the clone is that I did it yesterday and about 15 mins in it borked and today I did a clone and again within about 15 mins it borked again.

I googled the forums but can't quite find an answer - but if anyone knows that it will block the container; then I guess thats the answer and that would also explain why syslog is also stopped. You'd expect a kernel panic or something?
 
Last edited:
No response - since I wrote this I can confirm that cloning a running container from an earlier snapshot DOES interfere with the running container. I tried it again on a test and sure enough same again. I haven't done it since with the live one and no problems.