server drop network connections

2011-02-28 Thread Lep Names
  Hello.  I have so strange trouble:  every week my server drop all network 
connections - ssh,ping etc.  But it continue working.  tech support can access 
it over kvm.
after reboot everything works fine for a week.  it seems to me that it's 
trouble 
in mbufs.

FreeBSD  8.1-RELEASE-p2

sysctl.conf:
security.bsd.see_other_uids=0
kern.ipc.somaxconn=2048
net.inet.icmp.drop_redirect=1
#net.inet.icmp.log_redirect=1
net.inet.tcp.blackhole=2
net.inet.tcp.drop_synfin=1
net.inet.tcp.sendspace=131072
net.inet.tcp.recvspace=65536
net.inet.udp.recvspace=32768
kern.fallback_elf_brand=-1
net.inet.ip.maxfragpackets=1024
kern.sync_on_panic=1
vfs.ufs.dirhash_maxmem=1
kern.polling.burst_max=1000
kern.polling.each_burst=1000
kern.polling.reg_frac=100
kern.polling.user_frac=1
kern.maxvnodes=256000
net.inet.ip.intr_queue_maxlen=256
#dev.em.0.rx_processing_limit=1000
#dev.em.1.rx_processing_limit=1000
net.inet.tcp.recvbuf_auto=0
net.inet.tcp.sendbuf_auto=0
net.inet.tcp.tso=0
net.isr.direct=1
net.route.netisr_maxqlen=1024
#net.inet.flowtable.nmbflows=8192
kern.ipc.nmbclusters=65536
net.inet.ip.portrange.first=1024
net.inet.ip.portrange.hifirst=1024
net.inet.tcp.hostcache.expire=1200
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.finwait2_timeout=3000
net.inet.tcp.keepinit=5000
net.inet.tcp.nolocaltimewait=1
net.inet.tcp.maxtcptw=65536
net.inet.tcp.msl=3000
kern.coredump=1
kern.random.sys.harvest.interrupt=0
kern.random.sys.harvest.ethernet=0
net.inet.udp.blackhole=1

netstat -m
868/1052/1920 mbufs in use (current/cache/total)
715/923/1638/65536 mbuf clusters in use (current/cache/total/max)
709/443 mbuf+clusters out of packet secondary zone in use (current/cache)
0/35/35/12800 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
1647K/2249K/3896K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
139/313/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
4031 requests for I/O initiated by sendfile
0 calls to protocol drain routines

it seems to me that i must enlarge 1920 value, but i do not know how. 
 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: server drop network connections

2011-02-28 Thread Michael Powell
Lep Names wrote:

   Hello.  I have so strange trouble:  every week my server drop all
   network
 connections - ssh,ping etc.  But it continue working.  tech support can
 access it over kvm.
 after reboot everything works fine for a week.  it seems to me that it's
 trouble in mbufs.
 
 FreeBSD  8.1-RELEASE-p2
 
 sysctl.conf:
 security.bsd.see_other_uids=0
 kern.ipc.somaxconn=2048
 net.inet.icmp.drop_redirect=1
 #net.inet.icmp.log_redirect=1
 net.inet.tcp.blackhole=2
 net.inet.tcp.drop_synfin=1
 net.inet.tcp.sendspace=131072
 net.inet.tcp.recvspace=65536
 net.inet.udp.recvspace=32768
 kern.fallback_elf_brand=-1
 net.inet.ip.maxfragpackets=1024
 kern.sync_on_panic=1
 vfs.ufs.dirhash_maxmem=1
 kern.polling.burst_max=1000
 kern.polling.each_burst=1000
 kern.polling.reg_frac=100
 kern.polling.user_frac=1
 kern.maxvnodes=256000
 net.inet.ip.intr_queue_maxlen=256
 #dev.em.0.rx_processing_limit=1000
 #dev.em.1.rx_processing_limit=1000
 net.inet.tcp.recvbuf_auto=0
 net.inet.tcp.sendbuf_auto=0
 net.inet.tcp.tso=0
 net.isr.direct=1
 net.route.netisr_maxqlen=1024
 #net.inet.flowtable.nmbflows=8192
 kern.ipc.nmbclusters=65536
 net.inet.ip.portrange.first=1024
 net.inet.ip.portrange.hifirst=1024
 net.inet.tcp.hostcache.expire=1200
 net.inet.tcp.fast_finwait2_recycle=1
 net.inet.tcp.finwait2_timeout=3000
 net.inet.tcp.keepinit=5000
 net.inet.tcp.nolocaltimewait=1
 net.inet.tcp.maxtcptw=65536
 net.inet.tcp.msl=3000
 kern.coredump=1
 kern.random.sys.harvest.interrupt=0
 kern.random.sys.harvest.ethernet=0
 net.inet.udp.blackhole=1
 
 netstat -m
 868/1052/1920 mbufs in use (current/cache/total)
 715/923/1638/65536 mbuf clusters in use (current/cache/total/max)
 709/443 mbuf+clusters out of packet secondary zone in use (current/cache)
 0/35/35/12800 4k (page size) jumbo clusters in use
 (current/cache/total/max) 0/0/0/6400 9k jumbo clusters in use
 (current/cache/total/max) 0/0/0/3200 16k jumbo clusters in use
 (current/cache/total/max) 1647K/2249K/3896K bytes allocated to network
 (current/cache/total) 0/0/0 requests for mbufs denied
 (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied
 (4k/9k/16k) 139/313/6656 sfbufs in use (current/peak/max)
 0 requests for sfbufs denied
 0 requests for sfbufs delayed
 4031 requests for I/O initiated by sendfile
 0 calls to protocol drain routines
 
 it seems to me that i must enlarge 1920 value, but i do not know how.
  Thanks

You may wish to try adding (or changing) these to /etc/sysctl.conf and 
reboot:

kern.ipc.nmbclusters=32768
kern.ipc.somaxconn=4096   
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
kern.ipc.maxsockbuf=4194304

I see your nmbclusters is already larger than mine. I don't remember the 
exact relationship right off the top of my head (it's in the docs), but 
there is a ratio releationship between nmbclusters and some of the other 
parameters. IIRC increasing nmbclusters means increasing these others in 
proportion as well.

And possibly consider these maybe too:

net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvspace=131072
net.inet.tcp.sendbuf_max=16777216 
net.inet.tcp.sendspace=131072  

If these kinds of changes only make it so the problem continues to surface, 
but at a different time interval, you might want to search the lists (-
stable and -current, as well as bug tracker) for similar troubles 
experienced by others. I believe I have seen a couple of reports which sound 
similar to what you're describing.

If you locate such, pay particular attention to the specific hardware NIC 
and driver combination. If it is exactly the same as yours and a patch has 
been created which resolves the problem check and see if it has been MFC'd 
to -stable. In such a case (where you have _exactly_ the same problem) a 
possible solution is to then upgrade your box to -stable. I don't 
necessarily recommend blindly 'trying' -stable just to see what happens on a 
production box - it is possible to create new problems as a result. But if 
there exists a fix for exactly the problem that's where you'll likely find 
it.

-Mike
  



___
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: pam ssh authentication via ldap

2011-02-28 Thread krad
On 28 February 2011 01:06, Tim Dunphy bluethu...@gmail.com wrote:
 Hello Krad and thank you for your reply!


 Well it seems that I am still unable to login to this machine using an
 LDAP account. I have tried applying the configurations you have
 provided and the result doesn't seem to have changed just yet.

  Here is my /usr/local/etc/ldap.conf file


 uri ldap://LBSD2.summitnjhome.com
 base dc=summitnjhome,dc=com
 sudoers_base ou=staff,ou=Group,dc=summitnjhome,dc=com
 binddn cn=pam_ldap,ou=Services,dc=summitnjhome,dc=com
 bindpw secret
 scope sub
 ssl start tls
 tls_cacert /usr/local/etc/openldap/certs/LBSD2.summitnjhome.com.crt
 pam_login_attribute uid
 bind_timelimit 1
 timelimit 1
 bind_policy soft
 pam_password exop
 nss_base_passwd dc=summitnjhome,dc=com
 nss_base_shadow dc=summitnjhome,dc=com
 nss_base_group  dc=summitnjhome,dc=com
 nss_base_sudo   dc=summitnjhome,dc=com
 nss_initgroups_ignoreusers root,slapd



  #ls -l /usr/local/etc/nss_ldap.conf
 lrwxr-xr-x  1 root  wheel  24 Feb 28 00:10
 /usr/local/etc/nss_ldap.conf - /usr/local/etc/ldap.conf


 #cat /usr/local/etc/nsswitch.conf
 #
 # nsswitch.conf(5) - name service switch configuration file
 # $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1.2.1 2009/10/25 01:10:29
 kensmith Exp $
 #
 passwd: cache files ldap [notfound=return]
 passwd_compat: files ldap
 group: cache files ldap [notfound = return]
 group_compat: nis
 sudoers: ldap
 hosts: files dns
 networks: files
 shells: files
 services: compat
 services_compat: nis
 protocols: files
 rpc: files

 Here is my slapd.conf file:


 #
 # See slapd.conf(5) for details on configuration options.
 # This file should NOT be world readable.
 #
 include         /usr/local/etc/openldap/schema/core.schema
 include         /usr/local/etc/openldap/schema/cosine.schema
 include         /usr/local/etc/openldap/schema/inetorgperson.schema
 include         /usr/local/etc/openldap/schema/openldap.schema
 include         /usr/local/etc/openldap/schema/sudo.schema
 include         /usr/local/etc/openldap/schema/nis.schema
 include         /usr/local/etc/openldap/schema/misc.schema
 include         /usr/local/etc/openldap/schema/openssh-lpk_openldap.schema
 # Define global ACLs to disable default read access.

 # Do not enable referrals until AFTER you have a working directory
 # service AND an understanding of referrals.
 #referral       ldap://root.openldap.org

 loglevel        296
 pidfile         /var/run/openldap/slapd.pid
 argsfile        /var/run/openldap/slapd.args

 ## TLS options for slapd
 TLSCipherSuite HIGH:MEDIUM:+SSLv2
 TLSCertificateFile  /usr/local/etc/openldap/certs/LBSD2.summitnjhome.com.crt
 TLSCertificateKeyFile /usr/local/etc/openldap/certs/LBSD2.summitnjhome.com.key
 TLSCACertificateFile /usr/local/etc/openldap/certs/gd_bundle.crt

 # Load dynamic backend modules:
 modulepath      /usr/local/libexec/openldap
 moduleload      back_bdb
 # moduleload    back_hdb
 # moduleload    back_ldap

 # Sample security restrictions
 #       Require integrity protection (prevent hijacking)
 #       Require 112-bit (3DES or better) encryption for updates
 #       Require 63-bit encryption for simple bind
 # security ssf=1 update_ssf=112 simple_bind=64

 # Sample access control policy:
 #       Root DSE: allow anyone to read it
 #       Subschema (sub)entry DSE: allow anyone to read it
 #       Other DSEs:
 #               Allow self write access
 #               Allow authenticated users read access
 #               Allow anonymous users to authenticate
 #       Directives needed to implement policy:
 # access to dn.base= by * read
 access to *
          by read

 access to attrs=userPassword by self write
          by anonymous auth

 access to * by self write
            by dn.children=ou=summitnjops,ou=staff,dc=summitnjhome,dc=com
 write
            by users read
            by anonymous auth

 access to * by self write
            by users read
            by anonymous auth
 #
 # if no access controls are present, the default policy
 # allows anyone and everyone to read anything but restricts
 # updates to rootdn.  (e.g., access to * by * read)
 #
 # rootdn can always read and write EVERYTHING!

 ###
 # BDB database definitions
 ###

 database        bdb
 suffix          dc=summitnjhome,dc=com
 rootdn          cn=Manager,dc=summitnjhome,dc=com
 rootpw          {SSHA}secret

 # Cleartext passwords, especially for the rootdn, should
 # be avoid.  See slappasswd(8) and slapd.conf(5) for details.
 # Use of strong authentication encouraged.
 # The database directory MUST exist prior to running slapd AND
 # should only be accessible by the slapd and slap tools.
 # Mode 700 recommended.
 directory       /var/db/summitnjhome.com
 # Indices to maintain
 index   objectClass,uid,uidNumber       eq
 index   sudoUser        eq


 these are the packages I have installed


 

Re: Problem upgrading from 8.1-8.2, ZFS as root filesystem

2011-02-28 Thread krad
On 27 February 2011 21:29, Scott Ballantyne boyva...@gmail.com wrote:
 On Sun, Feb 27, 2011 at 4:04 PM, Adam Vande More amvandem...@gmail.comwrote:

 On Sun, Feb 27, 2011 at 2:36 PM, Scott Ballantyne boyva...@gmail.comwrote:


 ===sys/boot/i386/zfsloader (install)

 cp zfsloader.sym zfsloader.bin
 cp:No such file or directory
 *** Error code 1
 Stop in /usr/src/sys/boot/i386/zfsloader
 *** Error code 1

 Stop in /usr/src/sys/boot/i386

 Any suggestions would be *very* appreciated!

 Thanks,
 Scott


 You can follow the intructions for building the loader which I believe are
 in the wiki or set LOADER_ZFS_SUPPORT=YES in /etc/src.conf prior to upgrade.


 Thanks Adam, but it still comes to a screaming stop with that set.
 ___
 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


mines in make.conf not src and it built fine
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread c0re
2011/1/6 Matthew Seaman m.sea...@infracaninophile.co.uk:
 On 06/01/2011 11:26, c0re wrote:
 # df -h
 Filesystem     Size    Used   Avail Capacity  Mounted on
 /dev/ad0s1a    496M    466M   -9.8M   102%    /

 So it's full.

 But by du it's not appeared to be full


 # du -hxd 1 /
 2.0K    /.snap
 512B    /dev
 2.0K    /tmp
 2.0K    /usr
 2.0K    /var
 1.9M    /etc
 2.0K    /cdrom
 2.0K    /dist
 1.0M    /bin
 131M    /boot
  10M    /lib
 356K    /libexec
 2.0K    /media
  12K    /mnt
 2.0K    /proc
 7.2M    /rescue
 296K    /root
 4.7M    /sbin
 4.0K    /lost+found
 157M    /


 Do you have partitions mounted at /tmp, /usr, /var etc?  Does the output
 of your du command change if you unmount those partitions?
 (It might be an idea to boot into a livefs CD or DVD given that du(1)
 lives in /usr/bin, so a bit tricky to unmount /usr and then run du)

 My guess is that you've at one time created files beneath what is
 usually a mount point.  Mounting the partition over them makes those
 files inaccessible, but they still take up space on the drive.

        Cheers,

        Matthew

 --
 Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
 JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW



At last I found time to check it.
Booted with frenzy life cd, mounted only / partition and saw trash
/var/spool. Deleted it and it solved problem.
But later was and idea to mount device of / (/dev/da0s1a) as /mnt/root
and just delete those files without need of livecd. It works in Linux.
But in freebsd i got

# mount /dev/da0s1a /mnt/root/
mount: /dev/da0s1a : Operation not permitted

So only single user mode or live cd could solve it.

Thanks Matthew for an idea!
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Mon Feb 28 05:31:46 2011
 Date: Mon, 28 Feb 2011 14:24:30 +0300
 From: c0re nr1c...@gmail.com
 To: Matthew Seaman m.sea...@infracaninophile.co.uk
 Cc: FreeBSD freebsd-questions@freebsd.org
 Subject: Re: / file system is full, but du does not show that it's full

 2011/1/6 Matthew Seaman m.sea...@infracaninophile.co.uk:
  On 06/01/2011 11:26, c0re wrote:
  # df -h
  Filesystem SizeUsed   Avail Capacity  Mounted on
  /dev/ad0s1a496M466M   -9.8M   102%/
 
  So it's full.
 
  But by du it's not appeared to be full
 
 
  # du -hxd 1 /
  2.0K/.snap
  512B/dev
  2.0K/tmp
  2.0K/usr
  2.0K/var
  1.9M/etc
  2.0K/cdrom
  2.0K/dist
  1.0M/bin
  131M/boot
   10M/lib
  356K/libexec
  2.0K/media
   12K/mnt
  2.0K/proc
  7.2M/rescue
  296K/root
  4.7M/sbin
  4.0K/lost+found
  157M/
 
 
  Do you have partitions mounted at /tmp, /usr, /var etc?  Does the 
  output of your du command change if you unmount those partitions? (It 
  might be an idea to boot into a livefs CD or DVD given that du(1) lives 
  in /usr/bin, so a bit tricky to unmount /usr and then run du)
 
  My guess is that you've at one time created files beneath what is 
  usually a mount point.  Mounting the partition over them makes those 
  files inaccessible, but they still take up space on the drive.
 
 Cheers,
 
 Matthew
 
  --
  Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
   Flat 3
  PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: 
  matt...@infracaninophile.co.uk   Kent, CT11 9PW
 
 

 At last I found time to check it. Booted with frenzy life cd, mounted 
 only / partition and saw trash
 /var/spool. Deleted it and it solved problem.
 But later was and idea to mount device of / (/dev/da0s1a) as /mnt/root 
 and just delete those files without need of livecd. It works in Linux. 
 But in freebsd i got

 # mount /dev/da0s1a /mnt/root/
 mount: /dev/da0s1a : Operation not permitted

 So only single user mode or live cd could solve it.

*NOT* true.  Stopping any daemons that were using /var/spooll, and then
umount(1)-ing it would have done the trick from multi-user mode.


___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Chris Rees
On 28 Feb 2011 12:12, Robert Bonomi bon...@mail.r-bonomi.com wrote:

  From owner-freebsd-questi...@freebsd.org  Mon Feb 28 05:31:46 2011
  Date: Mon, 28 Feb 2011 14:24:30 +0300
  From: c0re nr1c...@gmail.com
  To: Matthew Seaman m.sea...@infracaninophile.co.uk
  Cc: FreeBSD freebsd-questions@freebsd.org
  Subject: Re: / file system is full, but du does not show that it's full
 
  2011/1/6 Matthew Seaman m.sea...@infracaninophile.co.uk:
   On 06/01/2011 11:26, c0re wrote:
   # df -h
   Filesystem SizeUsed   Avail Capacity  Mounted on
   /dev/ad0s1a496M466M   -9.8M   102%/
  
   So it's full.
  
   But by du it's not appeared to be full
  
  
   # du -hxd 1 /
   2.0K/.snap
   512B/dev
   2.0K/tmp
   2.0K/usr
   2.0K/var
   1.9M/etc
   2.0K/cdrom
   2.0K/dist
   1.0M/bin
   131M/boot
10M/lib
   356K/libexec
   2.0K/media
12K/mnt
   2.0K/proc
   7.2M/rescue
   296K/root
   4.7M/sbin
   4.0K/lost+found
   157M/
  
  
   Do you have partitions mounted at /tmp, /usr, /var etc?  Does the
   output of your du command change if you unmount those partitions? (It
   might be an idea to boot into a livefs CD or DVD given that du(1)
lives
   in /usr/bin, so a bit tricky to unmount /usr and then run du)
  
   My guess is that you've at one time created files beneath what is
   usually a mount point.  Mounting the partition over them makes those
   files inaccessible, but they still take up space on the drive.
  
  Cheers,
  
  Matthew
  
   --
   Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
Flat 3
   PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID:
   matt...@infracaninophile.co.uk   Kent, CT11 9PW
  
  
 
  At last I found time to check it. Booted with frenzy life cd, mounted
  only / partition and saw trash
  /var/spool. Deleted it and it solved problem.
  But later was and idea to mount device of / (/dev/da0s1a) as /mnt/root
  and just delete those files without need of livecd. It works in Linux.
  But in freebsd i got
 
  # mount /dev/da0s1a /mnt/root/
  mount: /dev/da0s1a : Operation not permitted
 
  So only single user mode or live cd could solve it.

 *NOT* true.  Stopping any daemons that were using /var/spooll, and then
 umount(1)-ing it would have done the trick from multi-user mode.




umount /   ???

Chris
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Damien Fleuriot


On 2/28/11 12:24 PM, c0re wrote:
 2011/1/6 Matthew Seaman m.sea...@infracaninophile.co.uk:
 On 06/01/2011 11:26, c0re wrote:
 # df -h
 Filesystem SizeUsed   Avail Capacity  Mounted on
 /dev/ad0s1a496M466M   -9.8M   102%/

 So it's full.

 But by du it's not appeared to be full


 # du -hxd 1 /
 2.0K/.snap
 512B/dev
 2.0K/tmp
 2.0K/usr
 2.0K/var
 1.9M/etc
 2.0K/cdrom
 2.0K/dist
 1.0M/bin
 131M/boot
  10M/lib
 356K/libexec
 2.0K/media
  12K/mnt
 2.0K/proc
 7.2M/rescue
 296K/root
 4.7M/sbin
 4.0K/lost+found
 157M/


 Do you have partitions mounted at /tmp, /usr, /var etc?  Does the output
 of your du command change if you unmount those partitions?
 (It might be an idea to boot into a livefs CD or DVD given that du(1)
 lives in /usr/bin, so a bit tricky to unmount /usr and then run du)

 My guess is that you've at one time created files beneath what is
 usually a mount point.  Mounting the partition over them makes those
 files inaccessible, but they still take up space on the drive.

Cheers,

Matthew

 --
 Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW


 
 At last I found time to check it.
 Booted with frenzy life cd, mounted only / partition and saw trash
 /var/spool. Deleted it and it solved problem.
 But later was and idea to mount device of / (/dev/da0s1a) as /mnt/root
 and just delete those files without need of livecd. It works in Linux.
 But in freebsd i got
 
 # mount /dev/da0s1a /mnt/root/
 mount: /dev/da0s1a : Operation not permitted
 
 So only single user mode or live cd could solve it.
 
 Thanks Matthew for an idea!


You're not really trying to umount / on a running system are 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: / file system is full, but du does not show that it's full

2011-02-28 Thread Chris Rees
On 28 February 2011 12:26, Chris Rees utis...@gmail.com wrote:
 
  # mount /dev/da0s1a /mnt/root/
  mount: /dev/da0s1a : Operation not permitted
 
  So only single user mode or live cd could solve it.

 *NOT* true.  Stopping any daemons that were using /var/spooll, and then
 umount(1)-ing it would have done the trick from multi-user mode.

 umount /   ???

 Chris

Er, caffeine overdose.

I guess you meant:

# umount /var



I'll hide now.

Chris
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Damien Fleuriot
On 2/28/11 1:27 PM, Chris Rees wrote:
 On 28 February 2011 12:26, Chris Rees utis...@gmail.com wrote:

 # mount /dev/da0s1a /mnt/root/
 mount: /dev/da0s1a : Operation not permitted

 So only single user mode or live cd could solve it.

 *NOT* true.  Stopping any daemons that were using /var/spooll, and then
 umount(1)-ing it would have done the trick from multi-user mode.

 umount /   ???

 Chris
 
 Er, caffeine overdose.
 
 I guess you meant:
 
 # umount /var
 
 
 
 I'll hide now.
 
 Chris


Slice a (as in: da0s1a) is very likely his /

/var is usually slice f
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Chris Rees
On 28 February 2011 12:29, Damien Fleuriot m...@my.gd wrote:
 On 2/28/11 1:27 PM, Chris Rees wrote:
 On 28 February 2011 12:26, Chris Rees utis...@gmail.com wrote:

 # mount /dev/da0s1a /mnt/root/
 mount: /dev/da0s1a : Operation not permitted

 So only single user mode or live cd could solve it.

 *NOT* true.  Stopping any daemons that were using /var/spooll, and then
 umount(1)-ing it would have done the trick from multi-user mode.

 umount /   ???

 Chris

 Er, caffeine overdose.

 I guess you meant:

 # umount /var
 Slice a (as in: da0s1a) is very likely his /

 /var is usually slice f

Yeah, that's why I sent the first email.

However, it's now clear to me that c0re wanted to remount his / on a
different partition to delete a file hidden by /var.

Hence the suggestion from Robert to umount /var.

Chris
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Polytropon
On Mon, 28 Feb 2011 13:29:59 +0100, Damien Fleuriot m...@my.gd wrote:
 Slice a (as in: da0s1a) is very likely his /
 
 /var is usually slice f

Terminology: Slices are with numbers, partitions are with letters. :-)

E. g. da0s1 is the FreeBSD slice, its partition a = da0s1a is /,
while /var corresponds to partition da0s1f.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread Arthur Chance

On 02/28/11 12:47, Polytropon wrote:

On Mon, 28 Feb 2011 13:29:59 +0100, Damien Fleuriotm...@my.gd  wrote:

Slice a (as in: da0s1a) is very likely his /

/var is usually slice f


Terminology: Slices are with numbers, partitions are with letters. :-)

E. g. da0s1 is the FreeBSD slice, its partition a = da0s1a is /,
while /var corresponds to partition da0s1f.


Unless you've got GPT disks where there are usually only partitions and 
they're numbered:


arthur@fileserver gpart show ada5
=   34  976773101  ada5  GPT  (466G)
 34  6- free -  (3.0K)
 40 64 1  freebsd-boot  (32K)
1042097152 2  freebsd-ufs  (1.0G)
20972562097152 3  freebsd-ufs  (1.0G)
41944088388608 4  freebsd-swap  (4.0G)
   12583016  964190119 5  freebsd-ufs  (460G)

arthur@fileserver ls /dev/ada5*
/dev/ada5   /dev/ada5p1 /dev/ada5p2 /dev/ada5p3 /dev/ada5p4 
/dev/ada5p5

Personally I prefer labelling everything, which GPT makes easier.
___
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: / file system is full, but du does not show that it's full

2011-02-28 Thread c0re
2011/2/28 Robert Bonomi bon...@mail.r-bonomi.com:
 From owner-freebsd-questi...@freebsd.org  Mon Feb 28 05:31:46 2011
 Date: Mon, 28 Feb 2011 14:24:30 +0300
 From: c0re nr1c...@gmail.com
 To: Matthew Seaman m.sea...@infracaninophile.co.uk
 Cc: FreeBSD freebsd-questions@freebsd.org
 Subject: Re: / file system is full, but du does not show that it's full

 2011/1/6 Matthew Seaman m.sea...@infracaninophile.co.uk:
  On 06/01/2011 11:26, c0re wrote:
  # df -h
  Filesystem     Size    Used   Avail Capacity  Mounted on
  /dev/ad0s1a    496M    466M   -9.8M   102%    /
 
  So it's full.
 
  But by du it's not appeared to be full
 
 
  # du -hxd 1 /
  2.0K    /.snap
  512B    /dev
  2.0K    /tmp
  2.0K    /usr
  2.0K    /var
  1.9M    /etc
  2.0K    /cdrom
  2.0K    /dist
  1.0M    /bin
  131M    /boot
   10M    /lib
  356K    /libexec
  2.0K    /media
   12K    /mnt
  2.0K    /proc
  7.2M    /rescue
  296K    /root
  4.7M    /sbin
  4.0K    /lost+found
  157M    /
 
 
  Do you have partitions mounted at /tmp, /usr, /var etc?  Does the
  output of your du command change if you unmount those partitions? (It
  might be an idea to boot into a livefs CD or DVD given that du(1) lives
  in /usr/bin, so a bit tricky to unmount /usr and then run du)
 
  My guess is that you've at one time created files beneath what is
  usually a mount point.  Mounting the partition over them makes those
  files inaccessible, but they still take up space on the drive.
 
         Cheers,
 
         Matthew
 
  --
  Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                   Flat 3
  PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate JID:
  matt...@infracaninophile.co.uk               Kent, CT11 9PW
 
 

 At last I found time to check it. Booted with frenzy life cd, mounted
 only / partition and saw trash
 /var/spool. Deleted it and it solved problem.
 But later was and idea to mount device of / (/dev/da0s1a) as /mnt/root
 and just delete those files without need of livecd. It works in Linux.
 But in freebsd i got

 # mount /dev/da0s1a /mnt/root/
 mount: /dev/da0s1a : Operation not permitted

 So only single user mode or live cd could solve it.

 *NOT* true.  Stopping any daemons that were using /var/spooll, and then
 umount(1)-ing it would have done the trick from multi-user mode.


