[SSD] Some questions

A

Anonymous

Guest
Hi there,

I'm from GNU/Linux World since 6 years (Archlinux/Funtoo), but I decided to switch to FreeeBSD, because upcoming changes won't satisfy me.
I plan to buy a SSD (Samsung 830) for FreeBSD but I have some questions. I already saw some topics wrote by wblock@. He helped me a lot about Sandforce controller and others questions.

First, should I use GPT or MBR? I don't see many improvements using GPT over MBR. What you think guys?

Another one, what filesystem, UFS or ZFS for /? It seems UFS supports natively TRIM which is essential for SSD. I saw many topics about UFS vs ZFS, but I can't decide myself. :\ Any advices?

12 Go would be enough for / (without /home and /boot)?

I will need to align partitions (I found a link: http://www.ateamsystems.com/blog/FreeBSD-Partition-Alignment-RAID-SSD-4k-Drive), should I know more?

Thank you.
Regards.
 
I currently use that drive. I cannot say I'm using it well since I have no data to support it, but I would imagine there's no real advantage of using ZFS on a single-drive system; at least from my point of view, the only advantage ZFS has over UFS is its amazing healing property which only works if you can make use of more than one drive. I myself am simply using UFS with soft-journaling (note, this is apparently not the GEOM journaling, which I'm told I ought to avoid)

Here's the plan I had posted on this forum when I was setting up my system using 128GB version of the same model. It also involves booting from a usb drive to enable GELI encryption, which significantly delays booting process, IMO. I think I ultimately had to modify some parts of the plan, though, so, if you choose to refer to the link, make sure to read thoroughly and make changes that might suit you better.
 
A Samsung 830 should be fine if you can find one.

The choice of GPT or MBR is not affected by the SSD. If you can, use GPT. If you can't because it needs to multi-boot with other operating systems that only support MBR, then MBR.

Enabling AHCI on the disk controller gives a speed improvement, usually about 5-15%. If other operating systems are also used on that system, they may not be able to handle that, or might need different drivers or a reinstall.

ZFS does not yet support TRIM. There is some new code coming. Use UFS.

If you want encryption, consider encrypting just one partition or using SED, the notebook drive password encryption. Otherwise, the speed of the SSD will be hidden behind slow encryption and decryption.

Disk Setup On FreeBSD shows using gpart(8) to get the proper drive alignment. I have notes for an SSD article, but have not done it yet.
 
Yeah, 830 seems to be a good model. 840 seems not very good and 840 Pro is expensive (and I saw many topic about dead SSD due to the default firmware).

Since I always used MBR for my Windows / Linux installation, I think I won't use GPT.

My data aren't critical, so using encrypting is overkill, i guess.

Do you plan to write your SSD article soon? Vendor gives me 4 weeks delay, so I won't install FreeBSD soon.
 
Here's procedure I used to setup FreeBSD boot-drive off of a 64GB Crucial SSD.

Mainly based off of this article a few others mentioned + a few other sources. http://www.ateamsystems.com/blog/FreeBSD-Partition-Alignment-RAID-SSD-4k-Drive

Was done during the system installation...exiting to shell for manual partitioning.

Code:
diskinfo -v /dev/daX

gpart destroy -F da0

# ---- Setup the GPT and partitions
gpart create -s gpt da0
gpart add -s 512k -t freebsd-boot -l gpboot da0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
gpart add -t freebsd-ufs -b 1M -s 56G -l gprootfs da0
gpart add -t freebsd-swap -l gpswap da0

newfs -Ut -L root /dev/da0p2
mount /dev/da0p2 /mnt

vi /tmp/bsdinstall_etc/fstab
/dev/da0p2 	 /           	ufs 	rw  	1   	1
/dev/da0p3 	none        	swap	sw  	0   	0 

tunefs -p /dev/da0p2 <check if TRIM enabled>

exit <out of the partitioning shell to resume the setup>
 
@wblock

Nice article, good job! I think this looks wrong though:
# gpart add -t freebsd-ufs -l pxrootfs -b 1m -s 2g ssdrootfs ada0

Shouldn´t that look like this instead?:
# gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 2g ada0

And since you did specify to have the first data-partition aligned, the rest should just follow, making the "-a 4k"'s unnecessary on the rest, don´t you think?

/Sebulon
 
Sebulon said:
Shouldn´t that look like this instead?:
# gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 2g ada0

Whoops. Fixed now, thanks!

And since you did specify to have the first data-partition aligned, the rest should just follow, making the "-a 4k"'s unecessary on the rest, don´t you think?

Yes, but they remind the reader about the alignment, and do no harm. And actually might round the last partition down in size if needed. I'm tempted to add -a4k to the first partition, but that won't work as expected on FreeBSD-9.0.
 
wblock@ said:
Yes, but they remind the reader about the alignment, and do no harm. And actually might round the last partition down in size if needed.

True, true. Just checking.

/Sebulon
 
@wblock

It was very interesting and instructive. Finally, I decided GPT is the best for my needs (compared to MBR).

Would you mind adding a section for saving a partition with dump(8)? I saw some topics but it's not suitable for a SSD.
Thank you.
 
Unfortunately, my vendor cannot send me Samsung 830 because it doesn't exist anymore. I'm really disappointed and disturbed.

I need to find another good model. What do you think about Plextor PX-128M5P. Reviews aren't bad, though.
Samsung 840 has many reliability issues (TLC memory), 840 Pro is kinda expensive and the model is too young.
Intel 330 and 520 is based on Sandforce controller. Even if Intel includes custom firmwares, I prefer to avoid Sandforce.

Since, you seem to be very aware about it, any advices?

Thank you
 
Plextor is all I've bought for my own use, the M3 models. The M5P has the same Marvell controller as the Crucial M4, but custom firmware and 19nm toggle mode memory. My only reservation with the M5P is the current price, but then it has a five-year warranty. Second choice would be the Plextor M5S with a three-year warranty. There's also a new SSD with a Marvell controller, the SanDisk Ultra Plus.
 
Back
Top