Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 2015 18:22:37 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Replacing Drive with SSD
Message-ID:  <20150830182237.5a39e04c.freebsd@edvax.de>
In-Reply-To: <alpine.BSF.2.20.1508300633160.44682@wonkity.com>
References:  <CEAD84AD-341A-4FB9-A3A1-D0D5A550AFFD@lafn.org> <alpine.BSF.2.20.1508281235390.74312@wonkity.com> <20150829220311.c7608be1.freebsd@edvax.de> <alpine.BSF.2.20.1508300633160.44682@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 30 Aug 2015 06:58:42 -0600 (MDT), Warren Block wrote:
> On Sat, 29 Aug 2015, Polytropon wrote:
> 
> > On Fri, 28 Aug 2015 12:47:30 -0600 (MDT), Warren Block wrote:
> >> If you are a belt-and-suspenders type, create a smallish, maybe 4G,
> >> partition on the drive that will never be used and leave it empty.
> >> Don't write to it, ever.  This is called over-provisioning.  The drive
> >> sees that all those blocks are free and it can swap them around for wear
> >> leveling.  This can be used in addition to trim.
> >
> > To extend the idea (because sometimes I am the axe-and-byrnie type):
> > Does this also work with _no_ partitions at all? For example, when
> > the device is formatted "as a whole" (dedicated), like
> >
> > 	# bsdlabel -w ada0
> > 	# bsdlabel -e ada0
> > 		set type "4.2BSD" for 'a' partition
> > 		make 'a' same size as 'c'
> > 		save
> > 	# newfs -m 0 -i 16384 -b 16384 -f 2048 -U -t enable -n disable -L ssdroot /dev/ada0a
> > 	# bsdlabel -B ada0
> >
> > where /dev/ada0a has been prepared with bsdlabel to span the entire
> > device (as in the example) - or in this case, to be a little bit
> > less (4G) than the whole disk capacity?
> 
> 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.

Thanks for this answer. I will probably use this approach
when new SSDs come into use here (for single-user all-in-one
laptop systems typically).



> I'm fairly sure that UFS does not write to every block under its control 
> even during a format.

Correct, it doesn't. It simply initializes a subset of
locations on disk and leaves the majority of allocated
disk space untouched. It will receive writes as soon as
there are _actual_ writes to the file system. That's one
of the reasons newfs is so damn fast even if you format
a 2 TB hard disk. :-)



> Until written as part of a file, those blocks are 
> also known to be unused.  So forcing extra unused space is probably 
> unnecessary most of the time.

Still I believe it's a good idea to have some "spare space"
available that is guaranteed to _not_ go into use.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150830182237.5a39e04c.freebsd>