* programmatic API?
@ 2010-02-25 8:54 bardov
2010-02-25 10:46 ` Neil Brown
0 siblings, 1 reply; 2+ messages in thread
From: bardov @ 2010-02-25 8:54 UTC (permalink / raw)
To: linux-raid
I'd like to create/manage raid arrays from a program.
Is there an API, or a library I can link with?
Or is my only option using system("mdadm ..."); ?
Thanks,
--
This message was sent on behalf of bardov@gmail.com at openSubscriber.com
http://www.opensubscriber.com/messages/linux-raid@vger.kernel.org/topic.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: programmatic API?
2010-02-25 8:54 programmatic API? bardov
@ 2010-02-25 10:46 ` Neil Brown
0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2010-02-25 10:46 UTC (permalink / raw)
To: bardov; +Cc: linux-raid
On Thu, 25 Feb 2010 03:54:44 -0500
bardov@gmail.com wrote:
> I'd like to create/manage raid arrays from a program.
> Is there an API, or a library I can link with?
> Or is my only option using system("mdadm ..."); ?
>
>
You can do almost anything by reading/writing files
in /sys/class/block/mdX/md/
Some details are in Documentation/md.txt
For the few things that you cannot do through sysfs, you would use an IOCTL.
But I suspect that fork/exec("/sbin/mdadm" ....)
would be your best bet, though it depends on exactly what you want to do.
There is no library, but there a plenty if bits of code in the mdadm source
that you might want to borrow if your program will be GPL.
NeilBrown
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-25 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 8:54 programmatic API? bardov
2010-02-25 10:46 ` Neil Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).