From owner-freebsd-jail@FreeBSD.ORG Thu Aug 30 08:51:01 2007 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471B716A417 for ; Thu, 30 Aug 2007 08:51:01 +0000 (UTC) (envelope-from photor@photor.de) Received: from mout1.freenet.de (mout1.freenet.de [IPv6:2001:748:100:40::2:3]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA6A13C4A3 for ; Thu, 30 Aug 2007 08:51:00 +0000 (UTC) (envelope-from photor@photor.de) Received: from [195.4.92.13] (helo=mx3.freenet.de) by mout1.freenet.de with esmtpa (Exim 4.68-dev) (envelope-from ) id 1IQfjv-0003xv-Mz for freebsd-jail@freebsd.org; Thu, 30 Aug 2007 10:50:59 +0200 Received: from nagare.informatik.uni-rostock.de ([139.30.241.8]:59948 helo=worf.mydomain.home) by mx3.freenet.de with esmtpsa (ID photor@photor.de) (TLSv1:AES256-SHA:256) (port 25) (Exim 4.68-dev #12) id 1IQfju-00013T-7V for freebsd-jail@freebsd.org; Thu, 30 Aug 2007 10:50:58 +0200 Received: from photor by worf.mydomain.home with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IQfeI-000HMy-UT for freebsd-jail@freebsd.org; Thu, 30 Aug 2007 10:45:11 +0200 Date: Thu, 30 Aug 2007 10:45:10 +0200 From: Karsten Rothemund To: freebsd-jail@freebsd.org Message-ID: <20070830084510.GA66523@www.photor.de> Mail-Followup-To: freebsd-jail@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Organisation: private site X-Url: http://www.photor.de X-GPG-Fingerprint: E752 C759 B9B2 2057 E42F 50EE 47AC A7CE 7019 CAA5 Sender: Karsten Rothemund X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: photor@photor.de X-SA-Exim-Scanned: No (on worf.mydomain.home); SAEximRunCond expanded to false Subject: Running postgres 8.2 in a jail X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: karsten@photor.de List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2007 08:51:01 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello list, I played a little bit with jails on FBSD 6.2 (just to learn). One jail I want to use as database server, so installed postgresql82-server from the ports.=20 But when I try to initdb I get the following: pgsql# /usr/local/etc/rc.d/postgresql initdb The files belonging to this database system will be owned by user "pgsql". This user must also own the server process. The database cluster will be initialized with locales COLLATE: C CTYPE: en_US.UTF-8 MESSAGES: en_US.UTF-8 MONETARY: en_US.UTF-8 NUMERIC: en_US.UTF-8 TIME: en_US.UTF-8 creating directory /usr/local/pgsql/data ... ok creating subdirectories ... ok selecting default max_connections ... 10 selecting default shared_buffers/max_fsm_pages ... 400kB/20000 creating configuration files ... ok creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL: cou= ld not create semaphores: No space left on device DETAIL: Failed system call was semget(1, 17, 03600). HINT: This error does *not* mean that you have run out of disk space. It occurs when either the system limit for the maximum number of se= maphore sets (SEMMNI), or the system wide maximum number of semaphores (SEM= MNS), would be exceeded. You need to raise the respective kernel parameter= . Alternatively, reduce PostgreSQL's consumption of semaphores by reducing= its max_connections parameter (currently 10). The PostgreSQL documentation contains more information about config= uring your system for PostgreSQL. child process exited with exit code 1 initdb: removing data directory "/usr/local/pgsql/data" As I understand, I have to change some sysctls to - allow the jail to use some resources: security.jail.sysvipc_allowed=3D1 - raise some values of kern.ipc; this looks like the following: pgsql# sysctl kern.ipc | grep sem kern.ipc.semmap: 256 kern.ipc.semmni: 10 kern.ipc.semmns: 60 kern.ipc.semmnu: 30 kern.ipc.semmsl: 60 kern.ipc.semopm: 100 kern.ipc.semume: 10 kern.ipc.semusz: 92 kern.ipc.semvmx: 32767 kern.ipc.semaem: 16384 - and the same with shared memory (got this from the postgres documentation) pgsql# sysctl -a | grep shm kern.ipc.shmmax: 134217728 kern.ipc.shmmin: 1 kern.ipc.shmmni: 192 kern.ipc.shmseg: 128 kern.ipc.shmall: 32768 kern.ipc.shm_use_phys: 0 kern.ipc.shm_allow_removed: 0 but postgres does still not initdb (I tried also with postgresql74-server which worked).=20 The question is simple: what is missing, what is wrong? (I can of course provide any config and information if more is needed) Thank you for any hint, Karsten --=20 Karsten Rothemund /"\ PGP-Key: 0x7019CAA5 \ / Fingerprint: E752 C759 B9B2 2057 E42F \ ASCII Ribbon Campaign 50EE 47AC A7CE 7019 CAA5 / \ Against HTML Mail and News --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFG1oOWR6ynznAZyqURAsROAJ95/+MMeAY1BrmjnmufIaD22mT+TgCguFNz W7eACnKdK7pIz236WBMTErE= =2Zc+ -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--