RE: [Leaf-user] A small snippet of code for review

2001-07-10 Thread Tony

Charles, LEAF list members, Archive readers,

FYI, Charles is 'da man!

If anyone wants to spin down a SCSI drive with the new version of
EigerStein2 [ver 2.2.19] (at least a Seagate drive on an Adaptec 2940 AU
adapter), version 1.8.3 of noflushd is what you want.  Previous versions
didn't support SCSI disks (from the release notes) and versions after
were compiled with libc5 support, which seems to seg dump all over the
place.

So, I can put it to sleep after I get everything loaded.  WOOHOO!  Now
all I have to do is configure the box, set the write prevent jumper, and
I'm off to the races.  The advantages of a HD, with the security of a
mechanical write-prevent.

Does it get any better? [if not, shoot me now]

Thanks for the help

Tony


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Charles
> Steinkuehler
> Sent: Tuesday, July 10, 2001 09:45
> To: [EMAIL PROTECTED]
> Subject: Re: [Leaf-user] A small snippet of code for review
>
>
> > > To see which libraries you need, run:
> > >
> > > ldd sdmotor
> > >
> >
> > The results are libc.so.6 and ld-linux.so.2
> >
> > I assume with updated versions of these, it would work?  I
> also assume,
> > if I downgraded my install (see below) to 2.1, then I would
> be compiling
> > against compatible versions of these libs?
> >
> > What if I updated the libs on the LRP machine?  Would I
> break anything
> > with newer libs?  I would assume backward compatibility would be the
> > name of the game, but this is new ground for me.
>
> You can't replace your existing libc librarie with the new
> ones, or all your
> existing apps will segfault.  I don't know off-hand if you
> can have both new
> and old libraries present, but if they don't conflict (in
> name-space), and
> if you've got enough disk space, you can have both the new
> and old glibc
> present.
>
> > > on your debin box.  Since you're program's crashing (not
> > > generating an error
> > > about a missing library), you probably are linking against
> > > the wrong version
> > > of the standard C library.  Are you compiling on Debian 2.1?
> >
> > Nope, 2.2r3 from April, 01
>
> This is the problem.  The c libraries are different, which is
> why you're
> getting the segfault.
>
> > > Do what I do...don't buy Seagate drives ;-)
> >
> > $4.00, new in box with a write-protect jumper.  I didn't
> realize I could
> > cook on the damn thing while it was running.  And the noiseoi!
>
> Now you know why they were $4 :)  Some of the Seagate drives
> I've worked
> with sound like jet engines, and they whine so loudly you
> think they're
> going to explode into a million pieces...
>
> If noflushd will work for you, you may be able to grab a pre-compiled
> version from an old Debian CD or archive somewhere, and avoid
> compiling
> all-together...
>
> Good luck!
>
> Charles Steinkuehler
> [EMAIL PROTECTED]
>
>
>


___
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user



Re: [Leaf-user] A small snippet of code for review

2001-07-10 Thread Charles Steinkuehler

> > To see which libraries you need, run:
> >
> > ldd sdmotor
> >
>
> The results are libc.so.6 and ld-linux.so.2
>
> I assume with updated versions of these, it would work?  I also assume,
> if I downgraded my install (see below) to 2.1, then I would be compiling
> against compatible versions of these libs?
>
> What if I updated the libs on the LRP machine?  Would I break anything
> with newer libs?  I would assume backward compatibility would be the
> name of the game, but this is new ground for me.

You can't replace your existing libc librarie with the new ones, or all your
existing apps will segfault.  I don't know off-hand if you can have both new
and old libraries present, but if they don't conflict (in name-space), and
if you've got enough disk space, you can have both the new and old glibc
present.

> > on your debin box.  Since you're program's crashing (not
> > generating an error
> > about a missing library), you probably are linking against
> > the wrong version
> > of the standard C library.  Are you compiling on Debian 2.1?
>
> Nope, 2.2r3 from April, 01

This is the problem.  The c libraries are different, which is why you're
getting the segfault.

> > Do what I do...don't buy Seagate drives ;-)
>
> $4.00, new in box with a write-protect jumper.  I didn't realize I could
> cook on the damn thing while it was running.  And the noiseoi!

Now you know why they were $4 :)  Some of the Seagate drives I've worked
with sound like jet engines, and they whine so loudly you think they're
going to explode into a million pieces...

If noflushd will work for you, you may be able to grab a pre-compiled
version from an old Debian CD or archive somewhere, and avoid compiling
all-together...

Good luck!

Charles Steinkuehler
[EMAIL PROTECTED]


___
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user



RE: [Leaf-user] A small snippet of code for review

2001-07-09 Thread Tony

Thank you Charles for some feedback,

