[bug] dmraid, lack of error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dmraid seems to lack proper error handling when the dm-mod module is not loaded.

# dmraid -tay -vvv
... lots of output, arrays discovered
# dmraid -ay
... no output at all, looks fine!
# ls /dev/mapper
control
... Huh, no devices created?

Once I did "strace dmraid -ay", I finally figured out that I had
"forgotten" to do "modprobe dm-mod":
# strace dmraid -ay
... snip
stat64("/dev/mapper/control", {st_mode=S_IFCHR|0644,
st_rdev=makedev(10, 63), ...}) = 0
open("/dev/mapper/control", O_RDWR|O_LARGEFILE) = -1 ENODEV (No such device)
unlink("/var/lock/dmraid/.lock")        = 0
flock(3, LOCK_NB|LOCK_UN)               = 0
close(3)                                = 0
exit_group(0)                           = ?

Above, /dev/mapper/control file exists, but opening it gives ENODEV.

I think dmraid lacks error handling in two more places, too:
- when the /dev/mapper directory does not exists,
- when the /dev/mapper/control device does not exist.

It would be very helpful if proper error messages were printed, insted
of just exiting with code 0.

_______________________________________________

Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux