RE: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread Pegasus Mc Cleaft


> -Original Message-



> tar: Damaged tar archive
> tar: Retrying...
> tar: gzip decompression failed
> tar: Error exit delayed from previous errors.
> # gzip --test sr12292011.tar.gz
> gzip: data stream error
> gzip: sr12292011.tar.gz: uncompress failed # gunzip < sr12292011.tar.gz
> > archive.partial.tar
> gunzip: data stream error
> 
> It recreates something, but the most important files, which reside in
> subfolders of the given tar.gz archives are gone, i.e. the subfolders
> are empty.
> The gunzip strategy you mentioned yields the same as a regular tar -xvf
> file.tar.gz.
> 
> Pegasus, I have yet to try the pax(1) approach. I will let you know
> about how that went.

Hum.. I'm not sure if pax will be able to help in this case. From the
looks of it, somehow the compressed data got corrupted - I don't think pax
will be able to deal with this any better than tar did. 

I wonder if there was a change in gzip (like maybe libarchive) between the
two versions of BSD that might be causing the problem. If I were attacking
the problem, I might try booting up off a 7.x bootcd and see if I can gzip
--test the archive from the usb stick. 

Peg


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread Pegasus Mc Cleaft
Hi, 

It would depend, I think, on how the file is corrupted.  Is it the
compressed data that is corrupted or the uncompressed tar stream?  You might
want to try the pax(1) utility to see if it is able to push through the
errors (if its in the tar stream). 

I was able to recover data from a corrupted cpio file that I created
(I was using huge file lengths and didn't realize that cpio had a file size
limit). 

Peg

