Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Upgrade storage on sg3100

    Scheduled Pinned Locked Moved Official Netgate® Hardware
    23 Posts 11 Posters 6.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MP-oli
      last edited by

      Hello.

      I recently bought an SG-3100.
      After having updated it with an SSD I like to share a little 'How To' with interested people.


      Mount the SSD onto the board as shown on the attached picture.

      Check if the SSD was detected at boot time:

      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/root: dmesg | grep ada0
      ada0 at ahcich1 bus 0 scbus1 target 0 lun 0
      ada0: <nt-128 1.00=""> ACS-4 ATA SATA 3.x device
      ada0: Serial Number 977120660172
      ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
      ada0: Command Queueing enabled
      ada0: 122104MB (250069680 512 byte sectors)</nt-128>
      

      Creating partitions
      Create the partition table:

      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/root: gpart create -s gpt ada0
      ada0 created
      

      Create two partitions:

      • A swap partition of 4GB

      • A ufs partition of 64GB

      [2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain]/root: gpart add -t freebsd-swap -l gpswap -s 4G ada0
      ada0p1 added
      
      [2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain]/root: gpart add -t freebsd-ufs  -l gptmpfs -s 64G ada0
      ada0p2 added
      
      [2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain]/root: gpart show -l ada0
      =>       40  250069600  ada0  GPT  (119G)
               40    8388608     1  gpswap  (4.0G)
          8388648  134217728     2  gptmpfs  (64G)
        142606376  107463264        - free -  (51G)
      

      Check if the partitions are recognised by the OS:

      [2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain]/root: ls -l /dev/diskid/
      total 0
      crw-r-----  1 root  operator  0x56 Jan 10 18:22 DISK-977120660172
      crw-r-----  1 root  operator  0x59 Jan 10 18:22 DISK-977120660172p1
      crw-r-----  1 root  operator  0x5a Jan 10 18:22 DISK-977120660172p2
      crw-r-----  1 root  operator  0x41 Jan 10 18:22 DISK-A41EE459
      crw-r-----  1 root  operator  0x44 Jan 10 18:22 DISK-A41EE459s1
      crw-r-----  1 root  operator  0x45 Jan 10 18:22 DISK-A41EE459s2
      crw-r-----  1 root  operator  0x49 Jan 10 18:22 DISK-A41EE459s2a
      
      [2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain]/root: ls /dev/gpt
      gpswap  gptmpfs
      
      

      Formatting partitions
      Formatting the /tmp/cache partition:

      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/root: newfs -U /dev/gpt/gptmpfs
      /dev/gpt/gptmpfs: 65536.0MB (134217728 sectors) block size 32768, fragment size 4096
      	using 105 cylinder groups of 626.09MB, 20035 blks, 80256 inodes.
      	with soft updates
      super-block backups (for fsck_ffs -b #) at:
       192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952, 32056192, 33338432, 34620672, 35902912, 37185152, 38467392, 39749632,
       41031872, 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272, 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672, 67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072,
       80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432, 98732672, 100014912, 101297152, 102579392, 103861632, 105143872, 106426112, 107708352, 108990592, 110272832, 111555072, 112837312, 114119552, 115401792, 116684032, 117966272,
       119248512, 120530752, 121812992, 123095232, 124377472, 125659712, 126941952, 128224192, 129506432, 130788672, 132070912, 133353152
      

      The swap partition does not need formatting.

      Adapting /etc/fstab
      Add the entries for the new partitions to /etc/fstab:

      # Device	 					Mountpoint	FStype	Options		Dump	Pass#
      /dev/diskid/DISK-977120660172p1	none		swap	sw		0	0
      /dev/diskid/DISK-A41EE459s1			/boot/u-boot	msdosfs	rw,noatime	1	1
      /dev/diskid/DISK-A41EE459s2a			/		ufs	rw,noatime	1	1
      /dev/diskid/DISK-977120660172p2	/tmp/cache	ufs	rw,noatime	2	2
      
      

      Create the mount directory:

      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/etc: mkdir /tmp/cache
      
      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/etc: mount /tmp/cache
      
      [2.4.2-RELEASE][root@MP-SG-3100.localdomain]/etc: df
      Filesystem                      1K-blocks   Used    Avail Capacity  Mounted on
      /dev/diskid/DISK-A41EE459s2a      7351996 817852  5945988    12%    /
      devfs                                   1      1        0   100%    /dev
      /dev/diskid/DISK-A41EE459s1         34442   2002    32440     6%    /boot/u-boot
      /dev/md0                             3484    132     3076     4%    /var/run
      devfs                                   1      1        0   100%    /var/dhcpd/dev
      /dev/diskid/DISK-977120660172p2  64995324      8 59795692     0%    /tmp/cache
      
      

      The swap partition can be manually activated but a reboot will do it automatically and test the system at the same time.

      After all is done the swap and the /tmp/cache partition will be displayed on the dashboard of the web interface.


      Regards.

      2018-01-10_003.jpg
      2018-01-10_003.jpg_thumb

      R 1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        I would just backup, recover to ada0, restore, and forget the on-board storage exists.

        That way you don't have to worry about upgrades, etc blowing up.

        Thanks for the info.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        S C 2 Replies Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Nice right up.  :)

          However I would definitely recommend installing directly to the SSD rather than trying to run across two disks.

          The fstab may be overwritten at update and you can't be sure how things might behave if/when that happens.

          Steve

          1 Reply Last reply Reply Quote 0
          • jdillardJ
            jdillard
            last edited by

            There is now a write-up in the SG-3100 manual: https://docs.netgate.com/pfsense/en/latest/solutions/sg-3100/m-2-sata-installation.html

            1 Reply Last reply Reply Quote 1
            • S
              s0m3f00l @Derelict
              last edited by

              @derelict How can you directly restore to the new SSD? Do you need to reinstall the firmware or is there a process to copy and reinstall from the CLI / configurator?

              I looked at the manual and didn't see anything other than inserting the new SSD.

              DerelictD 1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate @s0m3f00l
                last edited by

                @s0m3f00l Backup the configuration, reinstall to the SSD, Restore the backed-up configuration.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                S 1 Reply Last reply Reply Quote 1
                • S
                  s0m3f00l @Derelict
                  last edited by

                  @derelict Awesome. Thank you. I can get the newest firmware via ticket correct? I have an older version on USB.

                  DerelictD 1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate @s0m3f00l
                    last edited by Derelict

                    @s0m3f00l Yes.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    S 1 Reply Last reply Reply Quote 1
                    • S
                      s0m3f00l @Derelict
                      last edited by

                      @derelict Last question, How do I remove the old install? should I just mount the internal storage and "rm -rf /"? Where is the bootloader located?

                      GertjanG 1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan @s0m3f00l
                        last edited by

                        @s0m3f00l said in Upgrade storage on sg3100:

                        "rm -rf /"

                        Ah, the last century's 'DOS' method of upgrading.
                        Noop.

                        What about a : insert the USB key containing the new 'ISO', and do a software reboot from pfSense using the wired console access using the other (micro ?) USB port.
                        If there is a key to enter in what might be some sort of BIOS or early 'device' boot menu, use that now.
                        See the complete 3100 manual for all the details.
                        Use the boot menu - as a classic PC - to boot from the USB stick.
                        If all goes well, the installer will take tell you or propose to use or import the already existing pfSense config.
                        Let it finish installing, it will reboot. Remove the USB as soon as it reboots.
                        Admire the works.

                        Btw : I do not have or own a SG-3100, and worse, I'm writing this right out of my head, a it seesm to be the logic way.
                        Be warned : I didn't consult the manual.

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          s0m3f00l @Gertjan
                          last edited by

                          @gertjan I know how to upgrade I was asking about removing the old install from the old internal emmc drive, thanks though.

                          For anyone else reading this, I got in touch with netgate TAC and they recommended leaving the old install in place as a backup to the new drive. I assume the bootloader for the sg3100 is somewhere on that internal drive so don't delete.

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            You could erase the eMMC but there is little point doing so.

                            uboot is stored separately on an SPI chip.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • C
                              coastcontrol @Derelict
                              last edited by

                              @derelict
                              How to backup, recover to ada0? When I use the webconfigurator Backup& Restore there is no way to tell the "system" to use ada0 for the backup location.

                              Please tell me how to accomplish this ….
                              I have access to the "system" through the console port using "screen" and can access the SSD M.2 drive and root directory.

                              What to do next?

                              Thank you!

                              DerelictD 1 Reply Last reply Reply Quote 0
                              • DerelictD
                                Derelict LAYER 8 Netgate @coastcontrol
                                last edited by

                                @coastcontrol What, exactly, are you trying to do? Reinstall to ada0 and restore the config is what it sounds like you want.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rwq891 @MP-oli
                                  last edited by

                                  @mp-oli This procedure no longer works. I’m still trying to find one that does.

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    You don't need to do any of that, and haven't for a long while.

                                    Just boot the recovery image from USB and choose to install to ada0. It will set the required uboot variables to boot from it.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      copz1998
                                      last edited by

                                      Thanks for all the detail; it is beneficial.

                                      Question - I am doing the same and wonder if I am supposed to format the new SSD before I put it in? If so, what format?

                                      Thanks!!

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        No you don't need to format the drive. The recovery image write a drive image dircetly to it and that includes the filesystem.

                                        However you will now need to set the uboot env in 23.09.1 if your 3100 was previously booting from eMMC. The install instructions from TAC should include that though.

                                        C 1 Reply Last reply Reply Quote 1
                                        • C
                                          copz1998 @stephenw10
                                          last edited by

                                          @stephenw10

                                          FYI update: I was able to solve my issue of an unrecognizable filesystem error/partition. I put the drive in an enclosure and connected it to Windows, then used diskpart to "clean" the drive, which removed all partitions. Then, I was able to reinstall pfSense using recovery. now, I can see my disk from the GUI, and it seems to be running well.

                                          I hope this helps someone else.
                                          Image 3-30-24 at 1.38 PM.jpg

                                          1 Reply Last reply Reply Quote 1
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.