Not all topics I blog about in my Little Things Doth Crabby Make series make me crabby. Often times I’ll blog something that I presume would make at least one individual somewhere, sometime crabby. This one actually did make me crabby.
Huh? Was That Verbose?
I’m blogging about the –verbose option to the Linux mdadm(8) command. Consider the command I issued in the following text box.
$ mdadm --create --verbose /dev/md11 --level=stripe -c 4096 --raid-devices=16 /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy /dev/sdz /dev/sdaa /dev/sdab /dev/sdac mdadm: failed to create /dev/md11
OK, that wasn’t very verbose. Indeed, it only reported to me that the command failed. I could have figured that out by the obvious missing RAID device after my command prompt returned to me. In my mind, verbose shouldn’t mean what but why. That is, if I ask for verbose output I want something to help me figure out why something just happened. The what is obvious—command failure results in no RAID device.
As you’ll see in the following text box I checked to make sure I was superuser and indeed I was not. So I picked up superuser credentials and the command succeeded nicely. However, even when the command succeeds the verbose option isn’t exactly chatting my ear off! That said, getting brief output from a successful execution of a command, when I stipulate verbosity, would certainly not make it as an installment in the Little Things Doth Crabby Make series.
$ id uid=1002(oracle) gid=700(dba) groups=700(dba) $ su Password: # mdadm --create --verbose /dev/md11 --level=stripe -c 4096 --raid-devices=16 /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx /dev/sdy /dev/sdz /dev/sdaa /dev/sdab /dev/sdac mdadm: array /dev/md11 started.
The moral of the story is if you want to do things that require superuser become superuser.
I still want why-based output when I opt for verbosity. In this case there was a clear permissions problem. The command could have at least let the errno.h goodies trickle up!
Little things that make me crabby: “people writing very useful and entertaining bug reports, but then not sending them to someone who can fix the bug….”
BTW this particular issue is fixed in 3.1.2 because someone else reported it to Debian, and the Debian maintainer is very good at working with upstream (i.e. “me”). If you find other problems with mdadm I am happy to receive email about them, especially when a patch is included 🙂
Hi NeilBrown,
Point taken. I don’t recall saying it was a bug though 🙂 If you read many of the posts in the Little Things series you’ll see they generally finger me and my own stupid mistakes. Incidentally, a decent percentage of the 85K+ monthly readers (referred to this blog by search engines as opposed to RSS, etc) seem to be searching for information related to their own little mistakes and wind up reading a post in the Little Things series… it’s just a blogging approach and not aimed to flame.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=396570
might be useful to read
It’s Kevin’s act of kicking self in public. and making us learn from it.
🙂
G
yep 🙂