PfSense installation on SSD, alignment?

  • Hello all, another newbie here!  :)

    I've been using pfSense in home environment with great success for about half a year. These forums have been helpful with many issues regarding Multi-Wan, WLAN etc. pfSense has been installed on an old Hitachi 250Gb SATA-drive. But, to reduce noise and power consumption also, I've now installed pfSense on a OCZ Vertex+ 60 -SSD drive. This is not a "mission critical" installation so I'm not too worried about reliability (I've read the thread,34381.0.html and have been following SSD-endurance thread in

    I've tried to search the forums and also FreeBSD-forums regarding partitioning and aligning the SSD-drive properly, but I'm still very confused about commands and procedures. In the end, I just installed pfSense with its installer like I did with a regular hard drive. How would I go about checking the alignment? Does this provide right information?

    :gpart show
    =>             63  117231345  ad4  MBR  (56G)
                     63  117231345      1  freebsd  [active]  (56G)
    =>                0   117231345  ad4s1  BSD  (56G)
                        0                16              - free -  (8.0K)
                       16  113037025          1  freebsd-ufs  (54G)
         113037041      4194304          2  freebsd-swap  (2.0G)

    I'd be grateful if someone with knowledge would check in and provide feedback/assistance.

  • Update:

    After more searching around the web, I thought that perhaps using GParted Live CD to move and re-align partitions would be the answer. Unfortunately, it doesn't seem to support modifying freebsd/ufs partitions. After that I created an unformatted partition starting from sector 2048 but pfSense installer wasn't happy with that (complained about cylinder boundaries etc. and that those should be divisible by 1008), so going through installation ended up with mis-alignment again.

    Next attempt was started with creating an unformatted partition, this time starting with sector 2064384 (2048x1008). To be sure that pfSense installer wouldn't want to resize that partition, I also created a Linux partition before that unformatted partition. During installation I skipped formating and partitioning and selected the already created unformatted partition in which I chose 50G as / and 2G as swap (to make sure that swap partition would also start aligned). This is what I ended up with:

    :gpart show
    =>         63    117231345  ad4  MBR  (56G)
                 63           1985       - free -  (993K)
              2048      2062336     2  !131  (1.0G)
         2064384  115165008     1  freebsd  (55G)
      117229392          2016        - free -  (1.0M)
    =>            0  115165008  ad4s1  BSD  (55G)
                    0                16         -  free -  (8.0K)
                   16  104857584        1  freebsd-ufs  (50G)
      104857600    4194304         2  freebsd-swap  (2.0G)
      109051904    6113104          -  free -  (2.9G)

    If I''ve understood correctly, FreeBSD slice starts now aligned and (sub)partitions are 4k-aligned also? Would it have been enough to start the FreeBSD-slice with any sector divisible with 8? Now there's some unformatted and unused capacity, but that should only help SSD's internal Garbage Collection do its thing. And of course, 50 gigabytes are more than enough for my needs (even if I'll try Squid later) so there should be ample free space to keep the drive in working order without TRIM.

    I'd appriciate if someone could take a look and provide their input about the alignment…

  • It would be even better if the pfSense devs just built it to format & start at 2048 in the next 2.02 release. No reason not to these days.

Log in to reply