Replacing Drive with SSD
wblock at wonkity.com
Fri Aug 28 18:47:32 UTC 2015
On Thu, 27 Aug 2015, Doug Hardie wrote:
> I am having to replace a drive with a SSD. Normally if I were
> replacing it with another drive, I would hook up the new drive to the
> computer and just use dd to copy everything (system would be
Beyond copying unused blocks which can mess with wear leveling on SSDs
(and wastes time on spinning drives) and blindly copying the partition
tables (which goes wrong with GPT backup tables), consider that the copy
is binary identical to the original. So GUID is not so "U" any more.
Probably that will not cause a problem, but since dd has other problems
when copying drives, best to use dump/restore for UFS or send/recv for
> Can I do the same with a SSD or does it need to be setup differently?
> This is a boot drive (i.e., the only drive in the system).
It *can* be done, but there are better ways.
For SSDs specifically:
Use GPT because it is easy to control where partitions start.
Use gpart's -a flag to align to 4K blocks, or even 1M or 2M boundaries
for an SSD.
Enable trim with UFS.
Use SU rather than SU+J with UFS.
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.
More information about the freebsd-questions