Jump to content
  • [6.7.0] Adding drive to cache pool fails when clone of data drive present


    tbone
    • Minor

    I had a weird failure a while back when I tried to add a second drive to my cache pool, but I didn't have a chance to really track it down until today.  The initial symptom was that I stopped the array, added the (blank) drive to the cache pool, and after starting the array, the main page of the web interface reported that both drives were in a pool, but no balance operation was happening, and no IO was happening with the new drive.

     

    My existing cache volume was /dev/sdh1, and I was trying to add /dev/sdb1 to that.  The weird thing was what was in the logs for that operation:

    Jul  8 16:59:26 Tower emhttpd: shcmd (8880): /sbin/btrfs replace start /dev/sdq1 gen 1540 but found an existing device /dev/sdp1 gen 2898 /dev/sdb1 /mnt/cache &
    

    sdp1 and sdq1 have no relation to the cache drive; sdp1 is an existing drive in the array, and sdq1 is a spare drive.

     

    My guess is that unraid is parsing the output of a btrfs command (like "btrfs filesystem show") to obtain a volume UUID, but it was confused by the extra warning displayed in this case: 

    root@Tower:~# btrfs fi show /dev/sdp1
    WARNING: adding device /dev/sdq1 gen 1540 but found an existing device /dev/sdp1 gen 2898
    ERROR: cannot scan /dev/sdq1: File exists
    Label: none  uuid: 62f74f7e-1c39-4371-8e82-93c52566224a
    	Total devices 1 FS bytes used 2.70TiB
    	devid    1 size 2.73TiB used 2.73TiB path /dev/md13
    

    The warning was there because sdq is a leftover 2TB data disk that was replaced with sdp (3TB), so both drives had the same btrfs UUID.  Note that if you were trying to obtain the UUID of a drive, you could normally take the first line of the output and discard the first three words to get it.  But in this case, instead of a UUID, you get that last chunk of that warning message, which it then included in the btrfs replace command.

     

    Once I figured out what was going on, I reset the UUID on sdq ("btrfstune -u /dev/sdq1"), stopped the array, removed the second drive, started it, stopped it, and re-added the second drive.  The command was issued correctly, and it's now mirroring like a champ.

    tower-diagnostics-20190709-0143.zip




    User Feedback

    Recommended Comments

    I'm not blaming unraid for the clone disk having the same UUID, but it's not that bizarre a situation. The issue is that having a clone UUID on an unrelated spare disk broke unraid's process for adding a cache drive, in a way that could have caused some real problems. I would just suggest that they sanity-check the output of the btrfs command before using it as the input for another btrfs operation.

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.

×
×
  • Create New...