> -Original Message-
> From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
> questi...@freebsd.org] On Behalf Of _
> Sent: 14 February 2012 01:57
> To: freebsd-questions@freebsd.org
> Subject: corrupted tar.gz archive - I lost my backups :)/:(
> 
> Hi,
> 
> Before making the move from 7.0 to 8.2, I ran a little script that did a
> backup of selected files and folders.
> 
> Trying to recover these files on 8.2, I found that some of the archives
> - unfortunately those with the files that are dear to me - are
> corrupted.
> 
> In other words, I just wanted to ask if there's anyone on here, who
> knows of a good repair utility for corrupted tar.gz archives?
> 
> Thanks
> 
> pancakeking79
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-
> unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: ATA trouble again

2011-11-16 Thread Pegasus Mc Cleaft
>Hello.
>
>This is a follow-up of a previous thread, which can be found here:
>
>> http://lists.freebsd.org/pipermail/freebsd-questions/2011-July/232257.
>> html
>
>
>
>I finally have two working WD Green drives: they have run severel times
>for more than a few days continuosly and I've run their full diags
>a few times over a span of some weeks, so I think I can be sure of that.
>Still I experience lot of troubles; however, trying different boxes, 
>I found out that these depend heavily on the controller I use.

Hi Andrea, 
I don’t know if this will help you or not, but it may lead you to
another possibility. 

I had a similar problem on my box (I was running 9.0-Current and 
Now 10.0-Current). I was also running under ZFS and would get TONS of 
Errors across my SATA drives. The errors would be anything from time-outs
to physical locking of the drive (I would have to pull the drive to let
the PHY on the controller reset and then plug the drive back in before
it would communicate with the machine again). In particular this would
happen when I was doing large writes to the drives. Read performance 
also suffered. I then created a single drive pool and did a large
transfer to the drive (about 800Gb) and the controller timed out again.
I moved the drive to various ports on the machine and also various
controllers in the machine. Some seemed to exabate the problem quicker
but no port or drive was safe from this. 

I later found out that the drives I was using were using 4096
Bytes per sector. When I recreated the zpool using 4096 byte sectors
All the timeout errors disappeared and my data-rate has climbed
Dramatically. 


Are you using ZFS or do you know if the drives are using 4096 bytes
Per sector?

Ta
Peg


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dennis Ritchie has died. A suggestion

2011-10-14 Thread Pegasus Mc Cleaft
On Friday 14 October 2011 00:46:43 Chip Camden wrote:
> > > Alternatively, an tribute on the FreeBSD website would be fitting,
> > > wouldn't it?
> > > 
> > > Roland
> > 
> > I think this would be a fitting tribute...
> 
> Hear, hear!

A good friend of mine posted to me, I think, one of the best tributes:

printf("goodbye, dad.\n");

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Blacklisting DOS IPs

2011-09-21 Thread Pegasus Mc Cleaft
On Wednesday 21 September 2011 14:06:08 Mauricio López wrote:

> I'm thinking about making an script using awk and pftop output to watch
> for states that have more than 1Mb of traffic (regular DNS queries
> aren't that big) and put those hosts in a table for blocking. My
> question is if it is there some other more efficient solution for this
> problem.
> 
> Thanks in advance

Hi Mauricio, 

I dont know if this will help you, but this is a script I made years 
ago 
that I use on my machines. I call the script using cron once a day and let 
IPFW do the filtering for me

HTH
Peg


#!/bin/sh

#automatically fetch the spamhaus zone ban list

 cd /root
 /usr/bin/fetch http://www.spamhaus.org/drop/drop.lasso

#Let drop all of set 11 from the firewall
/sbin/ipfw delete set 11

#Starting Rule Number
Counter=1000

#lets parse the file and cut out the piece we want
for i in `cut -d " " -f 1 drop.lasso | grep -v ";"`
do
echo "Adding rule for: $i "
Counter=`expr $Counter + 1`
##Lets add the rule into set 11
/sbin/ipfw add $Counter set 11 deny ip from $i to any
Counter=`expr $Counter + 1`
/sbin/ipfw add $Counter set 11 deny ip from any to $i
done

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: FBSD 8.2 and USB Floppies

2011-07-18 Thread Pegasus Mc Cleaft
On Monday 18 July 2011 19:45:27 James Colannino wrote:
> 
> newfs /dev/da0
> 
> It was successful.  I then tried to mount the new filesystem (mount
> /dev/da0 /mnt), and got the same error: invalid argument.  Does FBSD
> have a problem mounting USB floppy disks?  It's not a big deal, as my
> other USB storage devices seem to work, and as I have an ordinary floppy
> drive I can try, but that curious part of me wants to know why this
> isn't working.
> 

 Have you tried: 

mount_msdosfs /dev/da0 /mnt

Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: httpd-modsec2_debug.log: Operation not permitted

2011-01-14 Thread Pegasus Mc Cleaft
>> ... I believe rm (-f) still requires *SOME* free space on a device
>> to delete something. That being said, do you have more then 50G
>> free elsewhere on the system? Say /home (/usr/home)? If you do, mv
>> the file from /var/log to /usr/home. This would effectively delete
>> it from /var/log and free up it's space ...
>
>Er, had you considered that mv, when the target and source are on
>different filesystems, does a cp followed by an rm?  If rm requires
>free space -- which I very much doubt on UFS unless a snapshot
>exists -- the rm step of the mv is going to run into exactly the
>same problem that the standalone rm runs into.

If this is the case, what about just using truncate to set the file size to
zero?
truncate -s 0K httpd-modsec2_debug.log

Or

cat /dev/null > httpd-modsec2_debug.log


Best regards, 
Peg

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: cpio misunderstanding?

2010-12-24 Thread Pegasus Mc Cleaft
> If I try to run it manually on one of the files that fails, I get this:
> 
> slug# echo "/usr/local/freesbie-fs/libexec/ld-elf.so.1" | cpio -dump -l -v
> /usr/local/freesbie-clone
> 
> /usr/local/freesbie-clone/usr/local/freesbie-fs/libexec/ld-elf.so.1
> 
> cpio: Can't create '/usr/local/freesbie-clone/usr/local/freesbie-
> fs/libexec/ld-elf.so.1': Operation not permitted
> 0 blocks
> 
> 
> I can use cp to copy the file, so I don't understand what's going on here.
> Does anyone have any ideas?

I don't know if this is your problem, but whenever I see that 
"Operation 
not permitted" error I start to suspect file flags. You might want to check 
for extra flags put on the source file or destination directory and see if 
anything weird had been set on it. 

You can look at the flags with the command "ls -lao". You may also want 
to do a "man chflags" and read the manual page there. 

~Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: removing files

2010-11-07 Thread Pegasus Mc Cleaft
On Monday 08 November 2010 06:10:20 yoganjaneyulu kasetti wrote:
> hi,
> 
> I have a problem for deleting files using scriptplease some one can
> guide me for the same.
> 
> I have some files with the extension of ".chk" extension along with the
> extension of ".log" and ".gjf" extension in the folder called different
> *input folders. *I wanted to delete the ".chk" file extension having
> files. If i go to individual input folder manually i can delete the file
> with *rm* command line by but i would like to delete all the ".chk" files
> extension files at a time through scripting rather than manual. So please
> some one help me for the same.
> /student/sweety/gaussiandata/*1249624064640*/input
> 

Could you, in your script do something like: 

cd /Path_to_Data_Root
find . -name "*.chk" -print -prune -exec rm -rf {} \;

Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: BSD logo

2010-07-26 Thread Pegasus Mc Cleaft

> > By the way . . . while I think a BelssedBSD fork is a ridiculous idea,
> > the name "BlessedBSD" is *brilliant*.  Pronouncing it aloud makes the
> > high-quality pun buried in the name more obvious, for those who didn't
> > quite catch it on the first read-through.
> 
> i agree. lovely name. the pagan connection is delectable.
> http://is.gd/dJRn3
> 
After the install, does it say SoMoteItBSD?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: reliable rs-232

2010-04-11 Thread Pegasus Mc Cleaft
On Saturday 10 April 2010 13:41:33 Grzegorz Daniluk wrote:
> Hi everybody,
> I have a question regarding rs-232 under FreeBSD.
> I need to write an application for FreeBSD to operate an industrial
> controller via rs-232. The trick is that it should have very good long
> term stability (reliably operation over years). It should be able to
> detect and correct (e.g by reconfiguration of rs-232 port parameters)
> when rs-232 hangs or changes its transmission parameters as a result of
> electrical interference/disturbances etc. First thought is to simply
> close and reopen rs-232 port every given time interval, so even if
> something 'strange' happens the failure would be fixed after finite time
> period. But maybe there is smarter way of doing that. Maybe some special
> fault-tolerant rs-232 kernel drivers ?
> Any help appreciated, maybe someone has other helpful advieces regarding
> reliable rs-232 programming ini general ?

Hi Grzegorz, 

I dont think you are going to find anything that is classified as 
fault 
tolerant RS-232.  My experience with 232 in industrial environments has been 
met with various levels of success. In small controlled conditions it works 
OK, but you are limited to speed and distance. Further, the single ended 
nature of 232 and the high input impedance of the receivers make it not the 
best choice for electrical interference rejection. If you have control of the 
electrical specifications, you might be better off using RS-422 as it is 
designed differentially and with a low impedance, so it works well in 
electrically nasty environments. All the better if you can opto-isolate the 
line drivers/receivers on the transmission line side of the interface. 

In one application, I designed a RS-232 to fibre-optic interface using 
S/Pdif transceivers and a 555 as a PWM generator/detector. This worked 
wonderfully for electrical isolation between the PC and the CNC motion 
controller I was interfacing to. I have seen similar things sold as a ready 
made brick that you could just plug in and use. 

Making the machine and PC "Fail to a safe condition" is not something 
you 
should design into the rs-232 interface directly, in my opinion. You should 
have a upper layer protocol bouncing between the two points and if this 
protocol times-out, then you should assume the interface of the remote device 
has failed and take action in your software (on both sides). In the case of 
the fibre connection, I added in addition to the protocol checks, a carrier 
detect circuit where if the link failed between the two machines, it dropped 
out a relay that was wired to the E-Stop circuit. 

I hope some of this is helpfull... 

Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


SSL / SSH choosing hardware accelerator first

2010-04-09 Thread Pegasus Mc Cleaft
Hello group, 

 

I am currently running FreeBSD 9-Current AMD64. I have a
Hifn crypto accelerator installed in the machine. I have noticed that when I
connect to the machine using SSH, it does not use the crypto hardware. There
was a patch that someone made that forced SSL to use the hardware by
default, but I was wondering if there was a way to do this in
userland/configuration?  It would be nice to have the hardware accelerated
cryptography used as first priority before deciding to use the software
emulated modes. Does anyone know how this can be done?

 

Peg

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Compiling kernel with gcc43 [SOLVED]

2010-04-01 Thread Pegasus Mc Cleaft
On Thursday 01 April 2010 15:27:41 Oliver Fromme wrote:
> Mario Lobo  wrote:
>  > [...]
>  > It's compiling right now.
>  >
>  > I'll post my findings and impressions on results and performance right
>  > after the next reboot.
> 
> So, how is it going?  Any benchmarks yet?  I'm curious
> if the new gcc version will really make a significant
> difference.

I would love to see the /etc/make.conf,  /etc/src.conf and 
/etc/libmap.conf files that were used for the build. I have tried compiling in 
VBox a current kernel and world, but it usually just bombs out for me. I would 
like to give this a go as well. 

Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"