[bug] dmraid, lack of error handling

Heinz Mauelshagen mauelshagen at redhat.com
Fri Jul 7 23:03:41 UTC 2006


On Thu, Jul 06, 2006 at 07:58:45AM +0000, Molle Bestefich wrote:
> 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.

Agreed, put on MUSTFIX list.

Heinz

> 
> _______________________________________________
> Ataraid-list mailing list
> Ataraid-list at redhat.com
> https://www.redhat.com/mailman/listinfo/ataraid-list

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
Mauelshagen at RedHat.com                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




More information about the Ataraid-list mailing list