Mounting using OpenLMI

Karel Zak kzak at redhat.com
Fri Sep 19 11:36:41 UTC 2014


On Thu, Sep 18, 2014 at 11:17:16AM +0200, Jan Safranek wrote:
> On 09/18/2014 10:35 AM, Ramesh Nachimuthu wrote:
> > Hi,
> > 
> >   I am trying to mount a disk using OpenLMI through WBEM(using YAWN CIM
> > Browser). I am calling the method *"LMI_MountConfigurationService ::
> > CreateMount()". *It mounts the file system successfully, but it doesn't
> > put an entry into /etc/fstab to make it persistent. I tried with
> > parameter "Mode=1" as well as "Mode=2". But no help. Is creating the
> > entry in /etc/fstab is supported? if yes please point me to some doc links. 
> > 
> > I am following the doc at http://www.openlmi.org/agent_storage_mount-model 
> 
> Hello Ramesh,
> 
> as the page says, it's just draft of our mounting design. What was
> actually implemented is documented at
> http://www.openlmi.org/sites/default/files/doc/admin/openlmi-storage/latest/usage-mounting.html
> and fstab editing is currently not implemented. It will be addressed in
> a future release, however it will take some time to implement it -
> blivet library we use for storage management does not support it.

 BTW, libmount supports fstab editing including comments lines, it's
 also available by python binding:

         $ python3 
         >>> import libmount as mnt
         >>> tb = mnt.Table()
         >>> tb.enable_comments(1)
         >>> tb.parse_fstab()
         >>> fs = mnt.Fs()
         >>> fs.comment = "# This is cool new mountpoint\n"
         >>> fs.source = "/dev/sdab1"
         >>> fs.target = "/mnt/test"
         >>> fs.fstype = "ext4"
         >>> fs.options = "ro,noauto"
         >>> tb.add_fs(fs)
         >>> tb.write_file(path="/home/kzak/example")
         >>> exit()
            
         $ cat  /home/kzak/example
         ...
         # This is cool new mountpoint
         /dev/sdab1 /mnt/test ext4 ro,noauto 0 0



  Karel


-- 
 Karel Zak  <kzak at redhat.com>
 http://karelzak.blogspot.com


More information about the openlmi-devel mailing list