FreeBSD 8, serial console problem

2010-03-22 Thread Brian Wolman
FreeBSD 8 uses the uart system to handle serial consoles, I changed mine
over and I've been running into problems since.

I have serial console access during the loader and boot process, but it
freezes right after boot and posting of the date:

Mon Mar 22 22:18:08 EDT 2010

Well, the kernel still outputs to the console, as evident when I plugged
in a keyboard into the usb slot:

ugen1.2:  at usbus1
uhub5:  on usbus1
(server.example.com) (ttyu0)

login: uhub5: 4 ports with 2 removable, bus powered

I typed 'root' and then it froze. Again, I plugged in the keyboard, but
this time I couldn't type anything despite getting another login prompt.
I even echoed to the console and it worked. Finally I typed kldload uart
into my ssh terminal and poof:

FreeBSD/i386 o(server.example.com) (ttyu0)
u
login: jhlgf

e_register: module isa/uart already exists!
Module isa/uart failed to register: 17
module_register: module pci/uart already exists!
Module pci/uart failed to register: 17

I was able to login and everything worked fine.
Notice how uart already exists.. it's compiled into the kernel. Right
now the only way I've come up with to fix my broken console is to
kldload, but I can only do it once per boot. If it breaks after that,
I'm out of luck until I reboot.
___
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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

Oh , thanks Adam , i shouldn't be so lazy , I'll check that page.

Adam Vande More wrote:
On Mon, Mar 22, 2010 at 6:47 PM, Aaron Lewis 
mailto:aaron.lewis1...@gmail.com>> wrote:


Looks like i found the problem , i thought i've made a mistake.

I shouldn't use `pw user add aaron' right ?
That won't create user home directory , when i found i've got no
home directory.
So at that time , i created it and change the owner to my user.

$ sudo tail -f /var/log/auth.log
login: _secure_path: cannot stat /home/frozen/.login_conf:
Permission denied   // Strange , pay attention to user permissions
below
 
// I don't

know why `stat' function fails ..

$ ls -ld /home/frozen
drwxr-xr-x  3 frozen  frozen  512 Mar  5 22:36 /home/frozen/
$ ls -lah /home/frozen/.login_conf
-rw-r--r--  1 frozen  frozen  171 Dec  3 14:34
/home/frozen/.login_conf

BTW: ssh login with user frozen is fine.


Maybe you could bottom post? Thanks,

http://www.freebsd.org/doc/handbook/mac-troubleshoot.html

--
Adam Vande More



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Alberto Mijares
On Mon, Mar 22, 2010 at 4:52 PM, Jerry  wrote:
> On Mon, 22 Mar 2010 16:00:17 -0430
> Alberto Mijares  articulated:
>
>> As I see it, FreeBSD is, in fact, a DNS server or a mail server by
>> default, between others and if I want. And since Postfix has some
>> limitations vs. Sendmail, I'm glad that is sendmail the choice of
>> FreeBSD.
>>
>> I also must say that I frecuently use Postfix for Mail Servers, if I
>> don't need exotic features.
>
> Out of morbid curiosity, what limitations and exotic features?
>
> --
> Jerry



Hi Jerry,

You can achieve some kind of dynamic rules by using "lookup tables" or
the pipe(8) daemon in Postfix. However, Sendmail has many more
predefined macros, which can be used in rule sets for handle dynamic
routing, headers-rewrites, queues, milters, MDA's, etc, for example.
That's what I meant when said "limitations and exotic features". Not
saying that Postfix is "bate quebrado" ;-)

Without being a fan, I rise the flag for Postfix; I just know the
power of Sendmail too.

Best regards


Alberto Mijares
___
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: Flash sometimes freezes firefox, also many npviewer.bin processes left running around

2010-03-22 Thread Steve Franks
/usr/ports/www/xpi-noscript is another option, not without caveats...

Steve


On Thu, Mar 18, 2010 at 6:47 PM, Yuri  wrote:
> Sometimes after some flash object is displayed firefox gets frozen for many
> few seconds,maybe ~20sec.
> Do you see the same? Is there anyfix for this?
>
> In additions I have 54 processes like this one
> 50006  ??  I      0:00.00
> /usr/local/lib/nspluginwrapper/i386/linux/npviewer.bin --plugin
> /usr/local/lib/linux-mozilla/plugins/libflashplayer.so --connection
> hanging around even after firefox process exits.
>
> linux-f10-flashplugin-10.0r45
> nspluginwrapper-1.2.2_5
> firefox-3.5.8,1
>
> Yuri
> ___
> 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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Adam Vande More
On Mon, Mar 22, 2010 at 6:47 PM, Aaron Lewis wrote:

> Looks like i found the problem , i thought i've made a mistake.
>
> I shouldn't use `pw user add aaron' right ?
> That won't create user home directory , when i found i've got no home
> directory.
> So at that time , i created it and change the owner to my user.
>
> $ sudo tail -f /var/log/auth.log
> login: _secure_path: cannot stat /home/frozen/.login_conf: Permission
> denied   // Strange , pay attention to user permissions below
>
>   // I don't know why `stat'
> function fails ..
>
> $ ls -ld /home/frozen
> drwxr-xr-x  3 frozen  frozen  512 Mar  5 22:36 /home/frozen/
> $ ls -lah /home/frozen/.login_conf
> -rw-r--r--  1 frozen  frozen  171 Dec  3 14:34 /home/frozen/.login_conf
>
> BTW: ssh login with user frozen is fine.
>
>
Maybe you could bottom post? Thanks,

http://www.freebsd.org/doc/handbook/mac-troubleshoot.html

-- 
Adam Vande More
___
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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

Looks like i found the problem , i thought i've made a mistake.

I shouldn't use `pw user add aaron' right ?
That won't create user home directory , when i found i've got no home 
directory.

So at that time , i created it and change the owner to my user.

$ sudo tail -f /var/log/auth.log
login: _secure_path: cannot stat /home/frozen/.login_conf: Permission 
denied   // Strange , pay attention to user permissions below

   // I don't know why 
`stat' function fails ..


$ ls -ld /home/frozen
drwxr-xr-x  3 frozen  frozen  512 Mar  5 22:36 /home/frozen/
$ ls -lah /home/frozen/.login_conf
-rw-r--r--  1 frozen  frozen  171 Dec  3 14:34 /home/frozen/.login_conf

BTW: ssh login with user frozen is fine.


Matthew Seaman wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/03/2010 12:46:06, Aaron Lewis wrote:
  

Matthew Seaman wrote:


On 22/03/2010 07:11:23, Aaron Lewis wrote:
 
  

Hello BSD hackers,
   I have a strange problems with user's home directory , if i log in
through ssh , everything's fine.
   But on virtual terminals , it tolds me:

   no home directory
   Logging in with home dir "/"

   Does anyone has any ideas ?


   Here's some debug information
=
%> grep aaron /etc/passwd
aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash

%> ls -ladh /home/aaron/
drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron




What are the settings for

ChallengeResponseAuthentication
UsePam

in your /etc/ssh/sshd_config?
  
  

Nothing found , or commented out.



Commented out means using the default setting -- which is 'yes' for both
of those.  ie. sshd is using the PAM system.  Which means that PAM is
probably working just fine.

  

What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?
  
  

# grep -v -e "^#" /etc/pam.d/sshd | sed '/^$/d'
authsufficientpam_opie.sono_warn no_fake_prompts
authrequisitepam_opieaccess.sono_warn allow_local
authrequiredpam_unix.sono_warn try_first_pass
accountrequiredpam_nologin.so
accountrequiredpam_login_access.so
accountrequiredpam_unix.so
sessionrequiredpam_permit.so
passwordrequiredpam_unix.sono_warn try_first_pass



These are also the default settings for sshd -- which as you say is working.

  

# grep -v -e "^#" /etc/pam.d/login  | sed '/^$/d'
authsufficientpam_self.sono_warn
authincludesystem
accountrequisitepam_securetty.so
accountrequiredpam_nologin.so
accountincludesystem
sessionincludesystem
passwordincludesystem



Again, this is the default for login.   I should have asked you for the
contents of /etc/pam.d/system as well, but if you say it's not been
modified I'll believe you.  H...

  

It's all fresh install , did i do something wrong ? It's really strange
.. never met before.



Something is a bit fubar somewhere, yes.  From the symptoms you
described,  the immediate suspect would be the PAM system, but there are
no obvious configuration problems with what you've shown me.

Is there anything notable in /var/log/auth.log from the failed console
logins?  Can you try gratuitously creating another user account and
seeing if that is affected in the same way, or indeed if it makes any
difference to the original user account?

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard

  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkunhDoACgkQ8Mjk52CukIwzBQCfccc1KXwscGDrHV2wn5Zr8xnO
pMAAnjJVpjZc39wczR4u8nYo/Kxpvivl
=3oJZ
-END PGP SIGNATURE-
  



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread Rick Macklem



On Mon, 22 Mar 2010, John Baldwin wrote:


It looks like it also returns ESTALE when the inode is invalid (<
ROOTINO || > max inodes?) - would an unlinked file in FFS referenced at
a later time report an invalid inode?



I'm no ufs guy, but the only way I can think of is if the file system
on the server was newfs'd with fewer i-nodes? (Unlikely, but...)
(Basically, it is safe to return ESTALE for anything that is not
 a transient failure that could recover on a retry.)


But back to your point, zfs_zget() seems to be failing and returning the
EINVAL before zfs_fhtovp() even has a chance to set and check zp_gen.
I'm trying to get some more details through the use of gratuitous
dprintf()'s, but they don't seem to be making it to any logs or the
console even with vfs.zfs.debug=1 set.  Any pointers on how to get these
dprintf() calls working?


I know diddly (as in absolutely nothing about zfs).


That I have no idea on.  Maybe Rick can chime in?  I'm actually not sure why
we would want to treat a FHTOVP failure as anything but an ESTALE error in the
NFS server to be honest.

As far as I know, only if the underlying file system somehow has a 
situation where the file handle can't be translated at that point in time, 
but could be able to later. I have no idea if any file system is like that 
and I don't such a file system would be an appropriate choice for an NFS 
server, even if such a beast exists. (Even then, although FreeBSD's client 
assumes EIO might recover on a retry, that isn't specified in any RFC, as 
far as I know.)


That's why I proposed a patch that simply translates all VFS_FHTOVP()
errors to ESTALE in the NFS server. (It seems simpler than chasing down 
cases in all the underlying file systems?)


rick, chiming in:-)

___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Gary Gatten
Holy $hit! I think someone just admitted they weren't all knowing!  This is yet 
another sign of the pending apocolypse!

- Original Message -
From: owner-freebsd-questi...@freebsd.org 
To: freebsd-questions@freebsd.org 
Sent: Mon Mar 22 18:09:15 2010
Subject: Re: Spamassasin, sendmail, Postfix


On Mar 22, 2010, at 4:39 PM, Jerry wrote:

> On Mon, 22 Mar 2010 15:51:01 -0600
> Dan Busarow  articulated:
>
>>
>> On Mar 22, 2010, at 3:22 PM, Jerry wrote:
>>
>>> On Mon, 22 Mar 2010 16:00:17 -0430
>>> Alberto Mijares  articulated:
>>>
 As I see it, FreeBSD is, in fact, a DNS server or a mail server by
 default, between others and if I want. And since Postfix has some
 limitations vs. Sendmail, I'm glad that is sendmail the choice of
 FreeBSD.

 I also must say that I frecuently use Postfix for Mail Servers, if
 I don't need exotic features.
>>>
>>> Out of morbid curiosity, what limitations and exotic features?
>>
>> UUCP for one.
>>
>> I *think* you can also get sendmail to do other transports via
>> mailertable that would not be possible with postfix.  Example, an
>> scp to another server that doesn't have an MTA running.
>
> Is this what you are referring to:
>
> http://www.postfix.org/UUCP_README.html

Well I'll be.  I didn't think postfix would do UUCP.  I stand corrected.

Dan




>
> --  
> Jerry
> freebsd.u...@seibercom.net
>
> Disclaimer: off-list followups get on-list replies or get ignored.
> Please do not ignore the Reply-To header.
> __
>
> The only person who always got his work done by Friday was Robinson
> Crusoe.
> ___
> 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"








"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Dan Busarow


On Mar 22, 2010, at 4:39 PM, Jerry wrote:


On Mon, 22 Mar 2010 15:51:01 -0600
Dan Busarow  articulated:



On Mar 22, 2010, at 3:22 PM, Jerry wrote:


On Mon, 22 Mar 2010 16:00:17 -0430
Alberto Mijares  articulated:


As I see it, FreeBSD is, in fact, a DNS server or a mail server by
default, between others and if I want. And since Postfix has some
limitations vs. Sendmail, I'm glad that is sendmail the choice of
FreeBSD.

I also must say that I frecuently use Postfix for Mail Servers, if
I don't need exotic features.


Out of morbid curiosity, what limitations and exotic features?


UUCP for one.

I *think* you can also get sendmail to do other transports via
mailertable that would not be possible with postfix.  Example, an
scp to another server that doesn't have an MTA running.


Is this what you are referring to:

http://www.postfix.org/UUCP_README.html


Well I'll be.  I didn't think postfix would do UUCP.  I stand corrected.

Dan






--  
Jerry

freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

The only person who always got his work done by Friday was Robinson
Crusoe.
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Jerry
On Mon, 22 Mar 2010 15:51:01 -0600
Dan Busarow  articulated:

> 
> On Mar 22, 2010, at 3:22 PM, Jerry wrote:
> 
> > On Mon, 22 Mar 2010 16:00:17 -0430
> > Alberto Mijares  articulated:
> >
> >> As I see it, FreeBSD is, in fact, a DNS server or a mail server by
> >> default, between others and if I want. And since Postfix has some
> >> limitations vs. Sendmail, I'm glad that is sendmail the choice of
> >> FreeBSD.
> >>
> >> I also must say that I frecuently use Postfix for Mail Servers, if
> >> I don't need exotic features.
> >
> > Out of morbid curiosity, what limitations and exotic features?
> 
> UUCP for one.
> 
> I *think* you can also get sendmail to do other transports via  
> mailertable that would not be possible with postfix.  Example, an
> scp to another server that doesn't have an MTA running.

Is this what you are referring to:

http://www.postfix.org/UUCP_README.html

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

The only person who always got his work done by Friday was Robinson
Crusoe.
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Dan Busarow


On Mar 22, 2010, at 3:22 PM, Jerry wrote:


On Mon, 22 Mar 2010 16:00:17 -0430
Alberto Mijares  articulated:


As I see it, FreeBSD is, in fact, a DNS server or a mail server by
default, between others and if I want. And since Postfix has some
limitations vs. Sendmail, I'm glad that is sendmail the choice of
FreeBSD.

I also must say that I frecuently use Postfix for Mail Servers, if I
don't need exotic features.


Out of morbid curiosity, what limitations and exotic features?


UUCP for one.

I *think* you can also get sendmail to do other transports via  
mailertable that would not be possible with postfix.  Example, an scp  
to another server that doesn't have an MTA running.



Dan



--
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

Small is beautiful.

Schumacher's Dictum
___
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: Patch Submission to a Port

2010-03-22 Thread Charlie Kester

On Mon 22 Mar 2010 at 15:08:43 PDT Charlie Kester wrote:

On Mon 22 Mar 2010 at 14:50:03 PDT Alejandro Imass wrote:

Hi,

I have finally tested and verified a patch for /usr/ports/graphics/sane-backends

To whon or where should I submit it?



http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-submitting.html



Sorry, wrong link.  That one's for submitting new ports.  Here's one for
the section of the handbook that describes how to submit a patch:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/port-upgrading.html

___
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: diskless & dhclient

2010-03-22 Thread Erik Norgaard

On 22/03/10 21:35, Mats Lindberg wrote:


I've tried to get my freebsd diskless system to get hold of some of the
dhcp-options.
E.g. my dhcp-server will always be the nfs-server as well. So I was hoping
to create the /etc/fstab with the the dhcpd's ip as the nfs server.
Thus not needing to have the hard coded nfsroot:/conf/'ip-address'/etc.
Instead i'm looking for having almost all necessary files in the
nfsroot:/conf/base/etc directory.


you only need /conf/'ip-address' if you need different configurations 
for different clients. The ip-address is that of the diskless client, 
not the server.



I've tried to set ifconfig_ETHDEV="DHCP" in /etc/rc.conf and creating a
bourne shell script /etc/dhclient_enter_hooks, but as far as I can detect
the script is never run.

I guess since the kernel already got the ip-address during pxeboot it does
not care about renewing the ip-address, or??


No, when the client detects it is a diskless client, 
/etc/rc.initdiskless is executed. See documentation in that file. 
Anyway, iirc you can find the dhcp options with kenv(1).


BR, Erik

--
Erik Nørgaard
Ph: +34.666334818/+34.915211157  http://www.locolomo.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: Patch Submission to a Port

2010-03-22 Thread Charlie Kester

On Mon 22 Mar 2010 at 14:50:03 PDT Alejandro Imass wrote:

Hi,

I have finally tested and verified a patch for /usr/ports/graphics/sane-backends

To whon or where should I submit it?



http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-submitting.html

___
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: Patch Submission to a Port

2010-03-22 Thread Alberto Mijares
> I have finally tested and verified a patch for 
> /usr/ports/graphics/sane-backends
>
> To whon or where should I submit it?
>


There's no specific maintainer for this port. Write to
po...@freebsd.org and submit the patch.

Regards


Alberto Mijares
___
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"


Patch Submission to a Port

2010-03-22 Thread Alejandro Imass
Hi,

I have finally tested and verified a patch for /usr/ports/graphics/sane-backends

To whon or where should I submit it?

Thanks in advance,
Alejandro Imass
___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread Steve Polyack

On 03/22/10 13:39, John Baldwin wrote:

On Monday 22 March 2010 12:44:04 pm Steve Polyack wrote:
   

On 03/22/10 12:00, John Baldwin wrote:
 

On Monday 22 March 2010 11:47:43 am Steve Polyack wrote:

   

On 03/22/10 10:52, Steve Polyack wrote:

 

On 3/19/2010 11:27 PM, Rick Macklem wrote:

   

On Fri, 19 Mar 2010, Steve Polyack wrote:

[good stuff snipped]

 

This makes sense.  According to wireshark, the server is indeed
transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE
instead; it sounds more correct than marking it a general IO error.
Also, the NFS server is serving its share off of a ZFS filesystem,
if it makes any difference.  I suppose ZFS could be talking to the
NFS server threads with some mismatched language, but I doubt it.


   

Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
ESTALE when the file no longer exists, the NFS server returns whatever
error it has returned.

So, either VFS_FHTOVP() succeeds after the file has been deleted, which
would be a problem that needs to be fixed within ZFS
OR
ZFS returns an error other than ESTALE when it doesn't exist.

Try the following patch on the server (which just makes any error
returned by VFS_FHTOVP() into ESTALE) and see if that helps.

--- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
+++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
@@ -1127,6 +1127,8 @@
   }
   }
   error = VFS_FHTOVP(mp,&fhp->fh_fid, vpp);
+if (error != 0)
+error = ESTALE;
   vfs_unbusy(mp);
   if (error)
   goto out;

Please let me know if the patch helps, rick



 

The patch seems to fix the bad behavior.  Running with the patch, I
see the following output from my patch (return code of nfs_doio from
within nfsiod):
nfssvc_iod: iod 0 nfs_doio returned errno: 70

Furthermore, when inspecting the transaction with Wireshark, after
deleting the file on the NFS server it looks like there is only a
single error.  This time there it is a reply to a V3 Lookup call that
contains a status of "NFS3ERR_NOENT (2)" coming from the NFS server.
The client also does not repeatedly try to complete the failed request.

Any suggestions on the next step here?  Based on what you said it
looks like ZFS is falsely reporting an IO error to VFS instead of
ESTALE / NOENT.  I tried looking around zfs_fhtovp() and only saw
returns of EINVAL, but I'm not even sure I'm looking in the right place.

   

Further on down the rabbit hole... here's the piece in zfs_fhtovp()
where it's kicking out EINVAL instead of ESTALE - the following patch
corrects the behavior, but of course also suggests further digging
within the zfs_zget() function to ensure that _it_ is returning the
correct thing and whether or not it needs to be handled there or within
zfs_fhtovp().

---
src-orig/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 11:41:21.0 -0400
+++ src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 16:25:21.0 -0400
@@ -1246,7 +1246,7 @@
dprintf("getting %llu [%u mask %llx]\n", object, fid_gen,
 

gen_mask);
   

if (err = zfs_zget(zfsvfs, object,&zp)) {
ZFS_EXIT(zfsvfs);
-return (err);
+return (ESTALE);
}
zp_gen = zp->z_phys->zp_gen&   gen_mask;
if (zp_gen == 0)

 

So the odd thing here is that ffs_fhtovp() doesn't return ESTALE if
   

VFS_VGET()
   

(which calls ffs_vget()) fails, it only returns ESTALE if the generation
   

count
   

doesn't matter.


   

It looks like it also returns ESTALE when the inode is invalid (<
ROOTINO ||>  max inodes?) - would an unlinked file in FFS referenced at
a later time report an invalid inode?

But back to your point, zfs_zget() seems to be failing and returning the
EINVAL before zfs_fhtovp() even has a chance to set and check zp_gen.
I'm trying to get some more details through the use of gratuitous
dprintf()'s, but they don't seem to be making it to any logs or the
console even with vfs.zfs.debug=1 set.  Any pointers on how to get these
dprintf() calls working?
 

That I have no idea on.  Maybe Rick can chime in?  I'm actually not sure why
we would want to treat a FHTOVP failure as anything but an ESTALE error in the
NFS server to be honest.

   


I resorted to changing dprintf()s to printf()s.  The failure in 
zfs_fhtovp() is indeed from zfs_zget(), which fails right at the top 
where it calls dmu_bonus_hold():
Mar 22 16:55:44 zfs-dev kernel: zfs_zget(): dmu_bonus_hold() failed, 
returning err: 17
Mar 22 16:55:44 zfs-dev kernel: zfs_fhtovp(): zfs_zget() failed, bailing 
out with err: 17

errno 17 seems to map to EEXIST.

in zfs_zget():
err = dmu_bonus_hold(zfsvfs->z_os, obj_num, NULL, &db);
if (err) {
ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
printf("zfs_zget(): dmu_bonus_hold() 

Re: Spamassasin, sendmail, Postfix

2010-03-22 Thread Alejandro Imass
On Mon, Mar 22, 2010 at 5:22 PM, Jerry  wrote:
> On Mon, 22 Mar 2010 16:00:17 -0430
> Alberto Mijares  articulated:
>
>> As I see it, FreeBSD is, in fact, a DNS server or a mail server by
>> default, between others and if I want. And since Postfix has some
>> limitations vs. Sendmail, I'm glad that is sendmail the choice of
>> FreeBSD.
>>
>> I also must say that I frecuently use Postfix for Mail Servers, if I
>> don't need exotic features.
>
> Out of morbid curiosity, what limitations and exotic features?

Yes! Another Postfix fan! - or not...

>
> --
> Jerry
> freebsd.u...@seibercom.net
>
> Disclaimer: off-list followups get on-list replies or get ignored.
> Please do not ignore the Reply-To header.
> __
>
> Small is beautiful.
>
>        Schumacher's Dictum
> ___
> 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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Jerry
On Mon, 22 Mar 2010 16:00:17 -0430
Alberto Mijares  articulated:

> As I see it, FreeBSD is, in fact, a DNS server or a mail server by
> default, between others and if I want. And since Postfix has some
> limitations vs. Sendmail, I'm glad that is sendmail the choice of
> FreeBSD.
> 
> I also must say that I frecuently use Postfix for Mail Servers, if I
> don't need exotic features.

Out of morbid curiosity, what limitations and exotic features?

-- 
Jerry
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

Small is beautiful.

Schumacher's Dictum
___
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"


diskless & dhclient

2010-03-22 Thread Mats Lindberg
Hi all,
I've tried to get my freebsd diskless system to get hold of some of the
dhcp-options.
E.g. my dhcp-server will always be the nfs-server as well. So I was hoping
to create the /etc/fstab with the the dhcpd's ip as the nfs server.
Thus not needing to have the hard coded nfsroot:/conf/'ip-address'/etc.
Instead i'm looking for having almost all necessary files in the
nfsroot:/conf/base/etc directory.

I've tried to set ifconfig_ETHDEV="DHCP" in /etc/rc.conf and creating a
bourne shell script /etc/dhclient_enter_hooks, but as far as I can detect
the script is never run.

I guess since the kernel already got the ip-address during pxeboot it does
not care about renewing the ip-address, or??

I'm running a legacy FreeBSD 6.4.

So - not really a specific question, more like a cry for guidance - anyone?

/Mats
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Alberto Mijares
> Anyway, my point is that an Operating System should not impose a
> specific MTA by default, and let the installer chose their favorite
> MTA. From what I understand you can't even remove Sendmail from
> standard FBSD and must only be de-activated. I personally think that
> sucks (if it's true anyway). Note that it is not my intention to start
> a flame MTA-war here. I think that Sendmail is exclellent if you like
> it, but Postfix is excellent as well, and we should be eventually able
> to install FBSD with Postfix as default MTA.


I could be wrong, but I think you can build the world without sendmail
passing the propper flags to make. In the other hand, sendmail is a
piece of the operative system; so you could end up with some broken
features.

There are some other apps that belong to the OS as well, like bind9
for DNS, sh and csh for the shell and so on... It would be very
difficult to let the user choose their favorite applications in an OS
install.

As I see it, FreeBSD is, in fact, a DNS server or a mail server by
default, between others and if I want. And since Postfix has some
limitations vs. Sendmail, I'm glad that is sendmail the choice of
FreeBSD.

I also must say that I frecuently use Postfix for Mail Servers, if I
don't need exotic features. My point is that Sendmail doesn't hurt
anyone as part of the FreeBSD Operative System; unlike some Linux
based distros, which really impose default MTA's without the need.

Best regards.


Alberto Mijares
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Alejandro Imass
On Mon, Mar 22, 2010 at 3:33 PM, Ruben de Groot  wrote:
> On Mon, Mar 22, 2010 at 06:30:21AM -0700, Randal L. Schwartz typed:
>> > "Ruben" == Ruben de Groot  writes:
>>
>> Ruben> And sendmail does not? You obviously are biased.
>>
>> I had at least a decade of experience with sendmail before discovering
>> postfix.  And now I use postfix, and you can't *make* me use sendmail
>> again.
>
> I'm not making you use anything. Just commenting on your assessment that
> sendmail cannot do something, while I know it can.
>

As stated in my previous response I second Randal's opinion. I am sure
that sendmail can and in fact probably does do anything that Postfix
can do, nevertheless, there are core differences that make Postfix
(and for that matter QMail) a better choice for small to medium
implementations, in fact large ones, but I don't want to get into that
right now.

The main difference is that Sendmail and the vast majority of MTAs are
monolithic and usually very hard to configure. Postfix on the other
hand is a bunch of different programs (non-monolithic) and extremely
easy to configure. There is a lot of debate of which MTA model is
better in general, but I think that non-monolithic allow to play well
and integrate with almost anything and very easily, whereas in the
monolithic model you may even have to recompile to get something
simple working. Furthermore Sendmail's legacy configuration methods
via m4 are really hard for the non-experts and with all the
administration ordeals that a modern admin has to deal with, banging
your head with m4 and restarts is not very comforting. Again IMHO.
BTW, I think that Randal is more known as Perl guy, more than a
Linux-guy ;-)

Anyway, my point is that an Operating System should not impose a
specific MTA by default, and let the installer chose their favorite
MTA. From what I understand you can't even remove Sendmail from
standard FBSD and must only be de-activated. I personally think that
sucks (if it's true anyway). Note that it is not my intention to start
a flame MTA-war here. I think that Sendmail is exclellent if you like
it, but Postfix is excellent as well, and we should be eventually able
to install FBSD with Postfix as default MTA.


>> Of course I'm biased.  I prefer postfix now.
>
> Nice for you.
>
> ___
> 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"


Setting ucastrate in /etc/rc.conf

2010-03-22 Thread Christopher Theodore; RHODES

Hello;


$ uname -rs
FreeBSD 8.0-RELEASE-p2


I have setup ral0/wlan0 in /etc/rc.conf thusly:

   wlans_ral0="wlan0"
   create_args_wlan0="wlanmode sta mcastrate 54 ssid linksys channel 6"
   ifconfig_wlan0="inet 10.0.0.10 netmask 255.255.255.0"


This provides a working interface but ucastrate is not being set and I 
have to manually set it after I login with:


# ifconfig wlan0 ucastrate 54


How can I effectively set ucastrate in rc.conf?


Magnanimously,

Christopher Theodore
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Randal L. Schwartz
> "Ruben" == Ruben de Groot  writes:

Ruben> I'm not making you use anything. Just commenting on your assessment that
Ruben> sendmail cannot do something, while I know it can.

I never said it couldn't.  So let's not be making something up here.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Ruben de Groot
On Mon, Mar 22, 2010 at 06:30:21AM -0700, Randal L. Schwartz typed:
> > "Ruben" == Ruben de Groot  writes:
> 
> Ruben> And sendmail does not? You obviously are biased.
> 
> I had at least a decade of experience with sendmail before discovering
> postfix.  And now I use postfix, and you can't *make* me use sendmail
> again.

I'm not making you use anything. Just commenting on your assessment that
sendmail cannot do something, while I know it can.

> Of course I'm biased.  I prefer postfix now.

Nice for you.

___
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: 12 TB Disk In freebsd AMD 64 ?

2010-03-22 Thread Dan Naumov
MBR can only work with 2TB volumes, however, we are no longer limited
to MBR. With GPT, we can have really really big volumes. That being
said, I really don't think you should be using a single 12TB volume
with UFS, even if you have underlying redundancy provided by a
hardware raid device. Have you ever had to fsck a 2TB volume or
bigger? It's not fun. My recommendation would be to use ZFS. Use it to
manage your array and filesystems and use it on top of individual raw
disk devices, if you must use your raid controller, use it in JBOD
mode.

If you want a relatively technical introduction to ZFS and why it's
good for you, read up here:
http://www.slideshare.net/relling/zfs-tutorial-usenix-june-2009

- Sincerely,
Dan Naumov
___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread John Baldwin
On Monday 22 March 2010 12:44:04 pm Steve Polyack wrote:
> On 03/22/10 12:00, John Baldwin wrote:
> > On Monday 22 March 2010 11:47:43 am Steve Polyack wrote:
> >
> >> On 03/22/10 10:52, Steve Polyack wrote:
> >>  
> >>> On 3/19/2010 11:27 PM, Rick Macklem wrote:
> >>>
>  On Fri, 19 Mar 2010, Steve Polyack wrote:
> 
>  [good stuff snipped]
>   
> > This makes sense.  According to wireshark, the server is indeed
> > transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE
> > instead; it sounds more correct than marking it a general IO error.
> > Also, the NFS server is serving its share off of a ZFS filesystem,
> > if it makes any difference.  I suppose ZFS could be talking to the
> > NFS server threads with some mismatched language, but I doubt it.
> >
> >
>  Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
>  ESTALE when the file no longer exists, the NFS server returns whatever
>  error it has returned.
> 
>  So, either VFS_FHTOVP() succeeds after the file has been deleted, which
>  would be a problem that needs to be fixed within ZFS
>  OR
>  ZFS returns an error other than ESTALE when it doesn't exist.
> 
>  Try the following patch on the server (which just makes any error
>  returned by VFS_FHTOVP() into ESTALE) and see if that helps.
> 
>  --- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
>  +++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
>  @@ -1127,6 +1127,8 @@
>    }
>    }
>    error = VFS_FHTOVP(mp,&fhp->fh_fid, vpp);
>  +if (error != 0)
>  +error = ESTALE;
>    vfs_unbusy(mp);
>    if (error)
>    goto out;
> 
>  Please let me know if the patch helps, rick
> 
> 
>   
> >>> The patch seems to fix the bad behavior.  Running with the patch, I
> >>> see the following output from my patch (return code of nfs_doio from
> >>> within nfsiod):
> >>> nfssvc_iod: iod 0 nfs_doio returned errno: 70
> >>>
> >>> Furthermore, when inspecting the transaction with Wireshark, after
> >>> deleting the file on the NFS server it looks like there is only a
> >>> single error.  This time there it is a reply to a V3 Lookup call that
> >>> contains a status of "NFS3ERR_NOENT (2)" coming from the NFS server.
> >>> The client also does not repeatedly try to complete the failed request.
> >>>
> >>> Any suggestions on the next step here?  Based on what you said it
> >>> looks like ZFS is falsely reporting an IO error to VFS instead of
> >>> ESTALE / NOENT.  I tried looking around zfs_fhtovp() and only saw
> >>> returns of EINVAL, but I'm not even sure I'm looking in the right place.
> >>>
> >> Further on down the rabbit hole... here's the piece in zfs_fhtovp()
> >> where it's kicking out EINVAL instead of ESTALE - the following patch
> >> corrects the behavior, but of course also suggests further digging
> >> within the zfs_zget() function to ensure that _it_ is returning the
> >> correct thing and whether or not it needs to be handled there or within
> >> zfs_fhtovp().
> >>
> >> ---
> >> src-orig/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
> >> 2010-03-22 11:41:21.0 -0400
> >> +++ src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
> >> 2010-03-22 16:25:21.0 -0400
> >> @@ -1246,7 +1246,7 @@
> >>dprintf("getting %llu [%u mask %llx]\n", object, fid_gen, 
gen_mask);
> >>if (err = zfs_zget(zfsvfs, object,&zp)) {
> >>ZFS_EXIT(zfsvfs);
> >> -return (err);
> >> +return (ESTALE);
> >>}
> >>zp_gen = zp->z_phys->zp_gen&  gen_mask;
> >>if (zp_gen == 0)
> >>  
> > So the odd thing here is that ffs_fhtovp() doesn't return ESTALE if 
VFS_VGET()
> > (which calls ffs_vget()) fails, it only returns ESTALE if the generation 
count
> > doesn't matter.
> >
> >
> It looks like it also returns ESTALE when the inode is invalid (< 
> ROOTINO || > max inodes?) - would an unlinked file in FFS referenced at 
> a later time report an invalid inode?
> 
> But back to your point, zfs_zget() seems to be failing and returning the 
> EINVAL before zfs_fhtovp() even has a chance to set and check zp_gen.  
> I'm trying to get some more details through the use of gratuitous 
> dprintf()'s, but they don't seem to be making it to any logs or the 
> console even with vfs.zfs.debug=1 set.  Any pointers on how to get these 
> dprintf() calls working?

That I have no idea on.  Maybe Rick can chime in?  I'm actually not sure why 
we would want to treat a FHTOVP failure as anything but an ESTALE error in the 
NFS server to be honest.

-- 
John Baldwin
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any m

Re: ezjail

2010-03-22 Thread Ruben de Groot
On Mon, Mar 22, 2010 at 08:40:58PM +0800, Aiza typed:
> >
> >This will enable him to ping another host from within the jail. I won't 
> >do anything for ftp.
> >
> >OP: what exact error do you get? And does ftp work *within* the jail
> >(ftp localhost)?
> 
> with sysctl security.jail.allow_raw_sockets=1  done on the host. From 
> within the jail did ping -c 2 10.0.10.6 which is a pc on the lan gives 
> me socket: Operation not permitted mesg.

weird. did you actually execute the sysctl statement or just put it in 
/etc/sysctl.conf?

> And ftp from 10.0.10.6 to 10.0.20.30 the ftp jail gives me no connection 
> error.

This is not helpfull. Copy/paste the exact error message (and what you did.
We are not psychics).

> Just how am i to determine if ftp work *within* the jail ftp localhost?

As I said: from within the jail, execute the command "ftp localhost". No rocket
science involved.
___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread Steve Polyack

On 03/22/10 12:00, John Baldwin wrote:

On Monday 22 March 2010 11:47:43 am Steve Polyack wrote:
   

On 03/22/10 10:52, Steve Polyack wrote:
 

On 3/19/2010 11:27 PM, Rick Macklem wrote:
   

On Fri, 19 Mar 2010, Steve Polyack wrote:

[good stuff snipped]
 

This makes sense.  According to wireshark, the server is indeed
transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE
instead; it sounds more correct than marking it a general IO error.
Also, the NFS server is serving its share off of a ZFS filesystem,
if it makes any difference.  I suppose ZFS could be talking to the
NFS server threads with some mismatched language, but I doubt it.

   

Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
ESTALE when the file no longer exists, the NFS server returns whatever
error it has returned.

So, either VFS_FHTOVP() succeeds after the file has been deleted, which
would be a problem that needs to be fixed within ZFS
OR
ZFS returns an error other than ESTALE when it doesn't exist.

Try the following patch on the server (which just makes any error
returned by VFS_FHTOVP() into ESTALE) and see if that helps.

--- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
+++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
@@ -1127,6 +1127,8 @@
  }
  }
  error = VFS_FHTOVP(mp,&fhp->fh_fid, vpp);
+if (error != 0)
+error = ESTALE;
  vfs_unbusy(mp);
  if (error)
  goto out;

Please let me know if the patch helps, rick


 

The patch seems to fix the bad behavior.  Running with the patch, I
see the following output from my patch (return code of nfs_doio from
within nfsiod):
nfssvc_iod: iod 0 nfs_doio returned errno: 70

Furthermore, when inspecting the transaction with Wireshark, after
deleting the file on the NFS server it looks like there is only a
single error.  This time there it is a reply to a V3 Lookup call that
contains a status of "NFS3ERR_NOENT (2)" coming from the NFS server.
The client also does not repeatedly try to complete the failed request.

Any suggestions on the next step here?  Based on what you said it
looks like ZFS is falsely reporting an IO error to VFS instead of
ESTALE / NOENT.  I tried looking around zfs_fhtovp() and only saw
returns of EINVAL, but I'm not even sure I'm looking in the right place.
   

Further on down the rabbit hole... here's the piece in zfs_fhtovp()
where it's kicking out EINVAL instead of ESTALE - the following patch
corrects the behavior, but of course also suggests further digging
within the zfs_zget() function to ensure that _it_ is returning the
correct thing and whether or not it needs to be handled there or within
zfs_fhtovp().

---
src-orig/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 11:41:21.0 -0400
+++ src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 16:25:21.0 -0400
@@ -1246,7 +1246,7 @@
   dprintf("getting %llu [%u mask %llx]\n", object, fid_gen, gen_mask);
   if (err = zfs_zget(zfsvfs, object,&zp)) {
   ZFS_EXIT(zfsvfs);
-return (err);
+return (ESTALE);
   }
   zp_gen = zp->z_phys->zp_gen&  gen_mask;
   if (zp_gen == 0)
 

So the odd thing here is that ffs_fhtovp() doesn't return ESTALE if VFS_VGET()
(which calls ffs_vget()) fails, it only returns ESTALE if the generation count
doesn't matter.

   
It looks like it also returns ESTALE when the inode is invalid (< 
ROOTINO || > max inodes?) - would an unlinked file in FFS referenced at 
a later time report an invalid inode?


But back to your point, zfs_zget() seems to be failing and returning the 
EINVAL before zfs_fhtovp() even has a chance to set and check zp_gen.  
I'm trying to get some more details through the use of gratuitous 
dprintf()'s, but they don't seem to be making it to any logs or the 
console even with vfs.zfs.debug=1 set.  Any pointers on how to get these 
dprintf() calls working?


Thanks again.

___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread John Baldwin
On Monday 22 March 2010 11:47:43 am Steve Polyack wrote:
> On 03/22/10 10:52, Steve Polyack wrote:
> > On 3/19/2010 11:27 PM, Rick Macklem wrote:
> >> On Fri, 19 Mar 2010, Steve Polyack wrote:
> >>
> >> [good stuff snipped]
> >>>
> >>> This makes sense.  According to wireshark, the server is indeed 
> >>> transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE 
> >>> instead; it sounds more correct than marking it a general IO error.  
> >>> Also, the NFS server is serving its share off of a ZFS filesystem, 
> >>> if it makes any difference.  I suppose ZFS could be talking to the 
> >>> NFS server threads with some mismatched language, but I doubt it.
> >>>
> >> Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
> >> ESTALE when the file no longer exists, the NFS server returns whatever
> >> error it has returned.
> >>
> >> So, either VFS_FHTOVP() succeeds after the file has been deleted, which
> >> would be a problem that needs to be fixed within ZFS
> >> OR
> >> ZFS returns an error other than ESTALE when it doesn't exist.
> >>
> >> Try the following patch on the server (which just makes any error
> >> returned by VFS_FHTOVP() into ESTALE) and see if that helps.
> >>
> >> --- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
> >> +++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
> >> @@ -1127,6 +1127,8 @@
> >>  }
> >>  }
> >>  error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
> >> +if (error != 0)
> >> +error = ESTALE;
> >>  vfs_unbusy(mp);
> >>  if (error)
> >>  goto out;
> >>
> >> Please let me know if the patch helps, rick
> >>
> >>
> > The patch seems to fix the bad behavior.  Running with the patch, I 
> > see the following output from my patch (return code of nfs_doio from 
> > within nfsiod):
> > nfssvc_iod: iod 0 nfs_doio returned errno: 70
> >
> > Furthermore, when inspecting the transaction with Wireshark, after 
> > deleting the file on the NFS server it looks like there is only a 
> > single error.  This time there it is a reply to a V3 Lookup call that 
> > contains a status of "NFS3ERR_NOENT (2)" coming from the NFS server.  
> > The client also does not repeatedly try to complete the failed request.
> >
> > Any suggestions on the next step here?  Based on what you said it 
> > looks like ZFS is falsely reporting an IO error to VFS instead of 
> > ESTALE / NOENT.  I tried looking around zfs_fhtovp() and only saw 
> > returns of EINVAL, but I'm not even sure I'm looking in the right place.
> 
> Further on down the rabbit hole... here's the piece in zfs_fhtovp() 
> where it's kicking out EINVAL instead of ESTALE - the following patch 
> corrects the behavior, but of course also suggests further digging 
> within the zfs_zget() function to ensure that _it_ is returning the 
> correct thing and whether or not it needs to be handled there or within 
> zfs_fhtovp().
> 
> --- 
> src-orig/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
> 2010-03-22 11:41:21.0 -0400
> +++ src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
> 2010-03-22 16:25:21.0 -0400
> @@ -1246,7 +1246,7 @@
>   dprintf("getting %llu [%u mask %llx]\n", object, fid_gen, gen_mask);
>   if (err = zfs_zget(zfsvfs, object, &zp)) {
>   ZFS_EXIT(zfsvfs);
> -return (err);
> +return (ESTALE);
>   }
>   zp_gen = zp->z_phys->zp_gen & gen_mask;
>   if (zp_gen == 0)

So the odd thing here is that ffs_fhtovp() doesn't return ESTALE if VFS_VGET() 
(which calls ffs_vget()) fails, it only returns ESTALE if the generation count 
doesn't matter.

-- 
John Baldwin
___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread Steve Polyack

On 03/22/10 10:52, Steve Polyack wrote:

On 3/19/2010 11:27 PM, Rick Macklem wrote:

On Fri, 19 Mar 2010, Steve Polyack wrote:

[good stuff snipped]


This makes sense.  According to wireshark, the server is indeed 
transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE 
instead; it sounds more correct than marking it a general IO error.  
Also, the NFS server is serving its share off of a ZFS filesystem, 
if it makes any difference.  I suppose ZFS could be talking to the 
NFS server threads with some mismatched language, but I doubt it.



Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
ESTALE when the file no longer exists, the NFS server returns whatever
error it has returned.

So, either VFS_FHTOVP() succeeds after the file has been deleted, which
would be a problem that needs to be fixed within ZFS
OR
ZFS returns an error other than ESTALE when it doesn't exist.

Try the following patch on the server (which just makes any error
returned by VFS_FHTOVP() into ESTALE) and see if that helps.

--- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
+++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
@@ -1127,6 +1127,8 @@
 }
 }
 error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
+if (error != 0)
+error = ESTALE;
 vfs_unbusy(mp);
 if (error)
 goto out;

Please let me know if the patch helps, rick


The patch seems to fix the bad behavior.  Running with the patch, I 
see the following output from my patch (return code of nfs_doio from 
within nfsiod):

nfssvc_iod: iod 0 nfs_doio returned errno: 70

Furthermore, when inspecting the transaction with Wireshark, after 
deleting the file on the NFS server it looks like there is only a 
single error.  This time there it is a reply to a V3 Lookup call that 
contains a status of "NFS3ERR_NOENT (2)" coming from the NFS server.  
The client also does not repeatedly try to complete the failed request.


Any suggestions on the next step here?  Based on what you said it 
looks like ZFS is falsely reporting an IO error to VFS instead of 
ESTALE / NOENT.  I tried looking around zfs_fhtovp() and only saw 
returns of EINVAL, but I'm not even sure I'm looking in the right place.


Further on down the rabbit hole... here's the piece in zfs_fhtovp() 
where it's kicking out EINVAL instead of ESTALE - the following patch 
corrects the behavior, but of course also suggests further digging 
within the zfs_zget() function to ensure that _it_ is returning the 
correct thing and whether or not it needs to be handled there or within 
zfs_fhtovp().


--- 
src-orig/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 11:41:21.0 -0400
+++ src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
2010-03-22 16:25:21.0 -0400

@@ -1246,7 +1246,7 @@
 dprintf("getting %llu [%u mask %llx]\n", object, fid_gen, gen_mask);
 if (err = zfs_zget(zfsvfs, object, &zp)) {
 ZFS_EXIT(zfsvfs);
-return (err);
+return (ESTALE);
 }
 zp_gen = zp->z_phys->zp_gen & gen_mask;
 if (zp_gen == 0)


___
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"


Unable to boot FreeBSD 8.0

2010-03-22 Thread Christopher Key
Hello,

I'm using FreeBSD 7.2, and am attempting to update to 8.0.


I've been through the standard,

make buildworld
make buildkernel
make installkernel

but cannot get the newly installed kernel to boot.  The system freezes
as soon as the loader tries to boot the kernel.  It doesn't even get as
far as the copyright message:

Type '?' for a list of commands, 'help' for more detailed help.
OK boot -Dd
\


I've tried a custom kernel based upon my 7.2 config, a generic config
and most recently a generic config with KDB and DDB enable all with the
same result.  The 7.2 kernel continues to work normally.

This is an amd64 system booting from two gmirrored disks  The mirror is
partitioned using gpt.  Included below is the output from pciconf -lv
(under 7.2).  I don't know what other information may be relevant, nor
the commands to obtain it.

I'm not quite sure how to proceed with debugging this.  Any thoughts or
suggestions would be much appreciated.


Kind regards,

Christopher Key





# pciconf -lv
hos...@pci0:0:0:0:  class=0x06 card=0x4f438086 chip=0x29908086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'Q963/Q965 Memory Controller Hub'
class  = bridge
subclass   = HOST-PCI
pc...@pci0:0:1:0:   class=0x060400 card=0x4f438086 chip=0x29918086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = 'Q963/Q965 PCIe Root Port'
class  = bridge
subclass   = PCI-PCI
vgap...@pci0:0:2:0: class=0x03 card=0x4f438086 chip=0x29928086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'Q963/Q965 Integrated Graphics Controller'
class  = display
subclass   = VGA
no...@pci0:0:3:0:   class=0x078000 card=0x4f438086 chip=0x29948086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '0x8086 Intel(R) Management Engine Interface'
class  = simple comms
e...@pci0:0:25:0:class=0x02 card=0x00018086 chip=0x104a8086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82566DM Gigabit Network Connection'
class  = network
subclass   = ethernet
uh...@pci0:0:26:0:  class=0x0c0300 card=0x4f438086 chip=0x28348086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB UHCI'
class  = serial bus
subclass   = USB
uh...@pci0:0:26:1:  class=0x0c0300 card=0x4f438086 chip=0x28358086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB UHCI'
class  = serial bus
subclass   = USB
eh...@pci0:0:26:7:  class=0x0c0320 card=0x4f438086 chip=0x283a8086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '81EC1043 (?) ICH8 Enhanced USB2 Enhanced Host Controller'
class  = serial bus
subclass   = USB
pc...@pci0:0:28:0:  class=0x060400 card=0x283f8086 chip=0x283f8086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) PCIe Port 1'
class  = bridge
subclass   = PCI-PCI
pc...@pci0:0:28:1:  class=0x060400 card=0x28418086 chip=0x28418086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) PCIe Port 2'
class  = bridge
subclass   = PCI-PCI
pc...@pci0:0:28:2:  class=0x060400 card=0x28438086 chip=0x28438086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) PCIe Port 3'
class  = bridge
subclass   = PCI-PCI
pc...@pci0:0:28:3:  class=0x060400 card=0x28458086 chip=0x28458086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) PCIe Port 4'
class  = bridge
subclass   = PCI-PCI
pc...@pci0:0:28:4:  class=0x060400 card=0x28478086 chip=0x28478086
rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) PCIe Port 5'
class  = bridge
subclass   = PCI-PCI
uh...@pci0:0:29:0:  class=0x0c0300 card=0x4f438086 chip=0x28308086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB UHCI'
class  = serial bus
subclass   = USB
uh...@pci0:0:29:1:  class=0x0c0300 card=0x4f438086 chip=0x28318086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB UHCI'
class  = serial bus
subclass   = USB
uh...@pci0:0:29:2:  class=0x0c0300 card=0x4f438086 chip=0x28328086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB UHCI'
class  = serial bus
subclass   = USB
eh...@pci0:0:29:7:  class=0x0c0320 card=0x4f438086 chip=0x28368086
rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801H (ICH8 Family) USB2 EHCI'
class  = serial bus
subclass   = USB
pc...@pci0:0:30:0:  class=0x060401 card=0x4f438086 chip=0x244e8086
rev=0xf2 hdr=0x01
vendor = 'Intel Corporation'

Re: 12 TB Disk In freebsd AMD 64 ?

2010-03-22 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/03/2010 14:03:53, Ian Lord wrote:
> I kinda understand freebsd is not well suited for that. I can read
> between the lines that we shouldn't go over 2TB. Is this information
> still exact or outdated ?

Outdated.  The 2TB limit comes from the old-style DOS/fdisk(8) mbr and
bsdlabel(8)[*].  Nowadays you can use gpart(8) instead and set up your
disks using GPT, which doesn't have the same limitations.  Given you're
going to have a separate RAID1 mirror for system disks, you'll be able
to get the machine up and running first, then build the filesystems for
the data partition without having to faff around at install time.

Even though you have a hardware RAID controller, it still might benefit
you to look at ZFS.  You can put a 'zpool disk' on top of a RAID6
created by your hardware, which will let you use all of the available
space easily, and give you various other advantages through the
integrated checksumming etc. built into ZFS.

Cheers,

Matthew

[*] bsdlabel(8) has been modified to allow more than 8 partitions --
the bigdisk article is a bit behind the times there -- but the 32-bit
size limit still applies.


- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuniCkACgkQ8Mjk52CukIwLVwCfUHnREj6ATinA9GTigrQJREDK
InsAn03HRRNbNHxavbfZFY9E4KlNXC/j
=LD41
-END PGP SIGNATURE-
___
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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/03/2010 12:46:06, Aaron Lewis wrote:
> Matthew Seaman wrote:
>> On 22/03/2010 07:11:23, Aaron Lewis wrote:
>>  
>>> Hello BSD hackers,
>>>I have a strange problems with user's home directory , if i log in
>>> through ssh , everything's fine.
>>>But on virtual terminals , it tolds me:
>>>
>>>no home directory
>>>Logging in with home dir "/"
>>>
>>>Does anyone has any ideas ?
>>>
>>>
>>>Here's some debug information
>>> =
>>> %> grep aaron /etc/passwd
>>> aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash
>>>
>>> %> ls -ladh /home/aaron/
>>> drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron
>>> 
>>> 
>>
>> What are the settings for
>>
>> ChallengeResponseAuthentication
>> UsePam
>>
>> in your /etc/ssh/sshd_config?
>>   
> Nothing found , or commented out.

Commented out means using the default setting -- which is 'yes' for both
of those.  ie. sshd is using the PAM system.  Which means that PAM is
probably working just fine.

>> What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?
>>   
> # grep -v -e "^#" /etc/pam.d/sshd | sed '/^$/d'
> authsufficientpam_opie.sono_warn no_fake_prompts
> authrequisitepam_opieaccess.sono_warn allow_local
> authrequiredpam_unix.sono_warn try_first_pass
> accountrequiredpam_nologin.so
> accountrequiredpam_login_access.so
> accountrequiredpam_unix.so
> sessionrequiredpam_permit.so
> passwordrequiredpam_unix.sono_warn try_first_pass

These are also the default settings for sshd -- which as you say is working.

> # grep -v -e "^#" /etc/pam.d/login  | sed '/^$/d'
> authsufficientpam_self.sono_warn
> authincludesystem
> accountrequisitepam_securetty.so
> accountrequiredpam_nologin.so
> accountincludesystem
> sessionincludesystem
> passwordincludesystem

Again, this is the default for login.   I should have asked you for the
contents of /etc/pam.d/system as well, but if you say it's not been
modified I'll believe you.  H...

> It's all fresh install , did i do something wrong ? It's really strange
> .. never met before.

Something is a bit fubar somewhere, yes.  From the symptoms you
described,  the immediate suspect would be the PAM system, but there are
no obvious configuration problems with what you've shown me.

Is there anything notable in /var/log/auth.log from the failed console
logins?  Can you try gratuitously creating another user account and
seeing if that is affected in the same way, or indeed if it makes any
difference to the original user account?

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkunhDoACgkQ8Mjk52CukIwzBQCfccc1KXwscGDrHV2wn5Zr8xnO
pMAAnjJVpjZc39wczR4u8nYo/Kxpvivl
=3oJZ
-END PGP SIGNATURE-
___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread Steve Polyack

On 3/19/2010 11:27 PM, Rick Macklem wrote:



On Fri, 19 Mar 2010, Steve Polyack wrote:

[good stuff snipped]


This makes sense.  According to wireshark, the server is indeed 
transmitting "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE 
instead; it sounds more correct than marking it a general IO error.  
Also, the NFS server is serving its share off of a ZFS filesystem, if 
it makes any difference.  I suppose ZFS could be talking to the NFS 
server threads with some mismatched language, but I doubt it.



Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
ESTALE when the file no longer exists, the NFS server returns whatever
error it has returned.

So, either VFS_FHTOVP() succeeds after the file has been deleted, which
would be a problem that needs to be fixed within ZFS
OR
ZFS returns an error other than ESTALE when it doesn't exist.

Try the following patch on the server (which just makes any error
returned by VFS_FHTOVP() into ESTALE) and see if that helps.

--- nfsserver/nfs_srvsubs.c.sav2010-03-19 22:06:43.0 -0400
+++ nfsserver/nfs_srvsubs.c2010-03-19 22:07:22.0 -0400
@@ -1127,6 +1127,8 @@
 }
 }
 error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
+if (error != 0)
+error = ESTALE;
 vfs_unbusy(mp);
 if (error)
 goto out;

Please let me know if the patch helps, rick


The patch seems to fix the bad behavior.  Running with the patch, I see 
the following output from my patch (return code of nfs_doio from within 
nfsiod):

nfssvc_iod: iod 0 nfs_doio returned errno: 70

Furthermore, when inspecting the transaction with Wireshark, after 
deleting the file on the NFS server it looks like there is only a single 
error.  This time there it is a reply to a V3 Lookup call that contains 
a status of "NFS3ERR_NOENT (2)" coming from the NFS server.  The client 
also does not repeatedly try to complete the failed request.


Any suggestions on the next step here?  Based on what you said it looks 
like ZFS is falsely reporting an IO error to VFS instead of ESTALE / 
NOENT.  I tried looking around zfs_fhtovp() and only saw returns of 
EINVAL, but I'm not even sure I'm looking in the right place.

___
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: FreeBSD NFS client goes into infinite retry loop

2010-03-22 Thread John Baldwin
On Friday 19 March 2010 11:27:13 pm Rick Macklem wrote:
> 
> On Fri, 19 Mar 2010, Steve Polyack wrote:
> 
> [good stuff snipped]
> >
> > This makes sense.  According to wireshark, the server is indeed 
> > transmitting 
> > "Status: NFS3ERR_IO (5)".  Perhaps this should be STALE instead; it sounds 
> > more correct than marking it a general IO error.  Also, the NFS server is 
> > serving its share off of a ZFS filesystem, if it makes any difference.  I 
> > suppose ZFS could be talking to the NFS server threads with some mismatched 
> > language, but I doubt it.
> >
> Ok, now I think we're making progress. If VFS_FHTOVP() doesn't return
> ESTALE when the file no longer exists, the NFS server returns whatever
> error it has returned.
> 
> So, either VFS_FHTOVP() succeeds after the file has been deleted, which
> would be a problem that needs to be fixed within ZFS
> OR
> ZFS returns an error other than ESTALE when it doesn't exist.
> 
> Try the following patch on the server (which just makes any error
> returned by VFS_FHTOVP() into ESTALE) and see if that helps.
> 
> --- nfsserver/nfs_srvsubs.c.sav   2010-03-19 22:06:43.0 -0400
> +++ nfsserver/nfs_srvsubs.c   2010-03-19 22:07:22.0 -0400
> @@ -1127,6 +1127,8 @@
>   }
>   }
>   error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
> + if (error != 0)
> + error = ESTALE;
>   vfs_unbusy(mp);
>   if (error)
>   goto out;
> 
> Please let me know if the patch helps, rick

I can confirm that ZFS's FHTOVP() method never returns ESTALE.  Perhaps this
patch would fix it?  It changes zfs_fhtovp() to return ESTALE if the
generation count doesn't match.  If this doesn't help, you can try changing
some of the other return cases in this function to ESTALE (many use EINVAL)
until you find the one that matches this condition.

Index: zfs_vfsops.c
===
--- zfs_vfsops.c(revision 205334)
+++ zfs_vfsops.c(working copy)
@@ -1256,7 +1256,7 @@
dprintf("znode gen (%u) != fid gen (%u)\n", zp_gen, fid_gen);
VN_RELE(ZTOV(zp));
ZFS_EXIT(zfsvfs);
-   return (EINVAL);
+   return (ESTALE);
}
 
*vpp = ZTOV(zp);

-- 
John Baldwin
___
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: how to compare permissions between two dirs

2010-03-22 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aryeh M. Friedman wrote:
> In switching to a new make file for a personal project I have run into
> the problem of under the old makefile everything works (web site) and
> under the new one it does not... when manually looking at the two dirs
> they appear identical in layout, sizes and perms (dir and file level)
> but I want to make sure... is there any way to compare two diff dirs and
> see if they only differ in date stamps? (note since there are several
> developers working on this project I need to compare even if the owners
> are diff)

Hi Aryeh,

I haven't tested this extensively, but it looks promising:

mtree -c -n -i -p /path/to/directory/one > /tmp/dirlist1.txt
mtree -c -n -i -p /path/to/directory/two > /tmp/dirlist2.txt
diff /tmp/dirlist[12].txt

Hope that helps,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLp37v0sRouByUApARAm6sAJ9OIXbr7uSJ9PeH4RPf3EwxPmJPiwCcC8Sb
TzWV52qn1cx00sypkngObXs=
=r1W2
-END PGP SIGNATURE-

___
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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Warren Block

On Mon, 22 Mar 2010, Aaron Lewis wrote:


Hello BSD hackers,
  I have a strange problems with user's home directory , if i log in through 
ssh , everything's fine.

  But on virtual terminals , it tolds me:

  no home directory
  Logging in with home dir "/"

  Does anyone has any ideas ?


  Here's some debug information
=
%> grep aaron /etc/passwd
aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash

%> ls -ladh /home/aaron/
drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron



Have you set up a jail?  The "no home directory" message appears in 
usr.sbin/jail/jail.c in 8-stable.


-Warren Block * Rapid City, South Dakota USA
___
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: ezjail

2010-03-22 Thread Boris Samorodov
Aiza  writes:

> Now I would like to play with jails. One for postfix, apache, and ftp.
> My reading of EZJAIL and the jails section of the handbook lead me to
> believe I need a unique IP address for each jail. Is that correct?

No. As long as you use different ports for different jails/services
you may use one ip-address for those jails:
-
% jls
   JID  IP Address  Hostname  Path
 1  192.168.100.10  ftp.xxx.ru/jails/ftp.xxx.ru
 2  192.168.100.10  mx.xxx.ru /jails/mx.xxx.ru
 3  192.168.100.10  http.xxx.ru   /jails/http.xxx.ru
-

-- 
WBR, bsam
___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Alejandro Imass
On Mon, Mar 22, 2010 at 9:30 AM, Randal L. Schwartz
 wrote:
>> "Ruben" == Ruben de Groot  writes:
>
> Ruben> And sendmail does not? You obviously are biased.
>
> I had at least a decade of experience with sendmail before discovering
> postfix.  And now I use postfix, and you can't *make* me use sendmail
> again.
>
> Of course I'm biased.  I prefer postfix now.


(sorry I answered directly to Randal by mistake):
I second you!
I also use Postfix on FBSD and refuse to use any default MTA whether
is the imposed Sendmail on FBSD or Exim on Debian, etc.
There should be no default MTA in Open Source OSs.

Best,
Alejandro Imass

>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
>  http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
> ___
> 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"


12 TB Disk In freebsd AMD 64 ?

2010-03-22 Thread Ian Lord
Hi,

 

I am planning to build a 12x 1TB array RAID 6 on a hardware controller... I 
will use it as a nfs server for archiving files (we need to keep legal files 
for 6 years)...

 

Raid 6 will give me a 10 TB drive approx...

 

Reading these pages:

http://www.freebsd.org/projects/bigdisk/index.html 
 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html 
 

I kinda understand freebsd is not well suited for that. I can read between the 
lines that we shouldn't go over 2TB. Is this information still exact or 
outdated ?

 

I'm pretty sure I won't be able to boot on that megadrive so I planned on 
having 2 smaller disk on raid 1, but I want to make sure the big disk will work 
and will be reliable.

 

Could someone comment please ?

 

Thanks in advance

 

~~

Ian Lord

MSD Informatique

143 Rue des Fauvettes

St-Colomban (Québec) J5K 0E2

Tél: (514) 776-MSDI  -> (514) 776-6734

Sans Frais: 1(877) 776-MSDI -> 1(877) 776-6734

http://www.msdi.ca  

 

___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Randal L. Schwartz
> "Ruben" == Ruben de Groot  writes:

Ruben> And sendmail does not? You obviously are biased.

I had at least a decade of experience with sendmail before discovering
postfix.  And now I use postfix, and you can't *make* me use sendmail
again.

Of course I'm biased.  I prefer postfix now.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
___
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 : OT: dead box

2010-03-22 Thread Alexandre L.
My brother has got the same case : Antec Sonata II. It has been delivred with 
the power supply. 
The power supply has exploded capacitors on the mobo (Asus A7N8X-E Deluxe).
The LED on the mobo was lightening up but we can't power up the workstation.
For your problem, I suggest you to see if this LED is lightening up or not.
If not, you can replace it. If yes, you might test with another one. After 
that, the mobo could have been take a blow.
A CPU or RAM problem is reported by the mobo with a sound (BIP).

I hope this could help you.

Alexandre.

--- En date de : Dim 21.3.10, Frank Shute  a écrit :

> De: Frank Shute 
> Objet: OT: dead box
> À: "FreeBSD Questions" 
> Date: Dimanche 21 mars 2010, 10h11
> Sorry if this is a bit off-topic.
> 
> I came in the other day to find my workstation powered off.
> Hitting
> the power on button had no effect as did using another
> known working
> outlet. I checked all the cables and they seem attached.
> 
> I thought my power supply must have died so I got another,
> screwed it
> in and again no joy - no sign of life.
> 
> Anybody got any ideas what the problem may be? I'm thinking
> possibly
> the power on switch but that seems a long shot and there
> seems no easy
> way to replace it.
> 
> My hardware:
> 
> Antec Sonata case.
> Gigabyte board.
> Core 2 duo
> 
> TIA,
> 
> Regards,
> 
> -- 
> 
>  Frank 
> 
> 
>  Contact info: http://www.shute.org.uk/misc/contact.html
> 
> 
> ___
> 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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

Matthew Seaman wrote:

On 22/03/2010 07:11:23, Aaron Lewis wrote:
  

Hello BSD hackers,
   I have a strange problems with user's home directory , if i log in
through ssh , everything's fine.
   But on virtual terminals , it tolds me:

   no home directory
   Logging in with home dir "/"

   Does anyone has any ideas ?


   Here's some debug information
=
%> grep aaron /etc/passwd
aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash

%> ls -ladh /home/aaron/
drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron




What are the settings for

ChallengeResponseAuthentication
UsePam

in your /etc/ssh/sshd_config?
  

Nothing found , or commented out.

What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?
  

# grep -v -e "^#" /etc/pam.d/sshd | sed '/^$/d'
authsufficientpam_opie.sono_warn no_fake_prompts
authrequisitepam_opieaccess.sono_warn allow_local
authrequiredpam_unix.sono_warn try_first_pass
accountrequiredpam_nologin.so
accountrequiredpam_login_access.so
accountrequiredpam_unix.so
sessionrequiredpam_permit.so
passwordrequiredpam_unix.sono_warn try_first_pass

# grep -v -e "^#" /etc/pam.d/login  | sed '/^$/d'
authsufficientpam_self.sono_warn
authincludesystem
accountrequisitepam_securetty.so
accountrequiredpam_nologin.so
accountincludesystem
sessionincludesystem
passwordincludesystem

It's all fresh install , did i do something wrong ? It's really strange 
.. never met before.

Cheers,

Matthew

  



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
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: ezjail

2010-03-22 Thread Aiza

Ruben de Groot wrote:

On Mon, Mar 22, 2010 at 11:23:54AM +0100, Dh?nin Jean-Jacques typed:


on the lan gives me no sockets mesg. And ftp from 10.0.10.6 to
10.0.20.30 the ftp jail gives me no connection error.



add

sysctl security.jail.allow_raw_sockets=1
or in /etc/sysctl.conf
on the host (not in in the jail)


This will enable him to ping another host from within the jail. I won't 
do anything for ftp.


OP: what exact error do you get? And does ftp work *within* the jail
(ftp localhost)?


with sysctl security.jail.allow_raw_sockets=1  done on the host. From 
within the jail did ping -c 2 10.0.10.6 which is a pc on the lan gives 
me socket: Operation not permitted mesg.


And ftp from 10.0.10.6 to 10.0.20.30 the ftp jail gives me no connection 
error.


Just how am i to determine if ftp work *within* the jail ftp localhost?
___
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"


panic: sleeping thread

2010-03-22 Thread Paul Halliday
I have a couple VM's that randomly halt with this error:

Sleeping thread (tid 10018, pid 1058) owns a non-sleepable lock
panic: sleeping thread
cpuid = 0
Uptime 11h14m31s
Cannot dump. Device not defined or unavailable.

FreeBSD 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC
2009 r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
amd64

These systems run nightly Nessus scans and these halts are very
sporadic; I can go a week w/o seeing one.

What should I do to start to troubleshoot this?

Thanks.
___
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: how to compare permissions between two dirs

2010-03-22 Thread Chad Kellerman
On Mon, Mar 22, 2010 at 7:33 AM, Aryeh M. Friedman  wrote:

> In switching to a new make file for a personal project I have run into the
> problem of under the old makefile everything works (web site) and under the
> new one it does not... when manually looking at the two dirs they appear
> identical in layout, sizes and perms (dir and file level) but I want to make
> sure... is there any way to compare two diff dirs and see if they only
> differ in date stamps? (note since there are several developers working on
> this project I need to compare even if the owners are diff)
> ___
> 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"
>

I have done this in the past

You can write a script that writes the 'stats' that you want about each
directory to a file, then compare the two.


#!/usr/bin/perl
use strict;
use Fcntl ':mode';
use File::Find ();
use Digest::MD5;
use Getopt::Std;
$|++;

my %opts;
getopts('d:l:v', \%opts);

my $dirname  = $opts{'d'} ? $opts{'d'} : die "Please provide a Snap Shot
directory\n";
my $log  = $opts{'l'} ? $opts{'l'} : "/tmp/$0.$$";
my $verbose  = $opts{'v'};

# for the convenience of &wanted calls, including -eval statements:
use vars qw/*name *dir *prune/;
*name   = *File::Find::name;
*dir= *File::Find::dir;
*prune  = *File::Find::prune;

sub wanted;

# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, "$dirname");
exit;

sub wanted {
my ($dev,$ino,$mode,$nlink,$uid,$gid);

(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-f _
&& process( "$uid", "$gid",  "$mode", "$name");
}

sub process {
my ($u, $g, $m, $n) = @_;

my $user  = getpwuid($u);
my $group = getgrgid($g);
my $perms = sprintf "%04o", S_IMODE($m);

my $file = $n;
open FILE, $file or die "Can't open $file: $!\n";
binmode(FILE);

my $md5 = Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n";

close FILE;

print " $user $group $perms $md5 $n\n" if ($verbose);

open LOG, ">>$log" or die "Can't open log file: $!\n";
print LOG "$user $group $perms $md5 $n\n";
close LOG;

}

--

name the above script dirSnapShot.pl and run it like so:   perl dirSnapShot
-d /dir1  then run it again perl dirSnapShot.pl -d /dir2

run a diff on the two log files in tmp to see the difference.

Chad



-- 
A grasshopper walks into a bar and the bartender says "Hey, we have a drink
named after you." And the grasshopper says "Really, You have a drink named
Murray?"
___
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: sftp server with speed throttling

2010-03-22 Thread Vincent Hoffman
On 22/03/2010 11:53, Ghirai wrote:
> On Sun, 21 Mar 2010 19:55:00 +
> Vincent Hoffman  wrote:
>
>   
>> On 21/03/2010 13:53, Dan Naumov wrote:
>> 
>>> What are my options if I want to run an sftp server with speed
>>> throttling? My understanding is that openssh (which includes sftp)
>>> in base does not support this directly, so I would have to either
>>> use a custom kernel with ALTQ (and I would really rather stick to
>>> GENERIC so I can use freebsd-update) which sounds like a bit too
>>> much configuration work or pass sftp traffic through PF and
>>> throttle it (ugly, would also affect ssh traffic).
>>>
>>> Are there any sftp servers with directly built-in functionality for
>>> this? I just would to be able to set limits for upload speed
>>> globally for the entire server and preferably to also be able to do
>>> speed settings on a per-user basis.
>>>   
>>>   
>> A quick google indicates there are at least 2 sftp servers with this
>> functionality,
>> http://www.proftpd.org/docs/contrib/mod_sftp.html
>> http://mysecureshell.sourceforge.net/en/index.html
>>
>> Proftpd with mod_sftp needs the proftp-devel port so I'm guessing its
>> still in testing but at least its in ports.
>> No idea about the mysecureshell program, its not in ports.
>>
>> I havent actually tried with of these so no idea how well they work,
>> good luck.
>>
>> 
> I used pure-ftpd, and it's pretty awesome.
>
> http://www.pureftpd.org/project/pure-ftpd
>   
Unfortunately pureftpd doesn't do sftp as far as I'm aware (it does do
ftps/ftp with tls  but thats not the same thing.)

Vince


___
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: sftp server with speed throttling

2010-03-22 Thread Ghirai
On Sun, 21 Mar 2010 19:55:00 +
Vincent Hoffman  wrote:

> On 21/03/2010 13:53, Dan Naumov wrote:
> > What are my options if I want to run an sftp server with speed
> > throttling? My understanding is that openssh (which includes sftp)
> > in base does not support this directly, so I would have to either
> > use a custom kernel with ALTQ (and I would really rather stick to
> > GENERIC so I can use freebsd-update) which sounds like a bit too
> > much configuration work or pass sftp traffic through PF and
> > throttle it (ugly, would also affect ssh traffic).
> >
> > Are there any sftp servers with directly built-in functionality for
> > this? I just would to be able to set limits for upload speed
> > globally for the entire server and preferably to also be able to do
> > speed settings on a per-user basis.
> >   
> A quick google indicates there are at least 2 sftp servers with this
> functionality,
> http://www.proftpd.org/docs/contrib/mod_sftp.html
> http://mysecureshell.sourceforge.net/en/index.html
> 
> Proftpd with mod_sftp needs the proftp-devel port so I'm guessing its
> still in testing but at least its in ports.
> No idea about the mysecureshell program, its not in ports.
> 
> I havent actually tried with of these so no idea how well they work,
> good luck.
> 

I used pure-ftpd, and it's pretty awesome.

http://www.pureftpd.org/project/pure-ftpd
___
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: how to compare permissions between two dirs

2010-03-22 Thread Matthew Seaman
On 22/03/2010 11:33:28, Aryeh M. Friedman wrote:
> In switching to a new make file for a personal project I have run into
> the problem of under the old makefile everything works (web site) and
> under the new one it does not... when manually looking at the two dirs
> they appear identical in layout, sizes and perms (dir and file level)
> but I want to make sure... is there any way to compare two diff dirs and
> see if they only differ in date stamps? (note since there are several
> developers working on this project I need to compare even if the owners
> are diff)

Something like:

rsync -nva old-dir/ new-dir/

Should tell you about any files where there is a difference either in
contents or in meta-data between the two directories.  Unfortunately, it
doesn't tell you exactly what the difference is, so you'll have to use
ls(1) etc. to examine the files it highlights in more detail.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
___
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"


how to compare permissions between two dirs

2010-03-22 Thread Aryeh M. Friedman
In switching to a new make file for a personal project I have run into 
the problem of under the old makefile everything works (web site) and 
under the new one it does not... when manually looking at the two dirs 
they appear identical in layout, sizes and perms (dir and file level) 
but I want to make sure... is there any way to compare two diff dirs and 
see if they only differ in date stamps? (note since there are several 
developers working on this project I need to compare even if the owners 
are diff)

___
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: ezjail

2010-03-22 Thread Ruben de Groot
On Mon, Mar 22, 2010 at 11:23:54AM +0100, Dh?nin Jean-Jacques typed:

> > > on the lan gives me no sockets mesg. And ftp from 10.0.10.6 to
> > > 10.0.20.30 the ftp jail gives me no connection error.

> add
> 
> sysctl security.jail.allow_raw_sockets=1
> or in /etc/sysctl.conf
> on the host (not in in the jail)

This will enable him to ping another host from within the jail. I won't 
do anything for ftp.

OP: what exact error do you get? And does ftp work *within* the jail
(ftp localhost)?
___
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: Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Matthew Seaman
On 22/03/2010 07:11:23, Aaron Lewis wrote:
> Hello BSD hackers,
>I have a strange problems with user's home directory , if i log in
> through ssh , everything's fine.
>But on virtual terminals , it tolds me:
> 
>no home directory
>Logging in with home dir "/"
> 
>Does anyone has any ideas ?
> 
> 
>Here's some debug information
> =
> %> grep aaron /etc/passwd
> aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash
> 
> %> ls -ladh /home/aaron/
> drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron
> 

What are the settings for

ChallengeResponseAuthentication
UsePam

in your /etc/ssh/sshd_config?

What are the contents of /etc/pam.d/login and /etc/pam.d/sshd ?

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
___
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: ezjail

2010-03-22 Thread Dhénin Jean-Jacques
2010/3/22 Ruben de Groot 

>
> >
> > My host 8.0 system is the gateway to the public internet.
> > I have ipfilter running blocking all inbound request for service.
> > I only allow out bound request from the LAN behind the gateway and use
> > keep state to allow the packet conversation to continue. All this has
> > worked fine for years across many releases of Freebsd.
> >
> > Now comes playing with jails. I created 3 jails, www, ftp, telnet and
> > used ip address of 10.0.20.20, 10.0.20.30, 10.0.20.40. The goal is to
> > target those jails from other PC on the private LAN who are using ip
> > address in the 10.0.10.2 through 10.0.10.8 range.
> >
> > I used ezjail-admin onestart and all the jails start. Then did
> > ezjail-admin console ftp.local.com and got logged into that jail. Edited
> > /etc/inetd.conf and uncommented the ftp line. Edited /etc/rc.conf adding
> > inetd_enable="YES" exited the ftp jail. Did ezjail-admin onestop
> > followed by ezjail-admin onestart to cycle the ftp jail to activate the
> > ftp function. ezjail-admin console ftp.local.com to get logged into that
> > jail again. From within the jail did ping -c 2 10.0.10.6 which is a pc
> > on the lan gives me no sockets mesg. And ftp from 10.0.10.6 to
> > 10.0.20.30 the ftp jail gives me no connection error.
> >
> > What is the problem here?
>
>
> How are we supposed to know?
>
> Ruben
>
> ___
> 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"
>

add

sysctl security.jail.allow_raw_sockets=1

or in /etc/sysctl.conf

on the host (not in in the jail)

Cordialement

-
(°>   Dhénin Jean-Jacques
/ ) 48, rue de la Justice 78300 Poissy
^^   jean-jacq...@dhenin.fr
-
___
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: ezjail

2010-03-22 Thread Ruben de Groot
On Mon, Mar 22, 2010 at 05:47:09PM +0800, Aiza typed:
> Mark Shroyer wrote:
> >On 3/21/2010 8:21 PM, Aiza wrote:
> >>Does the ip address notation for the jail include the port number?
> >>Like 10.0.20.2:80 Nat port forwarding is the long way around just to get
> >>the correct port number to the jail ip address.
> >
> >Nope, jails are assigned one (or more) specific IP addresses, but not
> >specific port numbers.  So if you don't have a separate public IP for
> >your jail, you'll be relying on some sort of packet filter to redirect
> >traffic to its private IP address.
> >
> >This isn't as big a deal as it may sound, especially if you're already
> >using PF, which has built-in packet redirection capabilities that do not
> >require you to run a separate NAT daemon.
> >
> >
> 
> My host 8.0 system is the gateway to the public internet.
> I have ipfilter running blocking all inbound request for service.
> I only allow out bound request from the LAN behind the gateway and use 
> keep state to allow the packet conversation to continue. All this has 
> worked fine for years across many releases of Freebsd.
> 
> Now comes playing with jails. I created 3 jails, www, ftp, telnet and 
> used ip address of 10.0.20.20, 10.0.20.30, 10.0.20.40. The goal is to 
> target those jails from other PC on the private LAN who are using ip 
> address in the 10.0.10.2 through 10.0.10.8 range.
> 
> I used ezjail-admin onestart and all the jails start. Then did 
> ezjail-admin console ftp.local.com and got logged into that jail. Edited 
> /etc/inetd.conf and uncommented the ftp line. Edited /etc/rc.conf adding 
> inetd_enable="YES" exited the ftp jail. Did ezjail-admin onestop 
> followed by ezjail-admin onestart to cycle the ftp jail to activate the 
> ftp function. ezjail-admin console ftp.local.com to get logged into that 
> jail again. From within the jail did ping -c 2 10.0.10.6 which is a pc 
> on the lan gives me no sockets mesg. And ftp from 10.0.10.6 to 
> 10.0.20.30 the ftp jail gives me no connection error.
> 
> What is the problem here?

How are we supposed to know?

Ruben

___
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: ezjail

2010-03-22 Thread Aiza

Mark Shroyer wrote:

On 3/21/2010 8:21 PM, Aiza wrote:

Does the ip address notation for the jail include the port number?
Like 10.0.20.2:80 Nat port forwarding is the long way around just to get
the correct port number to the jail ip address.


Nope, jails are assigned one (or more) specific IP addresses, but not
specific port numbers.  So if you don't have a separate public IP for
your jail, you'll be relying on some sort of packet filter to redirect
traffic to its private IP address.

This isn't as big a deal as it may sound, especially if you're already
using PF, which has built-in packet redirection capabilities that do not
require you to run a separate NAT daemon.




My host 8.0 system is the gateway to the public internet.
I have ipfilter running blocking all inbound request for service.
I only allow out bound request from the LAN behind the gateway and use 
keep state to allow the packet conversation to continue. All this has 
worked fine for years across many releases of Freebsd.


Now comes playing with jails. I created 3 jails, www, ftp, telnet and 
used ip address of 10.0.20.20, 10.0.20.30, 10.0.20.40. The goal is to 
target those jails from other PC on the private LAN who are using ip 
address in the 10.0.10.2 through 10.0.10.8 range.


I used ezjail-admin onestart and all the jails start. Then did 
ezjail-admin console ftp.local.com and got logged into that jail. Edited 
/etc/inetd.conf and uncommented the ftp line. Edited /etc/rc.conf adding 
inetd_enable="YES" exited the ftp jail. Did ezjail-admin onestop 
followed by ezjail-admin onestart to cycle the ftp jail to activate the 
ftp function. ezjail-admin console ftp.local.com to get logged into that 
jail again. From within the jail did ping -c 2 10.0.10.6 which is a pc 
on the lan gives me no sockets mesg. And ftp from 10.0.10.6 to 
10.0.20.30 the ftp jail gives me no connection error.


What is the problem here?

___
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: sftp server with speed throttling

2010-03-22 Thread Nikos Vassiliadis

Dan Naumov wrote:

What are my options if I want to run an sftp server with speed
throttling? My understanding is that openssh (which includes sftp) in
base does not support this directly, so I would have to either use a
custom kernel with ALTQ (and I would really rather stick to GENERIC so
I can use freebsd-update) which sounds like a bit too much
configuration work or pass sftp traffic through PF and throttle it
(ugly, would also affect ssh traffic).


You could examine the possibility of using ipfw and dummynet:
1) ipfw and dummynet are availabe in the GENERIC kernel.
2) Most of the time you can classify bulk/interactive traffic
by examining the packet's length. IP packets carrying
sftp traffic tend to be limited by MTU size or PMTU
discovery. IP packets carrying ssh traffic tend to be
much smaller.

Nikos
___
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: Wireless access point rc.conf syntax in FreeBSD 8?

2010-03-22 Thread Leslie Jensen



On 2010-03-21 22:19, Modulok wrote:

I have a wireless network card. But I can't configure it. I read in
UPDATING that this had to do with some split up of the wireless
drivers into software/hardware interfaces? Something to do with me
having to clone the interface before I can configure it? There was no
mention of this in the handbook wireless section that I saw.

Anyway, I want to run it as an access point, not a client. The ral
driver supports this, but I'm not sure on the rc.conf synax for
creating an access point out of it. Could anyone point to some
access-point-like examples?

Thanks!
-Modulok-
___
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"



What I myself missed when I installed 8.0 was the need for the following 
line in rc.conf.


wlans_iwn0="wlan0"

Where iwn0 is the driver for my Intel 5100.

You could post your /boot/loader.conf and the lines related networking 
from your /etc/rc.conf


It'll be easier to give you good advise then.

/Leslie

___
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: Spamassasin, sendmail, Postfix

2010-03-22 Thread Ruben de Groot
On Sun, Mar 21, 2010 at 04:44:20PM -0700, Randal L. Schwartz typed:
> 
> Postfix has a readable config file (with comments!) that doesn't
> require "compiling" into the proper syntax.

Here follows a snippets from /etc/mail/freebsd.mc. It's readable and full of 
comments.
A simple "make" will "compile" the file. What are you complaining about?

dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without  
dnl   your permission.
dnl FEATURE(relay_based_on_MX)


> Postfix understands and plays well with things like content-filters,
> RBLs, dovecot (and others) for SSL.

And sendmail does not? You obviously are biased.

___
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: sftp server with speed throttling

2010-03-22 Thread Andrei Kolu
2010/3/21 Dan Naumov :
> What are my options if I want to run an sftp server with speed
> throttling? My understanding is that openssh (which includes sftp) in
> base does not support this directly, so I would have to either use a
> custom kernel with ALTQ (and I would really rather stick to GENERIC so
> I can use freebsd-update) which sounds like a bit too much
> configuration work or pass sftp traffic through PF and throttle it
> (ugly, would also affect ssh traffic).
>
> Are there any sftp servers with directly built-in functionality for
> this? I just would to be able to set limits for upload speed globally
> for the entire server and preferably to also be able to do speed
> settings on a per-user basis.
>
>

Only OpenSSH alternative I use sometimes is
http://www.freebsd.org/cgi/url.cgi?ports/security/ssh2-nox11/../ssh2/pkg-descr

security/ssh2-nox11

Not about throttling but about chrooting:
---
Date: Tue, 20 Aug 2002 08:35:46 +0930
To: Philip Paeps 
From: Wincent Colaiuta 

El Thursday, 15 August, 2002, a las 11:13 PM, Philip Paeps escribió:

> I'm in the process of setting up a form of fileserver, and I'd like for
> my
> users to be able to work only in their home directories, not anywhere
> else. I
> would like to use SSH for the connections, as opposed to FTP, but I
> don't want
> users to be able to log into an interactive shell (only SCP/SFTP) and I
> don't
> want them to 'escape' out of their home directories.

Use ssh2 from the ports collection:
cd /usr/ports/security/ssh2 && make install

In /usr/local/etc/ssh2/sshd2_config set the ChRootGroups and ChRootUsers
directives to chroot the group(s) and/or user(s) that are to have
ChRooted access.

Turn off the default ssh (OpenSSH) by setting in /etc/rc.conf:
sshd_enable="NO"

Start the new ssh:
/usr/local/etc/rc.d/sshd.sh start

When you create the user's account, make sure the shell is set to
/bin/nologin or something similar.

With this setup, they can sftp in and are chroot to the home dir, and
they can't get a shell when they connect via ssh.

In my opinion, OpenSSH should have this feature. We are told not to use
ftp because of clear-text passwords, so we have to use ssh/sftp, but
when we do that we can no longer chroot people to their home dirs! And
if we're not careful, we end up giving them a login shell. Using ssh2
from the ports gets around this limitation, but just check the licence
before you install to make sure that you qualify (otherwise it's not
free).

Cheers :-)
Wincent
---
___
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"


Weird Problems with User Home Directory , Asking for help

2010-03-22 Thread Aaron Lewis

Hello BSD hackers,
   I have a strange problems with user's home directory , if i log in 
through ssh , everything's fine.

   But on virtual terminals , it tolds me:

   no home directory
   Logging in with home dir "/"

   Does anyone has any ideas ?


   Here's some debug information
=
%> grep aaron /etc/passwd
aaron:*:1001:1001:frozen:/home/aaron:/usr/local/bin/bash

%> ls -ladh /home/aaron/
drwxr-xr-x  3 aaron aaron   512B Mar  5 22:36 /home/aaron



--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

___
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"