2 basic LVM questions with RAMDISKs

Tino Schwarze linux-poweredge.lists at tisc.de
Mon Feb 7 05:36:08 CST 2011


On Mon, Feb 07, 2011 at 03:04:51AM -0800, Sunil_Gupta2 at dell.com wrote:
> Hello Dave,
> 
> >>What Sunil describes, though, is the way VMWare does its Snapshots, but not LVM.
> 
> Are you trying to say that a change in snapshot will be reflected in original lvm?

I don't think so.

You wrote:

> For the second point any change in snapshot will not go to the
> original LVM it's vice versa any new changes in LVM will be going to the
> snapshot.

(BTW: I wasn't aware that snapshots may be written, but anyway...)

As far as I understand, it works like this:

1. you got a logical volume called vol1
2. you take a snapshot and get a _new_ volume snap1
3. you may mount that new volume somewhere

now:
- writes to vol1 do _not_ show up in the snapshot
- writes to the snapshot (if at all possible) will not show up in the
  volume

Copy-on-write means: To keep the state of the disk on snapshot creation,
any part of vol1 which is written will be first copied to the snapshot.
That is, if you do not write anything to the original volume, the
snapshot will occupy almost no disk space. If nothing is written, both
vol1 and snap1 will share the same disk blocks. Any block getting
modified in vol1 will be copied to snap1 first.

HTH,

Tino.

-- 
"What we nourish flourishes." - "Was wir nähren erblüht."

www.tisc.de



More information about the Linux-PowerEdge mailing list