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.
Recommended Comments
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.