Jack Hill on 12 Jul 2012 11:06:23 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] SteadyState/DriveShield for Ubuntu?


On Thu, 12 Jul 2012 13:31:56 -0400
Rich Freeman <r-plug@thefreemanclan.net> wrote:

> On Thu, Jul 12, 2012 at 11:32 AM, Jack Hill <jackhill@jackhill.us>
> wrote:
> > But you donât need to. Suppose you have the LV home on VG vg0. When
> > a user logs in you
> >
> > lvcreate -n home-temp -s home -L some-reasonable-size
> > mount /dev/vg0/home-temp /home
> >
> > All the change the user makes get copy-on-written by disk block
> > changed to home-temp. When the user logs out simply
> >
> > lvremove /dev/vg0/home-temp.
> 
> I'm pretty sure you have that backwards.  When you have an LVM
> snapshot for a volume, and you write to that volume, the change gets
> written to the original volume, and the original value of those blocks
> are written to the snapshot.  When you delete the snapshot you're
> deleting the ORIGINAL content of the volume, and not the changes.

The man page doesnât actually say what is going on (but you probably
donât want that level of detail from a manpage). The process you
describe makes sense when blocks are changed in the original LV. The
process I was describing was changing block in the snapshot LV, which I
think only writes to the snapshot. I just created a 1g snapshot, filled
it with random data, and the lvremove was instant. Try it.
 
> Assuming Ubuntu doesn't already have a clean solution for this, Google
> has a few.  The simplest is to just keep a copy of the home directory
> and wipe it every time X11 exits.  Just make a shell script that wipes
> the user directory and makes a fresh copy, drops privs, starts X11,
> and then terminates.  Then just stuck it in inittab.

TMTOWTDI!

Jack

Attachment: signature.asc
Description: PGP signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug