From owner-freebsd-questions@FreeBSD.ORG Mon Jul 9 10:31:14 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ADA4106566B for ; Mon, 9 Jul 2012 10:31:14 +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 A1C388FC0A for ; Mon, 9 Jul 2012 10:31:13 +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 q69AV9QL041458; Mon, 9 Jul 2012 12:31:09 +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 q69AV8Fr041455; Mon, 9 Jul 2012 12:31:09 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 9 Jul 2012 12:31:08 +0200 (CEST) From: Wojciech Puchar To: Warren Block In-Reply-To: Message-ID: References: <20120708120028.99568106568F@hub.freebsd.org> <1211EED02D7F4079B279A9D413857ECF@admin> 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]); Mon, 09 Jul 2012 12:31:09 +0200 (CEST) Cc: freebsd-questions@freebsd.org, Graham Bentley Subject: Re: YASSDQ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:31:14 -0000 > > Notes: > > 1. SSDs don't necessarily use 4k blocks, some use larger ones. Starting the All use 4K as it is NTFS default block size and most are sold to be used with windoze. > first filesystem partition at 1M works for most of the common values. Alignment of filesystem cannot be better than it's block size. > 3. Swap is tricky with small drives, even trickier if you want to use TRIM. > Swap files can be used, and then you get TRIM, but see > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544 for a way to dismount > that swap file before shutdown and an annoying panic. my solution: # cat /etc/rc.local #!/bin/sh echo creating swapfile /bin/rm -f /swapfile.tmp dd if=/dev/zero of=/swapfile.tmp bs=8m seek=1k count=0 /sbin/mdconfig -a -t vnode -u 0 -f /swapfile.tmp || /bin/sh /bin/chflags nodump /swapfile.tmp /bin/rm -f /swapfile.tmp /sbin/swapctl -a /dev/md0 # cat /etc/rc.shutdown.local #!/bin/sh echo removing swapfile /sbin/swapctl -d /dev/md0 /sbin/mdconfig -d -u 0 my partitioning: # disklabel ada0 # /dev/ada0: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 117231408 0 4.2BSD 0 0 0 c: 117231408 0 unused 0 0 # "raw" part, don't edit 99% of the time swap is not needed so doesn't take space.