Skip to contentSkip to conversation

Dynamic remount with variable COW stacking/merging needed, support for snapshot repilication

uml-devel Stephen D. Williams 4 participants 5 messages Jan 17, 2004 – Jan 18, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

When a UML instance is running a always-on service, such as a web server, an administrator needs to be able to make live backups, or replications, of a running system.

This can be done using LVM snapshots, although that is not always appropriate for just this feature. A UML instance can be paused and then restarted, but this can cause severe delays while large partitions are replicated.

The COW ability is a great basis for an ideal solution, but I believe we need to identify and implement some additional features.

What I propose as a useful solution is:

A UML instance mounts filesystems directly or based on a COW image.
When an administrator invokes a console snapshot mode, the UML instance causes a quick freeze, new delta COWs to be created and stacked on existing mounts, then resumes.
When the administrator completes whatever snapshot backup is needed, they invoke a console unsnapshot command which pauses the instance, merges the delta COWs, remounts the original images with updates, and resumes.

This relies on COW stacking, which I saw was added in a patch last year and I assume is still present. The downtime for the instance would be measured in seconds generally.

Can this be done now? What needs to be added to support it?

sdw

Signature · 2 lines
[email protected] http://www.hpti.com Personal: [email protected] http://sdw.st
Stephen D. Williams 703-724-0118W 703-995-0407Fax 20147-4622 AIM: sdw

begin:vcard
fn:Stephen Williams
n:Williams;Stephen
email;internet:[email protected]
tel;work:703-724-0118
tel;fax:703-995-0407
tel;pager:[email protected]
tel;home:703-729-5405
tel;cell:703-371-9362
x-mozilla-html:TRUE
version:2.1
end:vcard

#1 lore raw
Quoted 5 lines · Stephen D. Williams

When a UML instance is running a always-on service, such as a web server, an administrator needs to be able to make live backups, or replications, of a running system.

Can this be done now? What needs to be added to support it?

Have you seen the stop, sysrq s, cp, go trick described at
http://user-mode-linux.sourceforge.net/mconsole.html ?

Jeff

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw

Yes, but that doesn't meet the key requirement I am proposing: that the downtime be limited to a few seconds. The only potential significant downtime with what I am proposing is merging COWs if there was a lot of disk I/O during the 'snapshot mode'. The existing ability is certainly useful, but not sufficient to get backups with the least impact to a running system. Snapshot mode is suspend and flush/sync with the additional semantics of an automatic temporary push/pop of a COW layer on all filesystem images. The remaining issue of merging COW's could be handled by RAID-recovery like gradual merging.

The problem is that if you have gigabytes of filesystem images, it takes time to copy them, even if using something like rsync to determine what has changed. It also costs, unless there is a program that determines which blocks are actually utilized without reads, to scan zero holes in sparse files.

I should have also mentioned that it should be possible to get a reliable feed of what blocks, or ranges more likely have changed since a certain event. This would allow very efficient, near-realtime replication. At the very least this could be used in suspend or 'snapshot mode' for efficiency, but with proper push of blocks, buffer visibility, or some kind of write-through notification, synchronization could be realtime.

sdw

Quoted 14 lines · Jeff Dike
Quoted 5 lines · Stephen D. Williams

When a UML instance is running a always-on service, such as a web server, an administrator needs to be able to make live backups, or replications, of a running system.

Can this be done now? What needs to be added to support it?

Have you seen the stop, sysrq s, cp, go trick described at http://user-mode-linux.sourceforge.net/mconsole.html ?

Jeff

Signature · 2 lines
[email protected] http://www.hpti.com Personal: [email protected] http://sdw.st
Stephen D. Williams 703-724-0118W 703-995-0407Fax 20147-4622 AIM: sdw

begin:vcard
fn:Stephen Williams
n:Williams;Stephen
email;internet:[email protected]
tel;work:703-724-0118
tel;fax:703-995-0407
tel;pager:[email protected]
tel;home:703-729-5405
tel;cell:703-371-9362
x-mozilla-html:TRUE
version:2.1
end:vcard

#3 lore raw
Quoted 2 lines · Stephen D. Williams

Yes, but that doesn't meet the key requirement I am proposing: that the downtime be limited to a few seconds.

If you use the LVM on the host you can take a snapshot of the volume the ubd images are on while the uml is stopped. The snapshot gets made instantly so the uml would be stopped for very little time.

-Steve

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw
In reply to Stephen D. Williams

Alle 22:13, sabato 17 gennaio 2004, Stephen D. Williams ha scritto:

Quoted 8 lines

When a UML instance is running a always-on service, such as a web server, an administrator needs to be able to make live backups, or replications, of a running system.

This can be done using LVM snapshots, although that is not always appropriate for just this feature. A UML instance can be paused and then restarted, but this can cause severe delays while large partitions are replicated.

In general, this should be done with LVM. There is a strong idea that COW is somehow a duplication of LVM, and I read that Jeff Dike (IIRC) wanted it to be rewritten as a new snapshot format for LVM (the reason for a different format is that LVM snapshot were built thinking to partitions, while Uml can use sparse files - which is a great advantage if you're able to use it).

It's maybe harder to setup, that's true, but see about EVMS which provides a nicer interface.

Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.23/2.6.0 on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel