Snapshots in kernel 2.6.19

View: New views
3 Messages — Rating Filter:   Alert me  

Snapshots in kernel 2.6.19

by Juergen E. Fischer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

starting somewhere between 2.6.18 and 2.6.19 making snapshots stopped
working.

The device mapper complains like this:

device-mapper: table: 254:52: snapshot: requires exactly 4 arguments

EVMS passes one argument more than expected.  Apparently the evms patch
that actually supported the argument never made it into device mapper.

Before 2.6.19 it was ignored, so I assume it's save to just drop it.
Attached a patch does that.


Juergen



--- engine/dm-targets.c.orig 2007-04-10 21:35:29.651723176 +0200
+++ engine/dm-targets.c 2007-04-10 21:35:59.293412360 +0200
@@ -921,14 +921,14 @@
  *
  * Generate an ASCII constructor string for a snapshot target.
  * A snapshot string has the form:
- *   <org_major>:<org_minor> <snap_major>:<snap_minor> <p|n> <chunk_size> <org_parent_major>:<org_parent_minor>
+ *   <org_major>:<org_minor> <snap_major>:<snap_minor> <p|n> <chunk_size>
  **/
 static int snapshot_build_params(dm_target_t *target)
 {
  dm_target_snapshot_t *snapshot = target->data.snapshot;
  char *format = (dm_get_version() == 3) ?
- "%x:%x %x:%x %c %u %x:%x" :
- "%u:%u %u:%u %c %u %u:%u";
+ "%x:%x %x:%x %c %u" :
+ "%u:%u %u:%u %c %u";
  int rc = ENOMEM;
 
  LOG_PROC_ENTRY();
@@ -938,9 +938,7 @@
  snprintf(target->params, 50, format,
  snapshot->origin.major, snapshot->origin.minor,
  snapshot->snapshot.major, snapshot->snapshot.minor,
- (snapshot->persistent) ? 'p' : 'n', snapshot->chunk_size,
- snapshot->origin_parent.major,
- snapshot->origin_parent.minor);
+ (snapshot->persistent) ? 'p' : 'n', snapshot->chunk_size);
  rc = 0;
  }
 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Evms-devel mailing list
Evms-devel@...
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel

Re: Snapshots in kernel 2.6.19

by Nuno Silva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jürgen E. Fischer wrote:
> Hi there,

Hello, Jürgen!


> starting somewhere between 2.6.18 and 2.6.19 making snapshots stopped
> working.
>
> The device mapper complains like this:
>
> device-mapper: table: 254:52: snapshot: requires exactly 4 arguments
>
> EVMS passes one argument more than expected.  Apparently the evms patch
> that actually supported the argument never made it into device mapper.
>
> Before 2.6.19 it was ignored, so I assume it's save to just drop it.
> Attached a patch does that.

Very, very nice. Thank you!

I was beeing affected by that problem for a few weeks but couldn't solve
the problem (gave up after a few tries because I don't like to mess with
storage... Big responsability!). I've been testing this patch in a test
server for some days and it looks good. No problems so far. Any comments?

Anyway, I'd like the core team to bless this patch and maybe include it
in a new release?

Thanks again,
Nuno Silva



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Evms-devel mailing list
Evms-devel@...
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel

Re: Snapshots in kernel 2.6.19

by Brock, Anthony - NET :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am also seeing similar behavior since upgrading from kernel version 2.6.16 to 2.6.20.6 last week:

# tail /var/log/kern.log
Apr 17 03:10:41 vs2 kernel: device-mapper: ioctl: error adding target to table
Apr 17 03:10:53 vs2 kernel: device-mapper: ioctl: unable to remove open device scg-bind-2_root
Apr 18 13:50:41 vs2 kernel: device-mapper: table: 254:65: snapshot: requires exactly 4 arguments
Apr 18 13:50:41 vs2 kernel: device-mapper: ioctl: error adding target to table
Apr 18 13:50:41 vs2 kernel: device-mapper: table: 254:65: snapshot: requires exactly 4 arguments
Apr 18 13:50:41 vs2 kernel: device-mapper: ioctl: error adding target to table
Apr 18 13:50:50 vs2 kernel: device-mapper: table: 254:65: snapshot: requires exactly 4 arguments
Apr 18 13:50:50 vs2 kernel: device-mapper: ioctl: error adding target to table
Apr 18 13:50:50 vs2 kernel: device-mapper: table: 254:65: snapshot: requires exactly 4 arguments
Apr 18 13:50:50 vs2 kernel: device-mapper: ioctl: error adding target to table
# uname -a
Linux vs2.mydomain.com 2.6.20.6-skas3-v8.2 #1 SMP Fri Apr 13 17:27:25 PDT 2007 i686 GNU/Linux
#

I would be very interested in seeing a patch that resolves this integrated into the mainline evms utilities for Debian.

Tony

> -----Original Message-----
> From: evms-devel-bounces@...
> [mailto:evms-devel-bounces@...] On Behalf
> Of Nuno Silva
> Sent: Tuesday, April 17, 2007 7:50 PM
> To: "Jürgen E. Fischer"
> Cc: evms-devel@...
> Subject: Re: [Evms-devel] Snapshots in kernel 2.6.19
>
> Jürgen E. Fischer wrote:
> > Hi there,
>
> Hello, Jürgen!
>
>
> > starting somewhere between 2.6.18 and 2.6.19 making
> snapshots stopped
> > working.
> >
> > The device mapper complains like this:
> >
> > device-mapper: table: 254:52: snapshot: requires exactly 4 arguments
> >
> > EVMS passes one argument more than expected.  Apparently
> the evms patch
> > that actually supported the argument never made it into
> device mapper.
> >
> > Before 2.6.19 it was ignored, so I assume it's save to just drop it.
> > Attached a patch does that.
>
> Very, very nice. Thank you!
>
> I was beeing affected by that problem for a few weeks but
> couldn't solve
> the problem (gave up after a few tries because I don't like
> to mess with
> storage... Big responsability!). I've been testing this patch
> in a test
> server for some days and it looks good. No problems so far.
> Any comments?
>
> Anyway, I'd like the core team to bless this patch and maybe
> include it
> in a new release?
>
> Thanks again,
> Nuno Silva
>
>
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Evms-devel mailing list
> Evms-devel@...
> To subscribe/unsubscribe, please visit:
> https://lists.sourceforge.net/lists/listinfo/evms-devel
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Evms-devel mailing list
Evms-devel@...
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel