Issue 1: If a specified providers' names are too long to hardcode in metadata, gmirror does not create a mirror and does not return an error. # gmirror label -h -b prefer data1 /dev/gpt/a12345678901234567890123456789012345 /dev/gpt/b12345678901234567890123456789012345 # echo $? 0 # gmirror list data1 gmirror: Class 'MIRROR' does not have an instance named 'data1'. Issue 2: If a specified mirror name is too long, gmirror silently truncates it and does not return an error. # gmirror label -h -b prefer m12345678901234567890 /dev/gpt/a1234567890 /dev/gpt/b1234567890 # echo $? 0 # gmirror status -s mirror/m12345678901234 COMPLETE gpt/a1234567890 (ACTIVE) mirror/m12345678901234 COMPLETE gpt/b1234567890 (ACTIVE) In my case the maximum possible length for the provider name is 11 characters and for the mirror name is 15 characters.
(In reply to rashey from comment #0) issue 1: As it is, the hardcoded value has a limit of 15 characters (as limited by the current metadata format)..this restriction extends to the providers name as well (only when hardcoding the name into the metadata though). At the very least, this restriction should be documented. And maybe gmirror should print an error when hardcoding a providers name that's longer than hardcoded limit. issue 2: Similar problem here, the limit for a mirror name is 15 characters, also limited by the current metadata format. That's why the mirror name gets truncated. This should also be documented. And possibly, gmirror should print error when trying to create mirror with a name longer than the mirror limit? If there's any input/feedback on how gmirror should behave when encountering issue 1 and 2, would be worth hearing.
(In reply to Robert Wing from comment #1) I am agree with everything. Additionally, it should be documented that the restriction also applies to provider type, in my case gpt/ which means 4 characters less for the provider name. That is why I was unable to hardcode GPT label longer than 11 characters.