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!