[DRBD-user] Re: Re: [DRBD user] HELP ... Primary becomes StandAlone.

Regis Gras Regis.Gras at ujf-grenoble.fr
Wed Jun 21 16:30:35 CEST 2006

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Lars Ellenberg wrote:

> since the sda6 is a multiple of 4kB, too,
> we don't need to round down the offset.
> so I'd say, to wipe out the meta data, you do
>
> perl -e '$offset = sysseek STDOUT, -(128*1024*1024), 2;
> 	die unless $offset == 58538276*1024;
>	$zero = "\x00" x 1024;
>	syswrite(STDOUT,$zero) == 1024 or warn "oops? $!";
>	' > /dev/sda6

Thak you very much for your help.

I do'nt well known Perl, but I understand what you write.

But this script doesn't work.

[dionysos]-root# perl -e '$offset = sysseek STDOUT, -(128*1024*1024), 2;
> die unless $offset == 58538276*1024;
> $zero = "\x00" x 1024;
> syswrite(STDOUT,$zero) == 1024 or warn "oops? $!";
> ' > /dev/sda6
Died at -e line 2.

I do'nt know what is the value returned by sysseek
To try to know the value of $offset, I wrote:
perl -e '$offset = -1;$offset = sysseek STDOUT, -(128*1024*1024), 2;
print "Return value $offset \n";' > /dev/sda6

But nothing is written.

Could you tell me what to do

Sincerely



-- 
==================================================================
| Régis Gras                 | http://www-ledss.ujf-grenoble.fr  |
| L.E.D.S.S.                 | mailto:Regis.Gras at ujf-grenoble.fr |
| 301, rue de la chimie      |         --------------            |
| DU BP 53                   | Tel 04 76 51 41 76                |
| 38041 Grenoble Cedex 9     | Fax 04 76 51 40 89                |
==================================================================




More information about the drbd-user mailing list