Yeah, not true.

Checked with lsof /var and it was used by these daemons:

devd
syslogd
rpcbind
snmpd
mysqld
httpd
sendmail
cron

Yes, I can stop them all,  but was not sure about stopping devd...
___
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


using gpart(8) to slice a disk

2011-02-28 Thread Matthias Apitz

Hello,

Last weekend I've installed 9-CURRENT on a laptop by booting a
(prepared) system from an USB key and slicing the disk with:

# gpart create -s mbr ad4 # Init the disk with an MBR
# gpart add -t freebsd ad4# Create a BSD container
# gpart create -s bsd ad4s1   # Init with a BSD scheme
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
# gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
# gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
# gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
# gpart add -t freebsd-ufs ad4s1  # all rest for /usr

Then I mounted the ad4s1a ... ad4s1f as a target files system tree below
/mnt and installed the system with 'make instal ... DESTDIR=/mnt';

all went fine, but the created partition on ad4 was not marked as bootable
(flag 'A'). So I used sysinstall(8) from the again booted USB key to set
ad4s1 bootable and to install in addition the FreeBSD boot manager.
After this the (new) system came up fine and is working.

I've read the man page of gpart(8) but do not see clearly what I did
wrong with the above sequence and esp. what would have set the missing
boot flag? Any hint? Thanks in advance

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
___
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: using gpart(8) to slice a disk

2011-02-28 Thread Bruce Cran
On Mon, 28 Feb 2011 14:52:44 +0100
Matthias Apitz g...@unixarea.de wrote:

 I've read the man page of gpart(8) but do not see clearly what I did
 wrong with the above sequence and esp. what would have set the missing
 boot flag?

gpart set -a active -i 1 ad4

-- 
Bruce Cran
___
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-update housekeeping?

2011-02-28 Thread Jason Helfman

On Mon, Feb 28, 2011 at 03:25:47AM +1100, andrew clarke thus spake:

On Fri 2011-02-25 17:26:52 UTC+, Neil Long (n...@cymru.com) wrote:


Just noticed how large /var/db/freebsd-update has grown on a box I
just upgraded from 7.3 to 7.4 (but I can't recall when I started
using it).

Is there a recommended approach or just rm the directory if I have
no need to roll it back?


Before I upgraded to 7.4-REL I used rm -rf /var/db/freebsd-update/ as
my /var is only 1 GB and was running low on free space.  Doing this
should be no different to a fresh install where this directory is
initially empty anyway.

Of course if you're still wary you could make a tarball backup of that
directory somewhere else before emptying it out.

IIRC, freebsd-update will complain if /var/db/freebsd-update/ doesn't
exist, so you may need to mkdir it after using rm -rf.

Regards
Andrew
___
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



If there were no problems with your update, then it is safe to remove the
directory, and recreate it. If your update didn't go so well, you will lose
the ability to use the 'rollback' feature, which will uninstall previously
applied update.

-jgh

--
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
___
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


optical driver with ahci bios mode but ata(4) driver

2011-02-28 Thread David Demelier

Hello,

My bios can be set to use IDE emulation or ahci mode, I prefere the ahci 
mode because it's a bit faster.


It's probably stupid to stay with ata(4) driver with the ahci mode, 
isn't it? But with ahci(4) driver you can't burn with burncd(8) and 
cdrecord just fail and break an blank cd for nothing.


I guess this is the correct behavior when trying to use burncd(8) / 
cdcontrol(1) :


markand@Melon ~ $ burncd msinfo
burncd: ioctl(CDIOREADTOCHEADER): Input/output error

markand@Melon ~ $ cdcontrol info
cdcontrol: getting toc header: Input/output error
cdcontrol: Input/output error

But why the optical drive is only affected? If I use ata(4) driver even 
with ahci mode set in the bios, why the hard drive works pretty well?


Kind regards,

--
David Demelier
___
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