# Does bsdinstall in 10.1 properly partition SSDs?



## horseflesh (Nov 15, 2014)

Do I still need to manually create partitions of the proper size when installing 10.1 on an SSD? I have not set up a fresh FreeBSD machine in a while and after looking at the docs I am not sure if the installer will automagically do 4k alignment or not.


----------



## danger@ (Nov 16, 2014)

As far as I know, the installer doesn't automatically align to 4K by default.


----------



## kpa (Nov 16, 2014)

In my opinion there's no excuse anymore for not aligning to 4K by default, especially on GPT partitioning where the stupid old CHS alignment restrictions no longer apply.


----------



## horseflesh (Nov 16, 2014)

Thanks, guys. Should do my research before I begin the installation.

Built-in 4K support does seem overdue. SSDs aren't exactly novel these days.


----------



## wblock@ (Nov 16, 2014)

I'm pretty sure 4K alignment was fixed in bsdinstall(8) long ago.  The empirical test is to just install with it and check the partitions.


----------



## danger@ (Nov 17, 2014)

This is from default bsdinstall setup (note, it's installed on 10K RPM SAS drives connected through LSI hardware raid, no SSD):


```
root@ibm:/home/danger # gpart show
=>       34  285155261  mfid0  GPT  (136G)
         34       1024      1  freebsd-boot  (512K)
       1058  276823040      2  freebsd-ufs  (132G)
  276824098    8331196      3  freebsd-swap  (4.0G)
  285155294          1         - free -  (512B)
```

So that doesn't seem like 4k aligned.


----------



## wblock@ (Nov 17, 2014)

Is that from a 10.1 system?


----------



## danger@ (Nov 17, 2014)

Yes.


----------



## wblock@ (Nov 17, 2014)

Well that's annoying.  All right, see Using a Solid State Drive with FreeBSD, and somebody remind me what has to be mounted where for bsdinstall(8) to use existing filesystems.

Oh, and please enter a PR.  Or update my old one, PR 161720, if the error is in the partition editor as opposed to the code that creates the partitions on disk.


----------



## horseflesh (Nov 17, 2014)

wblock@ said:


> ...and somebody remind me what has to be mounted where for bsdinstall(8) to use existing filesystems.



I would love to know that as well! 

Thanks for the great posts, all. Very helpful.


----------



## max21 (Nov 18, 2014)

Probably no new news for this thread but it is very interesting, so I tried to do a search of the basic possibilities.



> For example, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (with certain hotfixes installed) support 512e format drives (but not 4Kn),as do contemporary versions of *FreeBSD* and Linux.



http://en.wikipedia.org/wiki/Advanced_Format


----------



## wblock@ (Nov 21, 2014)

danger@ said:


> This is from default bsdinstall setup (note, it's installed on 10K RPM SAS drives connected through LSI hardware raid, no SSD):
> 
> 
> ```
> ...



But is that a 4K drive?  What does `diskinfo -v mfid0` say?


----------



## danger@ (Nov 22, 2014)

No, I don't think it reports itself as 4K drive...


```
root@ibm:~ # diskinfo -v mfid0
mfid0
        512             # sectorsize
        145999527936    # mediasize in bytes (136G)
        285155328       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        17750           # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
                        # Disk ident.
```


----------



## wblock@ (Nov 22, 2014)

Nathan Whitehorn says it will align to the reported stripesize.  4K devices then should be aligned to 4K.


----------

