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

    Same HDD twice in SMART Status

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    8 Posts 4 Posters 1.9k 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.
    • A
      athurdent
      last edited by

      This is just a cosmetic one I guess.
      I'm using an old Dell D620 as test machine for my beta install. The same HDD shows up twice in SMART Status.

      [2.2-BETA][root@beta]/root: mount
      /dev/ada0s1a on / (ufs, local, noatime)
      
      

      Screenshot_1.png
      Screenshot_1.png_thumb

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Probably a side effect of it showing under it's current AHCI name (adaX) and the older one. IIRC FreeBSD ads them as symlinks to make upgrades smoother, otherwise people whose disks moved from ad to ada would have failed on reboot.

        
        lrwxr-xr-x  1 root  wheel        4 Oct 31 12:07 /dev/ad4 -> ada0
        lrwxr-xr-x  1 root  wheel        6 Oct 31 12:07 /dev/ad4s1 -> ada0s1
        lrwxr-xr-x  1 root  wheel        7 Oct 31 12:07 /dev/ad4s1a -> ada0s1a
        lrwxr-xr-x  1 root  wheel        7 Oct 31 12:07 /dev/ad4s1b -> ada0s1b
        crw-r-----  1 root  operator  0x55 Oct 31 12:07 /dev/ada0
        crw-r-----  1 root  operator  0x58 Oct 31 12:07 /dev/ada0s1
        crw-r-----  1 root  operator  0x5c Oct 31 12:07 /dev/ada0s1a
        crw-r-----  1 root  operator  0x5e Oct 31 12:07 /dev/ada0s1b
        

        the SMART status could probably check to see if the device node is a symlink before printing.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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

          In FreeBSD 8.3 when using ahci(4), the drive name changed (from ad4 to ada0 for example).  Now with 10.1, it seems both nodes are populated in /dev.  Not sure what to do about that.

          I do see this line in dmesg:

          Oct 31 07:23:05 pfsense kernel: ada0: Previously was known as ad4

          This is the line that populates the devices for SMART (similar one for the widget):

          [2.2-BETA][root@pfsense.localdomain]/var/log: grep grep /usr/local/www/diag_smart.php
          		exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs);
          
          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Just pushed a fix for this, should be OK in the next new snapshot after this message.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • A
              athurdent
              last edited by

              Thanks for looking into this. I have applied the changes in
              https://github.com/pfsense/pfsense/commit/ea20169a38b555288416cdcbd86d4cd83b380b8b
              by hand for now. Will update to a newer snapshot tomorrow.
              The duplicate HDD is gone but it finds the notebooks CD drive now:

              Screenshot_1.png
              Screenshot_1.png_thumb

              1 Reply Last reply Reply Quote 0
              • P
                phil.davis
                last edited by

                IMO the check for which disk names to match is not comparing the result of preg_match quite right.
                I think this change will make it better: https://github.com/pfsense/pfsense/pull/1330
                Can you try that and confirm it now displays just the SMART-capable disk?

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • A
                  athurdent
                  last edited by

                  Great, thanks! The CD drive is gone, only ada0 shows up now.

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    Should be merged in now. Must have got the return mixed up with strpos when I wrote that test. Someday PHP needs to make such things more standardized. Or perhaps we'll have rewritten everything in another language by the time that happens. :p

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

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