[prev in list] [next in list] [prev in thread] [next in thread] 

List:       evms-devel
Subject:    [Evms-devel] Re: symlinks in EVMS
From:       "Donald W Watson" <dwatson () us ! ibm ! com>
Date:       2001-10-18 15:44:09
[Download RAW message or body]

We have a requirement that volume management commands which reference
physical
volumes be able to use not only the full devfs filename path string for the
device (for
example:  /dev/scsi/host0/bus0/target1/lun0/part1), but also any symbolic
link which
points to a valid device (for example:  /dev/scsi_links/my_link ->
/dev/scsi/host0/bus0/
target1/lun0/part1).

LVM does not currently have this capability (see their bug #244).  LVM
commands which
are relevant are lvcreate, lvextend, pvchange, pvdisplay, vgcfgrestore,
vgimport,
vgreduce, and vgsplit.

A simple solution for this is to create a method which uses readlink() to
check:
1.  has the user entered a symbolic name for the physical volume parameter
2.  if yes, does the symlink point to an existing device file
3.  if yes, resolve the symlink to the device file full pathname and return
it


     Thanks,
          Don

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic