From owner-freebsd-questions@freebsd.org Mon Aug 31 14:23:59 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFAD69C790B for ; Mon, 31 Aug 2015 14:23:59 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73C01D16 for ; Mon, 31 Aug 2015 14:23:59 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by wibz8 with SMTP id z8so1993438wib.1 for ; Mon, 31 Aug 2015 07:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=yktYGo8ydYNif1+g5utge1mu7gCq3Fzr2J7jswnfjN8=; b=kU0kr4vQyUvGfigKIXBKZZkAusiWNkSckRrzf4Z5xwikC0rZ62EJPlHuBsw/Hu0G1b VGFdZEbCFs7fgZ+MSe89DmEWrSnDSJxbmOtDRz5fiIgcYqfvSIQ+VYLOZx6CYXkf+Gr/ I3zkjisJiR3d2KFG8l+YFuCIQH/easnYPr6jRAWV0fBCRQvn+3eP34a6VClWrwA2mB7N 7O3uK32cKWdSjkqzy+wTVWpsnVLczpamoukRRpUWQxrqHl0cKbzdlBq4WNE/NUJpj+OE OQutTccr1tcCxEQ16GKJ8Zm02HZsCi4b48npz/YiO2hxcAZduikZDW7qt339CFdJtntU wFMw== X-Received: by 10.194.109.97 with SMTP id hr1mr28200746wjb.38.1441031037071; Mon, 31 Aug 2015 07:23:57 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.198.255]) by smtp.gmail.com with ESMTPSA id gk9sm16156054wib.9.2015.08.31.07.23.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 07:23:56 -0700 (PDT) Date: Mon, 31 Aug 2015 15:23:53 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Replacing Drive with SSD Message-ID: <20150831152353.5ca78976@gumby.homeunix.com> In-Reply-To: <55E45973.2050103@sneakertech.com> References: <20150829220311.c7608be1.freebsd@edvax.de> <55E45973.2050103@sneakertech.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 14:23:59 -0000 On Mon, 31 Aug 2015 09:41:07 -0400 Quartz wrote: > > Making a partition for free space is one way. Another way is to > > leave part of the drive unpartitioned. Either one just guarantees > > there is a good supply of unused blocks available to the drive. > > I'm not super well versed on exactly how SSD TRIM works. How does the > drive in question know which blocks are or aren't free, isn't that a > function of the filesystem? For that matter, how does the drive even > "know" which parts are or aren't partitioned, it's not like they're > programmed to understand MBR vs GPT, etc. Physical blocks are assigned to logical sectors on write. Partitioning a device and putting UFS on it doesn't write into the free space on a filesystem or any unpartitioned space. > How does the system > communicate to the drive firmware layer which blocks are in use? When a file is deleted, the OS can use TRIM to tell the device which sectors not longer contain data.