Linux LVM users
 help / color / mirror / Atom feed
* RE: [linux-lvm] read-only media in a LVM?
@ 2003-06-23 17:13 Sean P. Kane
  2003-06-23 17:41 ` Kevin P. Fleming
  0 siblings, 1 reply; 14+ messages in thread
From: Sean P. Kane @ 2003-06-23 17:13 UTC (permalink / raw)
  To: linux-lvm

Ok, let me clarify a bit. I mis-spoke, when I spoke of memory I meant
ramdisk (fs). This is basically what I was actually visualizing in my
head:

1) Boot cdrom into a Linux instance.
2) Mount a read-write filesystem into memory (this is why I asked the
size issue, obviously coping the whole cdrom to memory wouldn't be
practical)
3) Create a snapshot (I'm am really new to lvm, so I'm still learning
what all this means), which would be a small reference table of some
sort, plus 32k blocks of changed data.
4)This would then allow "changes" to the cdrom while running in that
session until the ram disk filled up? Correct?
5) If a file is created then deleted in an environment like this will
the space it was using in the snapshot fs be released?

The use I have in mind for this, doesn't need a ton of additional files
added, after boot-up but would need a lot of temp files created and then
cleaned up. 

What are the basic commands I would need to achieve this? I've read the
LVM howto (doesn't cover LVM2, that I saw) and still not quite sure.

Thanks,
Sean


------------------------------------------------------------------------
Sean P. Kane
spkane@genomatica.com
Lead Infrastructure Architect
Genomatica, Inc.
------------------------------------------------------------------------
"When we destroy something man has created we call it vandalism......
 When we destroy something that Gaia has created we call it progress."


-----Original Message-----
From: Wolfgang Weisselberg [mailto:uzx87lvfmukwc001@sneakemail.com] 
Sent: Monday, June 23, 2003 14:23
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] read-only media in a LVM?


Sean P. Kane wrote 36 lines:

> Does a snapshot create a copy of all the files in memory?

Nope.  And not in memory either.

> Just the files that changed?

Nope, LVM is filesystem-agnostic, and that would have to change that.
More code, more errors, less usability.

Additionally, what would you do with metadata, like used filesystem
blocks and timestamps and filenames?

Or with a 1 TB file where just 1 bit was changed?

> Or just the file blocks or contents (i.e. diffs) that have changed?

Blocks of (default) 32Kb of raw disk.  They are written to the snapshot.
However, the tables of which blocks were written are kept in RAM, so a
read request on the snapshot redirects only the unchanged blocks to the
original (HD/CD) and gets the changed blocks out of the snapshot
storage.

> So, would the snapshot have to be the same size as the cdrom or could 
> it be smaller?

MUCH smaller. Unless you insist on changing something in every 32KB
block of the CDrom.

-Wolfgang

_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [linux-lvm] read-only media in a LVM?
@ 2003-06-24 18:49 Sean P. Kane
  0 siblings, 0 replies; 14+ messages in thread
From: Sean P. Kane @ 2003-06-24 18:49 UTC (permalink / raw)
  To: linux-lvm

Wolfgang, can I get your email address so that I can ask you a few
questions about this off-line?

Thanks,
Sean


------------------------------------------------------------------------
Sean P. Kane
spkane@genomatica.com
Lead Infrastructure Architect
Genomatica, Inc.
------------------------------------------------------------------------
"When we destroy something man has created we call it vandalism......
 When we destroy something that Gaia has created we call it progress."


-----Original Message-----
From: Wolfgang Weisselberg [mailto:uzx87lvfmukwc001@sneakemail.com] 
Sent: Monday, June 23, 2003 17:35
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] read-only media in a LVM?


Sean P. Kane wrote 78 lines:

> I'd love to have a unionfs, but my understanding is that no such beast

> exists for Linux 2.4 currently

Try looking at 
    http://plasticfs.sourceforge.net/plasticfs.html

Plasticfs-viewpath is basically a unionof all filesystems in the
viewpath, changes happen on the first one and a .whiteout remembers what
you deleted.  It does *not* work for root (security!!!  You do not want
root to see /tmp/login instead of /bin/login!).  Remember to set the
environment variables, e.g.

    LD_PRELOAD=/usr/local/lib/libplasticfs.so
    PLASTICFS="viewpath /ramdisk /cdrom1 /cdrom2"
    /bin/bash   # or whatever program you want.

Since Plasticfs works on file-level, you should be able to mix and match
filesystems as you like.  Note however that --- since we just overload
common FS access methods --- some things might not work.

I have it in production use (for Aegis, not for cdroms).

-Wolfgang

_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [linux-lvm] read-only media in a LVM?
@ 2003-06-24 11:27 Sean P. Kane
  0 siblings, 0 replies; 14+ messages in thread
From: Sean P. Kane @ 2003-06-24 11:27 UTC (permalink / raw)
  To: linux-lvm

Thanks for all the useful thoughts and pointers. I'll give them a try
and see what I can manage to pull together.

Sean

------------------------------------------------------------------------
Sean P. Kane
spkane@genomatica.com
Lead Infrastructure Architect
Genomatica, Inc.
------------------------------------------------------------------------
"When we destroy something man has created we call it vandalism......
 When we destroy something that Gaia has created we call it progress."


-----Original Message-----
From: Wolfgang Weisselberg [mailto:uzx87lvfmukwc001@sneakemail.com] 
Sent: Monday, June 23, 2003 17:35
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] read-only media in a LVM?


Sean P. Kane wrote 78 lines:

> I'd love to have a unionfs, but my understanding is that no such beast

> exists for Linux 2.4 currently

Try looking at 
    http://plasticfs.sourceforge.net/plasticfs.html

Plasticfs-viewpath is basically a unionof all filesystems in the
viewpath, changes happen on the first one and a .whiteout remembers what
you deleted.  It does *not* work for root (security!!!  You do not want
root to see /tmp/login instead of /bin/login!).  Remember to set the
environment variables, e.g.

    LD_PRELOAD=/usr/local/lib/libplasticfs.so
    PLASTICFS="viewpath /ramdisk /cdrom1 /cdrom2"
    /bin/bash   # or whatever program you want.

Since Plasticfs works on file-level, you should be able to mix and match
filesystems as you like.  Note however that --- since we just overload
common FS access methods --- some things might not work.

I have it in production use (for Aegis, not for cdroms).

-Wolfgang

_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [linux-lvm] read-only media in a LVM?
@ 2003-06-23 12:51 Sean P. Kane
  2003-06-23 16:23 ` Wolfgang Weisselberg
  0 siblings, 1 reply; 14+ messages in thread
