From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 19 08:44:17 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 191D41065670 for ; Tue, 19 Jun 2012 08:44:17 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 515C58FC14 for ; Tue, 19 Jun 2012 08:44:15 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q5J8iCYc006106; Tue, 19 Jun 2012 10:44:13 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q5J8iCba006103; Tue, 19 Jun 2012 10:44:12 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Tue, 19 Jun 2012 10:44:12 +0200 (CEST) From: Wojciech Puchar To: Matthias Apitz In-Reply-To: <20120619070846.GA1283@tiny.Sisis.de> Message-ID: References: <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <20120525225839.GA7347@server.rulingia.com> <20120527082745.GA2591@tinyCurrent> <20120616185822.GA1253@tiny.Sisis.de> <20120619070846.GA1283@tiny.Sisis.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Tue, 19 Jun 2012 10:44:13 +0200 (CEST) Cc: freebsd-hackers@freebsd.org, rozhuk.im@gmail.com Subject: Re: proper newfs options for SSD disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 08:44:17 -0000 > future disk layout. > > /dev/ada0p1 freebsd-boot > /dev/ada0p2 freebsd-ufs /boot 256 Mbyte > /dev/ada0p3 freebsd-ufs /private 3.5 GByte (geli encrypted) > over 200 MB wasted for /boot. what do you want to but there? except this it is all right. > /dev/ada1p1 freebsd-boot > /dev/ada1p2 freebsd-ufs / 14.0 GByte (/ /usr /var ... all > in one file system and unencrypted) > nonsense here. why partitions AT ALL? just /dev/ada1 - /, no partitions > commands: > > # gpart destroy -F ada0 > # gpart create -s gpt ada0 > # gpart add -t freebsd-boot -s 512k ada0 > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0 > # gpart add -t freebsd-ufs -b 1m -s 256m ada0 > # gpart add -t freebsd-ufs ada0 i cannot help here as i am not really gpart user. i use bsdlabel everywhere for now. > # newfs /dev/ada0p2 > # newfs /dev/ada0p3 don't waste space, read newfs manual and add good options. on flash disks don't fear to use smallest (4KB) block size and smallest (512) fragment size. on any disk don't overallocate inodes as newfs do. You know how many files you have so i can't help you. newfs -i 16384 means over 1% locked space, on hard disks i usually use -i 65536 and it still result in most inodes unused. on small flash disks 16384 or 32768 is usually fine but YOU know how much files you store. on private system do not fear -m 0, even more on flash media where fragmentation doesn't hurt. and you definitely forgot -U option. REALLY - read out newfs manual carefully and make optimal filesystem layout every time. newfs defaults are certainly non optimal, but universal and mostly safe. > # newfs /dev/ada1p2 > # mount /dev/ada1p2 /mnt > > start the mouse daemon (only for cut&paste: > > # /etc/rc.d/moused onestart > > > # echo /dev/ada1p2 / ufs rw 1 1 > /mnt/etc/fstab rw,noatime always worth using, definitely on flash disks. the rest is quite complex for me. i would rather back up all your existing filesystem to something external, make new partitioning and restore.