Comments noted below

<>
>
> To see which libraries you need, run:
>
> ldd sdmotor
>

The results are libc.so.6 and ld-linux.so.2

I assume with updated versions of these, it would work?  I also assume,
if I downgraded my install (see below) to 2.1, then I would be compiling
against compatible versions of these libs?

What if I updated the libs on the LRP machine?  Would I break anything
with newer libs?  I would assume backward compatibility would be the
name of the game, but this is new ground for me.

> on your debin box.  Since you're program's crashing (not
> generating an error
> about a missing library), you probably are linking against
> the wrong version
> of the standard C library.  Are you compiling on Debian 2.1?
>

Nope, 2.2r3 from April, 01


> Also, you may need to make sure your kernel has the SCSI
> support modules
> loaded...


Yup, got that covered.

>
> Do what I do...don't buy Seagate drives ;-)

$4.00, new in box with a write-protect jumper.  I didn't realize I could
cook on the damn thing while it was running.  And the noiseoi!

>
> IIRC, there are some usermode programs to do this sort of
> thing with SCSI
> drives.  I don't remember off-hand what the programs called,
> but a bit of
> searching should turn up something.  You might also take a
> look at noflushd:
> http://freshmeat.net/projects/noflushd/


Will do!



Thanks!

Tony


___
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user



Re: [Leaf-user] A small snippet of code for review

2001-07-09 Thread Charles Steinkuehler

> I apologize in advance for posting something that is probably more of
> use in the developer's list, but I want the maximum eyeballs to look and
> tell me a few things.
>
> First, can anyone tell me if this code depends on libraries that have
> been removed from LEAF?  I am running the pre-release EigerStien 2.2.19
> copy.  When I compile this code on a Debian development box, it seems to
> run OK, then when I move it to the router, it gives me a segmentation
> fault.  I can't even get it to tell me how to use it (i.e. #:sdmotor )
> without it dieing.

To see which libraries you need, run:

ldd sdmotor

on your debin box.  Since you're program's crashing (not generating an error
about a missing library), you probably are linking against the wrong version
of the standard C library.  Are you compiling on Debian 2.1?

Also, you may need to make sure your kerel has the SCSI support modules
loaded...

> Second, has anyone a better way to spin down a SCSI drive that throws
> heat like the sun?  I have a full-size Seagate that has a whine worse
> than my wife, and throws heat like a bastard.  After I load from the
> drive, I want to power it down.  Any suggestions?

Do what I do...don't buy Seagate drives ;-)

IIRC, there are some usermode programs to do this sort of thing with SCSI
drives.  I don't remember off-hand what the programs called, but a bit of
searching should turn up something.  You might also take a look at noflushd:
http://freshmeat.net/projects/noflushd/

Charles Steinkuehler
http://lrp.steinkuehler.net
http://c0wz.steinkuehler.net (lrp.c0wz.com mirror)


___
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user



[Leaf-user] A small snippet of code for review

2001-07-08 Thread Tony

I apologize in advance for posting something that is probably more of
use in the developer's list, but I want the maximum eyeballs to look and
tell me a few things.

First, can anyone tell me if this code depends on libraries that have
been removed from LEAF?  I am running the pre-release EigerStien 2.2.19
copy.  When I compile this code on a Debian development box, it seems to
run OK, then when I move it to the router, it gives me a segmentation
fault.  I can't even get it to tell me how to use it (i.e. #:sdmotor )
without it dieing.

Second, has anyone a better way to spin down a SCSI drive that throws
heat like the sun?  I have a full-size Seagate that has a whine worse
than my wife, and throws heat like a bastard.  After I load from the
drive, I want to power it down.  Any suggestions?


Thanks in advance

Tony



>/*
> * sdmotor - start/stop scsi drive spindle
> */
>
>#include   
>#include   
>#include   
>#include   
>#include   
>
>struct s {
>   int inlen,
>   outlen;
>   charcdb[6];
>};
>
>main( int argc, char *argv[])
>{
>   struct sc;
>
>   memset( &c, 0, sizeof c);
>   c.cdb[0] = 0x1B;
>   if (argc != 2)
>   return (usage( ));
>   if (strcmp( argv[1], "start") == 0)
>   c.cdb[4] = 1;
>   else if (strcmp( argv[1], "stop") != 0)
>   return (usage( ));
>   if (ioctl( 0, SCSI_IOCTL_SEND_COMMAND, &c) == 0)
>   return (0);
>   fprintf( stderr, "ioctl failed (%s)\n", strerror( errno));
>   return (1);
>}
>
>usage( )
>{
>
>   fprintf( stderr, "usage: sdmotor { start | stop }\n");
>   return (2);
>}


___
Leaf-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-user