From: Sean P. Kane @ 2003-06-23 12:51 UTC (permalink / raw)
  To: linux-lvm

Does a snapshot create a copy of all the files in memory? Just the files
that changed? Or just the file blocks or contents (i.e. diffs) that have
changed? So, would the snapshot have to be the same size as the cdrom or
could it be smaller?

Thanks,
Sean


------------------------------------------------------------------------
Sean P. Kane
spkane@genomatica.com
Lead Infrastructure Architect
Genomatica, Inc.
------------------------------------------------------------------------
"When we destroy something man has created we call it vandalism......
 When we destroy something that Gaia has created we call it progress."


-----Original Message-----
On Fri, Jun 13, 2003 at 04:55:40PM -0700, Sean P. Kane wrote:
> I saw this email below and was wondering if this is supported in both
dm
> and the LVM2 tools now.

The tools still don't support this, so you'll have to use dmsetup to
create a writeable snapshot of the CD.  Also be aware that you'll need
to have a suitable fs on the CD, most CD filesystems are read only.

- Joe

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE:  [linux-lvm]  read-only media in a LVM?
@ 2003-06-16  8:35 Sean P. Kane
  2003-06-16  8:52 ` Joe Thornber
  0 siblings, 1 reply; 14+ messages in thread
From: Sean P. Kane @ 2003-06-16  8:35 UTC (permalink / raw)
  To: linux-lvm; +Cc: Sean P. Kane

[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]

I saw this email below and was wondering if this is supported in both dm
and the LVM2 tools now. I am trying to setup a bootable cd, that can be
written to during that session and this would be a god send, since as
the last person points out there really isn't a mature way to do this in
the 2.4/2.5 kernels. 2.6 is suppose to have a unionfs sometime after
release, but this is an immediate project.
 
Thanks,
Sean
 
------------------------------------------------------------------------
Sean P. Kane
spkane@genomatica.com
Lead Infrastructure Architect
Genomatica, Inc. <http://www.genomatica.com/> 
------------------------------------------------------------------------
"When we destroy something man has created we call it vandalism......
 When we destroy something that Gaia
<http://dictionary.reference.com/search?q=gaia>  has created we call it
progress."

 

[linux-lvm] read-only media in a LVM? 
Joe Thornber linux-lvm@sistina.com <mailto:linux-lvm%40sistina.com> 
Tue May 28 03:44:01 2002 
 
Previous message: [linux-lvm] read-only media in a LVM?
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/011529.html> 
Next message: [linux-lvm] errors compiling on redhat 7.3
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/011528.html> 
Messages sorted by: [ date ]
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/date.html#11530>
[ thread ]
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/thread.html#1153
0>  [ subject ]
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/subject.html#115
30>  [ author ]
<https://lists.sistina.com/pipermail/linux-lvm/2002-May/author.html#1153
0>  
  _____  

On Mon, May 27, 2002 at 04:37:49PM -0700, Ami Fischman wrote:
> Hi there,
> I am wondering whether it is possible to have a read-only fs (CDROM,
image,
> etc) as part of an LVM-managed volume. I see references to COW
> (copy-on-write, I'm hoping :)) in the kernel drivers/md/ files, but
it's not
> at all clear to me whether or not the current drivers can be used to
> implement a "translucent" or "inheriting" file system (one where a
base fs
> is given, on r-o media, and changes to it get recorded on another
device,
> presumabely a r-w fs). Please let me know whether this is currently
> possible, being planned for the future, or if I'm making no sense
above &
> you want me to clarify :). For a not-quite-mature example of what I'm
> talking about, see translucency.sf.net.
 
In fact you can do this now if you use just device-mapper/dmsetup :)
It's just the LVM2 tools that don't support it yet.- Joe 
 

[-- Attachment #2: Type: text/html, Size: 5733 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [linux-lvm] read-only media in a LVM?
@ 2002-05-27 18:30 Ami Fischman
  2002-05-28  3:40 ` Joe Thornber
  2002-05-28  3:44 ` Joe Thornber
  0 siblings, 2 replies; 14+ messages in thread
From: Ami Fischman @ 2002-05-27 18:30 UTC (permalink / raw)
  To: linux-lvm

Hi there,
I am wondering whether it is possible to have a read-only fs (CDROM, image,
etc) as part of an LVM-managed volume.  I see references to COW
(copy-on-write, I'm hoping :)) in the kernel drivers/md/ files, but it's not
at all clear to me whether or not the current drivers can be used to
implement a "translucent" or "inheriting" file system (one where a base fs
is given, on r-o media, and changes to it get recorded on another device,
presumabely a r-w fs).  Please let me know whether this is currently
possible, being planned for the future, or if I'm making no sense above &
you want me to clarify :).  For a not-quite-mature example of what I'm
talking about, see translucency.sf.net.

Thanks,
-- 
  Ami Fischman, Ph.D.
  fischman@bpnetworks.com
  http://www.bpnetworks.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-06-24 18:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-23 17:13 [linux-lvm] read-only media in a LVM? Sean P. Kane
2003-06-23 17:41 ` Kevin P. Fleming
2003-06-23 18:54   ` Sean P. Kane
2003-06-23 19:35     ` Wolfgang Weisselberg
2003-06-23 20:10     ` Kevin P. Fleming
  -- strict thread matches above, loose matches on Subject: below --
2003-06-24 18:49 Sean P. Kane
2003-06-24 11:27 Sean P. Kane
2003-06-23 12:51 Sean P. Kane
2003-06-23 16:23 ` Wolfgang Weisselberg
2003-06-16  8:35 Sean P. Kane
2003-06-16  8:52 ` Joe Thornber
2002-05-27 18:30 Ami Fischman
2002-05-28  3:40 ` Joe Thornber
2002-05-28  3:44 ` Joe Thornber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox