Re: smbd (samba) opens too many files (fstat)

2017-09-29 Thread Andreas Beck

Christos Zoulas schrieb:

In article <516d48e1-48d6-794d-b491-c7a66ddd2...@teccmail.de>,
Andreas Beck  <li...@teccmail.de> wrote:

Hello,

one of my samba-servers opens too many files until notification "Too
many open files) from the system.

fstat | grep smbd |wc -l
1704

after 2h.

Is there a way, to reduce open files in samba, or must I set more
descriptors?
I think, 1704 open files, while copying 5GB small files, does not look good.

Regards,
Andreas

fstat:
...
root smbd 538  816* internet stream tcp
root smbd 538  817* internet stream tcp
root smbd 538  818* internet stream tcp
root smbd 538  819* internet stream tcp
root smbd 538  820* internet stream tcp
root smbd 538  821* internet stream tcp
root smbd 538  822* internet stream tcp
root smbd 538  823* internet stream tcp
root smbd 538  824* internet stream tcp
root smbd 538  825* internet stream tcp
root smbd 538  826* internet stream tcp
root smbd 538  827* internet stream tcp
root smbd 538  828* internet stream tcp
root smbd 538  829* internet stream tcp
root smbd 538  830* internet stream tcp
root smbd 538  831* internet stream tcp
root smbd 538  832* internet stream tcp
root smbd 538  833* internet stream tcp
root smbd 538  834* internet stream tcp
root smbd 538  835* internet stream tcp
root smbd 538  836* internet stream tcp
root smbd 538  837* internet stream tcp
root smbd 538  838* internet stream tcp
root smbd 538  839* internet stream tcp
root smbd 538  840* internet stream tcp
root smbd 538  841* internet stream tcp
root smbd 538  842* internet stream tcp
root smbd 538  843* internet stream tcp
root smbd 538  844* internet stream tcp
root smbd 538  845* internet stream tcp
root smbd 538  846* internet stream tcp
root smbd 538  847* internet stream tcp
root smbd 538  848* internet stream tcp
root smbd 538  849* internet stream tcp

from smb.conf(5)

max open files (G)

This parameter limits the maximum number of open files that one
smbd(8) file serving process may have open for a client at any one
time. The This parameter can be set very high (16404) as Samba uses
only one bit per unopened file. Setting this parameter lower than
16404 will cause Samba to complain and set this value back to the
minimum of 16404, as Windows 7 depends on this number of open file
handles being available.

The limit of the number of open files is usually set by the UNIX
per-process file descriptor limit rather than this parameter so you
should never need to touch this parameter.

Default: max open files = 16404


christos


Thanks!



Re: smbd (samba) opens too many files (fstat)

2017-09-29 Thread Andreas Beck
This problem exists also only on one server, why I could not clarify so 
far and have also built the latest package, without success.

When I restart smbd, then fstat (open files) is okay again.

Regards,
Andreas

Andreas Beck schrieb:

Hello,

one of my samba-servers opens too many files until notification "Too 
many open files) from the system.


fstat | grep smbd |wc -l
1704

after 2h.

Is there a way, to reduce open files in samba, or must I set more 
descriptors?
I think, 1704 open files, while copying 5GB small files, does not look 
good.


Regards,
Andreas

fstat:
...
root smbd 538  816* internet stream tcp
root smbd 538  817* internet stream tcp
root smbd 538  818* internet stream tcp
root smbd 538  819* internet stream tcp
root smbd 538  820* internet stream tcp
root smbd 538  821* internet stream tcp
root smbd 538  822* internet stream tcp
root smbd 538  823* internet stream tcp
root smbd 538  824* internet stream tcp
root smbd 538  825* internet stream tcp
root smbd 538  826* internet stream tcp
root smbd 538  827* internet stream tcp
root smbd 538  828* internet stream tcp
root smbd 538  829* internet stream tcp
root smbd 538  830* internet stream tcp
root smbd 538  831* internet stream tcp
root smbd 538  832* internet stream tcp
root smbd 538  833* internet stream tcp
root smbd 538  834* internet stream tcp
root smbd 538  835* internet stream tcp
root smbd 538  836* internet stream tcp
root smbd 538  837* internet stream tcp
root smbd 538  838* internet stream tcp
root smbd 538  839* internet stream tcp
root smbd 538  840* internet stream tcp
root smbd 538  841* internet stream tcp
root smbd 538  842* internet stream tcp
root smbd 538  843* internet stream tcp
root smbd 538  844* internet stream tcp
root smbd 538  845* internet stream tcp
root smbd 538  846* internet stream tcp
root smbd 538  847* internet stream tcp
root smbd 538  848* internet stream tcp
root smbd 538  849* internet stream tcp
...





smbd (samba) opens too many files (fstat)

2017-09-29 Thread Andreas Beck

Hello,

one of my samba-servers opens too many files until notification "Too 
many open files) from the system.


fstat | grep smbd |wc -l
1704

after 2h.

Is there a way, to reduce open files in samba, or must I set more 
descriptors?

I think, 1704 open files, while copying 5GB small files, does not look good.

Regards,
Andreas

fstat:
...
root smbd 538  816* internet stream tcp
root smbd 538  817* internet stream tcp
root smbd 538  818* internet stream tcp
root smbd 538  819* internet stream tcp
root smbd 538  820* internet stream tcp
root smbd 538  821* internet stream tcp
root smbd 538  822* internet stream tcp
root smbd 538  823* internet stream tcp
root smbd 538  824* internet stream tcp
root smbd 538  825* internet stream tcp
root smbd 538  826* internet stream tcp
root smbd 538  827* internet stream tcp
root smbd 538  828* internet stream tcp
root smbd 538  829* internet stream tcp
root smbd 538  830* internet stream tcp
root smbd 538  831* internet stream tcp
root smbd 538  832* internet stream tcp
root smbd 538  833* internet stream tcp
root smbd 538  834* internet stream tcp
root smbd 538  835* internet stream tcp
root smbd 538  836* internet stream tcp
root smbd 538  837* internet stream tcp
root smbd 538  838* internet stream tcp
root smbd 538  839* internet stream tcp
root smbd 538  840* internet stream tcp
root smbd 538  841* internet stream tcp
root smbd 538  842* internet stream tcp
root smbd 538  843* internet stream tcp
root smbd 538  844* internet stream tcp
root smbd 538  845* internet stream tcp
root smbd 538  846* internet stream tcp
root smbd 538  847* internet stream tcp
root smbd 538  848* internet stream tcp
root smbd 538  849* internet stream tcp
...



Re: proc.curproc.rlimit.descriptors.hard/soft can not be increased

2017-09-29 Thread Andreas Beck

Okay, ive done the job by editing /etc/login.conf.

Andreas Beck schrieb:

Hello,

ive a Problem with 8.0_BETA and increasing 
proc.curproc.rlimit.descriptors.hard and

proc.curproc.rlimit.descriptors.soft

When I do "sysctl -w" or in /etc/sysctl.conf the values cant be 
increased.


Increasing of kern.maxfiles is possible.


Best Regards,
Andreas





proc.curproc.rlimit.descriptors.hard/soft can not be increased

2017-09-29 Thread Andreas Beck

Hello,

ive a Problem with 8.0_BETA and increasing 
proc.curproc.rlimit.descriptors.hard and

proc.curproc.rlimit.descriptors.soft

When I do "sysctl -w" or in /etc/sysctl.conf the values cant be increased.

Increasing of kern.maxfiles is possible.


Best Regards,
Andreas



Re: Hypervisor advice

2017-07-29 Thread Andreas Beck
On Sat, Jul 29, 2017 at 10:50:34AM -0700, Andy Ruhl wrote:
> I've had a NetBSD/i386 machine that's been running since the late 90s
> and various hardware iterations. I think it's time to move it to a
> virtual machine. I need new hardware as well. It has about a 10 year
> old AMD processor and 1 gig of memory. This is plenty, but the
> hardware is getting unreliable.
> 
> I need advice on hypervisors and if it requires certain hardware,
> hardware advice as well.
> 
> bhyve appeals to me for obvious reasons but I've never used it. I use
> KVM and VMWare at work. Also VMWare Fusion on my Mac. Would prefer not
> to pay too much if I need to pay for something. Never tried Xen but I
> see posts about it here once in a while.
> 
> I plan on running other stuff on the hypervisor, probably OpenBSD.
> Possibly something else as well, maybe a NAS or something.
> 
> Thoughts?
> 
> Thanks.
> 
> Andy

Hi,
I use FreeBSD 11.1 with "vm" a managment tool for bhyve.
Im runing from "vm" netbsd and openbsd, successfully.
Sometimes @reboot the vm's comes not fully up.
I will try to solve the problem at a later time.

Best Regards,
Andreas


Re: NetBSD 8.0-BETA NFS Server over OpenVPN: mount_nfs: can't access /: Permission denied

2017-07-24 Thread Andreas Beck
On Mon, Jul 24, 2017 at 10:55:28AM +0200, Hauke Fath wrote:
> On 07/23/17 19:03, Andreas Beck wrote:
> > When I want to mount from the client, i get this error:
> > mount_nfs: can't access /: Permission denied
> 
> [...]
> 
> > /etc/exports
> > /  -network 10.8.0.0 -mask 255.255.255.255 -maproot=root
> 
> Unless 10.8.0.0 is the client's address (and you have
> net.inet.ip.hostzerobroadcast=0 to make use of the all-zeroes sublet
> address), your subnet mask will not match any host.
> 
> Cheerio,
> hauke
> 
> 
> 
> -- 
>  The ASCII Ribbon CampaignHauke Fath
> () No HTML/RTF in email   Institut für Nachrichtentechnik
> /\ No Word docs in email TU Darmstadt
>  Respect for open standards  Ruf +49-6151-16-21344

Yes, right.
255.255.255.255 cant work.
This was the Problem, and now it works!

Regards,
Andreas


Re: NetBSD 8.0-BETA NFS Server over OpenVPN: mount_nfs: can't access /: Permission denied

2017-07-23 Thread Andreas Beck

Andreas Beck schrieb:



=> Hello,
=>
=> i want to use nfsd via openvpn (openvpn runs on udp).
=> Both, Server and Client are NetBSD8-BETA
=>
=> When I want to mount from the client, i get this error:
=> mount_nfs: can't access /: Permission denied
=>
=> [...]
=>
=> /etc/exports
=> /  -network 10.8.0.0 -mask 255.255.255.255 -maproot=root
=>
=> Ive created for testing a hosts.allow with ALL: ALL.
=> There is no hosts.deny.
=>
=> Best Regards,
=> Andreas
=>

Does "/etc/rc.d/mountd reload" or "/etc/rc.d/mountd restart" 
help? If

the openvpn network doesn't exist when mountd starts then it may not be
setting up the exports properly.

  Gary Duzan




Hi Gary,
reloading or restarting from mountd isnt fixing the problem, after 
restarting mountd, the same problem.

mount_nfs: can't access /: Permission denied

Andreas

With:
/  -network 127.0.0.0 -mask 255.0.0.0 -maproot=root
and mounting from local, absoluty no problem.

NFSD over openvpn is under all system always an annoyance and must set 
certain options so that it works.


Regards,
Andreas


Re: NetBSD 8.0-BETA NFS Server over OpenVPN: mount_nfs: can't access /: Permission denied

2017-07-23 Thread Andreas Beck



=> Hello,
=>
=> i want to use nfsd via openvpn (openvpn runs on udp).
=> Both, Server and Client are NetBSD8-BETA
=>
=> When I want to mount from the client, i get this error:
=> mount_nfs: can't access /: Permission denied
=>
=> [...]
=>
=> /etc/exports
=> /  -network 10.8.0.0 -mask 255.255.255.255 -maproot=root
=>
=> Ive created for testing a hosts.allow with ALL: ALL.
=> There is no hosts.deny.
=>
=> Best Regards,
=> Andreas
=>

Does "/etc/rc.d/mountd reload" or "/etc/rc.d/mountd restart" help? If
the openvpn network doesn't exist when mountd starts then it may not be
setting up the exports properly.

  Gary Duzan




Hi Gary,
reloading or restarting from mountd isnt fixing the problem, after 
restarting mountd, the same problem.

mount_nfs: can't access /: Permission denied

Andreas


NetBSD 8.0-BETA NFS Server over OpenVPN: mount_nfs: can't access /: Permission denied

2017-07-23 Thread Andreas Beck

Hello,

i want to use nfsd via openvpn (openvpn runs on udp).
Both, Server and Client are NetBSD8-BETA

When I want to mount from the client, i get this error:
mount_nfs: can't access /: Permission denied

From client: rpcinfo -p 
   program vers proto   port  service
104   tcp111  portmapper
103   tcp111  portmapper
102   tcp111  portmapper
104   udp111  portmapper
103   udp111  portmapper
102   udp111  portmapper
104 local111  portmapper
103 local111  portmapper
102 local111  portmapper
151   udp   1022  mountd
153   udp   1022  mountd
151   tcp   1023  mountd
153   tcp   1023  mountd
132   udp   2049  nfs
133   udp   2049  nfs
132   tcp   2049  nfs
133   tcp   2049  nfs
1000241   udp   1021  status
1000241   tcp   1022  status
1000210   udp   1020  nlockmgr
1000211   udp   1020  nlockmgr
1000213   udp   1020  nlockmgr
1000214   udp   1020  nlockmgr
1000210   tcp   1021  nlockmgr
1000211   tcp   1021  nlockmgr
1000213   tcp   1021  nlockmgr
1000214   tcp   1021  nlockmgr

/etc/exports
/  -network 10.8.0.0 -mask 255.255.255.255 -maproot=root

Ive created for testing a hosts.allow with ALL: ALL.
There is no hosts.deny.

Best Regards,
Andreas


Re: NetBSD 8 install image for amd64?

2017-06-21 Thread Andreas Beck

http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-8/201706190930Z/images/

Greets,
Andreas

Jukka Marin schrieb:

Hi,

Is the NetBSD 8 install image for amd64 available somewhere?  I need
to install from USB stick, so the .iso image does not work (and I have
no suitable NetBSD system to build the image myself).

Thanks!

   -jm





Re: xsane and root permissions

2017-06-15 Thread Andreas Beck

yes, I think so too, in the manpage ive send here are three devices listed.
http://netbsd.gw.com/cgi-bin/man-cgi?ss+4.i386+NetBSD-7.0.2

BERTRAND Joël schrieb:

Andreas Beck a écrit :

https://wiki.netbsd.org/scanner/
"


   User access

To grant another user access to use the scanner, create a 'scanner' 
group.


|# groupadd scanner |

Add user to the group scanner:

|# usermod -G scanner user_name |

Change group for a device:

|# chgrp scanner /dev/ugen* |

For some drivers, you also need access to the usb bus devices:

|# chgrp scanner /dev/usb* |

Also check if the permissions are sufficient, otherwise also do:

|# chmod g+rw /dev/usb* /dev/ugen* "|



I have tried a lot of different configuration withouts any result. 
As my scanner was unreachable, I have tried with 777 permissions (on 
/dev/ss0, it's a SCSI scanner). Same result.


Thus, I have tried with root privileges and it works as expected. 
I suppose xsane uses another device or file...


Regards,

JB





Re: xsane and root permissions

2017-06-15 Thread Andreas Beck

http://netbsd.gw.com/cgi-bin/man-cgi?ss+4.i386+NetBSD-7.0.2

Andreas Beck schrieb:

https://wiki.netbsd.org/scanner/
"


   User access

To grant another user access to use the scanner, create a 'scanner' 
group.


|# groupadd scanner |

Add user to the group scanner:

|# usermod -G scanner user_name |

Change group for a device:

|# chgrp scanner /dev/ugen* |

For some drivers, you also need access to the usb bus devices:

|# chgrp scanner /dev/usb* |

Also check if the permissions are sufficient, otherwise also do:

|# chmod g+rw /dev/usb* /dev/ugen* "|

Good Day,
Andreas

Andreas Beck schrieb:
currently, ive no netbsd installation on this place. But, do u have 
added the user to other needed groups, something like, scanner, sane, 
saned... stuff like that?



BERTRAND Joël schrieb:

Andreas Beck a écrit :

Hi,
put your user in the staff group and test it with chmod 777 /dev/ss0
(only for testing, chmod 777)
If its not working, its no rights Problem.


Thanks for your answer. My user is in staff group and 
permissions on /dev/ss0 is 777. With root privileges, xsane runs as 
expected.


If it's not a permission issue, I don't know what kind of 
trouble it could be...


Regards,

JB








Re: xsane and root permissions

2017-06-15 Thread Andreas Beck

https://wiki.netbsd.org/scanner/
"


   User access

To grant another user access to use the scanner, create a 'scanner' group.

|# groupadd scanner |

Add user to the group scanner:

|# usermod -G scanner user_name |

Change group for a device:

|# chgrp scanner /dev/ugen* |

For some drivers, you also need access to the usb bus devices:

|# chgrp scanner /dev/usb* |

Also check if the permissions are sufficient, otherwise also do:

|# chmod g+rw /dev/usb* /dev/ugen* "|

Good Day,
Andreas

Andreas Beck schrieb:
currently, ive no netbsd installation on this place. But, do u have 
added the user to other needed groups, something like, scanner, sane, 
saned... stuff like that?



BERTRAND Joël schrieb:

Andreas Beck a écrit :

Hi,
put your user in the staff group and test it with chmod 777 /dev/ss0
(only for testing, chmod 777)
If its not working, its no rights Problem.


Thanks for your answer. My user is in staff group and permissions 
on /dev/ss0 is 777. With root privileges, xsane runs as expected.


If it's not a permission issue, I don't know what kind of trouble 
it could be...


Regards,

JB






Re: xsane and root permissions

2017-06-15 Thread Andreas Beck
currently, ive no netbsd installation on this place. But, do u have 
added the user to other needed groups, something like, scanner, sane, 
saned... stuff like that?



BERTRAND Joël schrieb:

Andreas Beck a écrit :

Hi,
put your user in the staff group and test it with chmod 777 /dev/ss0
(only for testing, chmod 777)
If its not working, its no rights Problem.


Thanks for your answer. My user is in staff group and permissions 
on /dev/ss0 is 777. With root privileges, xsane runs as expected.


If it's not a permission issue, I don't know what kind of trouble 
it could be...


Regards,

JB




Re: xsane and root permissions

2017-06-15 Thread Andreas Beck

Hi,
put your user in the staff group and test it with chmod 777 /dev/ss0 
(only for testing, chmod 777)

If its not working, its no rights Problem.

Andreas

BERTRAND Joël schrieb:

Hello,

I use a venerable Agfa scanner 1236S (SCSI) on a Digital PWS500au 
workstation running NetBSD 8 (8.99.1 kernel). This scanner is known as 
/dev/ss0 and runs as expected with root privileges.


If I try to use xsane (or sane in CLI) as regular user, xsane 
doesn't see my scanner. Of course, I have checked that permissions of 
/dev/ss0 are root:staff rw-rw-rw-. I suppose I have forgotten 
something, but I'm unable to find a solution.


Any idea ?

Best regards,

JB