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

    TRIM for Mirror Disks

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 2 Posters 1.0k 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.
    • Z Offline
      zimba
      last edited by

      Hello All,

      I have pfSense installed on dual SSD's set in mirror mode. I was able to enable TRIM for the first disk. However, when I issue TRIM command to the second disk, I get a message saying "could not read superblock to fill out disk"

      What does this mean? Is it that when I issued the TRIM command, it enabled it for both disks? Or it can only enable it for one but not for the other?

      Thank you all for your help!

      Ken

      1 Reply Last reply Reply Quote 0
      • K Offline
        kpa
        last edited by

        Sounds like you're trying to invoke the 'tunefs -t enable' command on the individual disks. This is absolutely wrong because TRIM is a filesystem level operation, not a disk device level operation. You need to apply TRIM to the mirror itself, the filesystem that sits on top of the gmirror device.

        If it doesn't work then it's likely that TRIM is still not supported on GMIRROR and you'll need to update to 2.4 and use ZFS.

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zimba
          last edited by

          Hi Kpa,

          It looks like TRIM is enabled. I first issued the TRIM command to dev/mirror/pfSenseMirrors1a which is my UFS ID. I was then trying to issue TRIM to dev/mirror/pfSenseMirrors1b which is a swap (thinking that it was my second hard disk) and it complained about "could not read superblock to fill out disk"

          But after reboot and with tunefs -p / command, I do see that TRIM is enabled.

          Does that mean that I have applied TRIM to the mirror itself and all should be good going forward?

          Thank you!
          Ken

          1 Reply Last reply Reply Quote 0
          • K Offline
            kpa
            last edited by

            If it works on /dev/mirror/pfSenseMirrors1a it's as it should be, leave it like it is. You won't be able to enable TRIM on the swap however because the swap system doesn't support TRIM.

            1 Reply Last reply Reply Quote 0
            • Z Offline
              zimba
              last edited by

              Thanks, Kpa.

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