Netgate SG-1000 microFirewall

Author Topic: Upgrade storage on sg3100  (Read 578 times)

0 Members and 1 Guest are viewing this topic.

Offline clugo633

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Upgrade storage on sg3100
« on: December 28, 2017, 09:21:48 pm »
Anyone know to upgrade/install m2 SATA on sg3100?

Thanks

Offline ivor

  • Administrator
  • Hero Member
  • *****
  • Posts: 809
  • Karma: +163/-138
    • View Profile
    • Netgate
Re: Upgrade storage on sg3100
« Reply #1 on: December 29, 2017, 12:06:58 pm »
I can help with SSD model you need however we are still working on a upgrade guide as we currently only sell these units optionally pre-installed SSD. If you plan on purchasing an SSD make sure it's NGFF M.2 2242 model.
Need help fast? Commercial support: https://www.netgate.com/support/

Offline clugo633

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Upgrade storage on sg3100
« Reply #2 on: December 30, 2017, 11:30:09 am »
Will do.  Thank you.

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 12275
  • Karma: +494/-15
    • View Profile
Re: Upgrade storage on sg3100
« Reply #3 on: January 07, 2018, 02:00:34 pm »
There are two SATA compatible m.2 slots on the 3100 with the stand-offs at different lengths. It will boot from either. They are at 42mm and 80mm so 2242 or 2280 m.2 modules.

The 42mm slot also carries the SIM card connections and USB for a 3G/4G modem so if you are considering ever fitting one you are better to use the 80mm slot for SATA.

Steve

Offline MP-oli

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Upgrade storage on sg3100
« Reply #4 on: January 10, 2018, 01:36:30 am »
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:
Code: [Select]
[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)

Creating partitions
Create the partition table:
Code: [Select]
[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
Code: [Select]
[2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain[/email]]/root: gpart add -t freebsd-swap -l gpswap -s 4G ada0
ada0p1 added

[2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain[/email]]/root: gpart add -t freebsd-ufs  -l gptmpfs -s 64G ada0
ada0p2 added

[2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain[/email]]/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:
Code: [Select]
[2.4.2-RELEASE][[email]root@MP-SG-3100.localdomain[/email]]/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[/email]]/root: ls /dev/gpt
gpswap  gptmpfs

Formatting partitions
Formatting the /tmp/cache partition:
Code: [Select]
[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:
Code: [Select]
# 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:
Code: [Select]
[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.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10257
  • Karma: +1176/-313
    • View Profile
Re: Upgrade storage on sg3100
« Reply #5 on: January 10, 2018, 01:47:50 am »
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.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 12275
  • Karma: +494/-15
    • View Profile
Re: Upgrade storage on sg3100
« Reply #6 on: January 10, 2018, 11:19:47 am »
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