Forgot to cc the mailing list in previous mail so resending the same post. Cyril, please ignore the last post.
On Mon, Mar 8, 2010 at 1:53 PM, Cyril Plisko <cyril.pli...@mountall.com>wrote: > On Mon, Mar 8, 2010 at 10:11 AM, Ashwani Raina <ashwani.ra...@gmail.com> > wrote: > > Thanks Cyril for the quick reply. > > Hi Ashwani, > > > > > Yes, you are right I want to have more instances of pseudo devices which > use > > different physical block devices underneath. > > If I mention the instance like you did, how can I differentiate between > two > > different devices when doing some operation like mount, etc. > > You will need to create separate minor nodes for each instance, i.e. > /dev/lyr1 /dev/lyr2 (or whatever you want to call them) > With this approach, is it possible to create more nodes at the runtime, if more disks have been attached and I want to create pseudo nodes on them as well, without removing the driver? > > > I am not sure how I can create more instances dynamically from the driver > > itself, Could you please give me some pointers on the same. > > Sure, check lofi sources > > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/lofi.c > > > > > > > > On Mon, Mar 8, 2010 at 1:23 PM, Cyril Plisko <cyril.pli...@mountall.com> > > wrote: > >> > >> On Mon, Mar 8, 2010 at 9:33 AM, Ashwani Raina <ashwani.ra...@gmail.com> > >> wrote: > >> > Hi folks, > >> > > >> > I am currently using LDI interfaces to create pseudo devices over a > >> > block > >> > device. > >> > For the same, I have one driver file and one configuration file. > >> > > >> > Now, I need to support more than one block devices at a time. > >> > By that I mean to say, I should be able to create multiple pseudo > >> > devices on > >> > multiple target devices mentioned in .conf file. > >> > Not sure how to do that. Adding extra entry in .conf file is not > >> > working. > >> > May I am doing something wrong. > >> > > >> > Here is my .conf file content: > >> > ==== > >> > name="lyr" parent="pseudo" instance=1; > >> > lyr_targ="/dev/dsk/c7d1s2"; > >> > ==== > >> > >> You probably want to have more instances. i.e. > >> > >> name="lyr" parent="pseudo" instance=1 lyr_targ="/dev/dsk/c7d1s2"; > >> name="lyr" parent="pseudo" instance=1 lyr_targ="/dev/dsk/c8d1s2"; > >> > >> alternatively you may create more instances dynamically from the > >> driver itself (that is what I would do, by the way) > >> > >> > >> -- > >> Regards, > >> Cyril > > > > > > > > -- > > ---- > > ar > > > > ------ > > "Long you live and high you fly > > And smiles you'll give and tears you'll cry > > And all you touch and all you see > > Is all your life will ever be." > > > > > > -- > Regards, > Cyril > -- ---- ar ------ "Long you live and high you fly And smiles you'll give and tears you'll cry And all you touch and all you see Is all your life will ever be."
_______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss