Package pyanaconda :: Package storage :: Module devices :: Class LVMLogicalVolumeDevice
[hide private]
[frames] | no frames]

Class LVMLogicalVolumeDevice

source code

object --+            
         |            
    Device --+        
             |        
 StorageDevice --+    
                 |    
          DMDevice --+
                     |
                    LVMLogicalVolumeDevice

An LVM Logical Volume

Instance Methods [hide private]
 
__init__(self, name, vgdev, size=None, uuid=None, stripes=1, logSize=0, snapshotSpace=0, format=None, exists=None, sysfsPath='', grow=None, maxsize=None, percent=None, singlePV=False)
Create a LVMLogicalVolumeDevice instance.
source code
 
__repr__(self)
repr(x)
source code
 
dict(self) source code
 
writeKS(self, f, preexisting=False, noformat=False, s=None) source code
 
mirrored(self) source code
 
_setSize(self, size)
Set the device's size to a new value.
source code
 
vgSpaceUsed(self)
Space occupied by this LV, not including snapshots.
source code
 
vg(self)
This Logical Volume's Volume Group.
source code
 
mapName(self)
This device's device-mapper map name
source code
 
path(self)
Device node representing this device.
source code
 
getDMNode(self)
Return the dm-X (eg: dm-0) device node for this device.
source code
 
name(self)
This device's name.
source code
 
lvname(self)
The LV's name (not including VG name).
source code
 
complete(self)
Test if vg exits and if it has all pvs.
source code
 
setupParents(self, orig=False)
Run setup method of all parent devices.
source code
 
_setup(self, intf=None, orig=False)
Open, or set up, a device.
source code
 
_teardown(self, recursive=None)
Close, or tear down, a device.
source code
 
_postTeardown(self, recursive=False)
Perform post-teardown operations.
source code
 
_statusWindow(self, intf=None, title="", msg="") source code
 
_create(self, w)
Create the device.
source code
 
_preDestroy(self)
Preparation and precondition checking for device destruction.
source code
 
_destroy(self)
Destroy the device.
source code
 
_getSinglePV(self) source code
 
resize(self, intf=None)
Resize the device.
source code
 
dracutSetupArgs(self) source code
 
checkSize(self)
Check to make sure the size of the device is allowed by the format used.
source code

Inherited from DMDevice: fstabSpec, setupPartitions, slave, status, teardownPartitions, updateSysfsPath

Inherited from DMDevice (private): _setName

Inherited from StorageDevice: __str__, create, currentSize, destroy, disks, encrypted, formatArgs, growable, isDisk, maxSize, minSize, model, notifyKernel, packages, partedDevice, partitionable, partitioned, preCommitFixup, removable, resizable, serial, services, setup, teardown, vendor

Inherited from Device: __deepcopy__, addChild, dependsOn, isleaf, mediaPresent, removeChild, teardownParents, type, typeDescription

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  _type = "lvmlv"
  _resizable = True
  _packages = ["lvm2"]
  size = property(StorageDevice._getSize, _setSize)

Inherited from DMDevice (private): _devDir

Inherited from StorageDevice: format, sysfsBlockDir, targetSize

Inherited from StorageDevice (private): _isDisk, _partitionable

Inherited from Device (private): _id, _services

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, vgdev, size=None, uuid=None, stripes=1, logSize=0, snapshotSpace=0, format=None, exists=None, sysfsPath='', grow=None, maxsize=None, percent=None, singlePV=False)
(Constructor)

source code 
Create a LVMLogicalVolumeDevice instance.

Arguments:

    name -- the device name (generally a device node's basename)
    vgdev -- volume group (LVMVolumeGroupDevice instance)

Keyword Arguments:

    size -- the device's size (in MB)
    uuid -- the device's UUID
    stripes -- number of copies in the vg (>1 for mirrored lvs)
    logSize -- size of log volume (for mirrored lvs)
    snapshotSpace -- sum of sizes of snapshots of this lv
    sysfsPath -- sysfs device path
    format -- a DeviceFormat instance
    exists -- indicates whether this is an existing device
    singlePV -- if true, maps this lv to a single pv

    For new (non-existent) LVs only:

        grow -- whether to grow this LV
        maxsize -- maximum size for growable LV (in MB)
        percent -- percent of VG space to take

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

dict(self)

source code 
Decorators:
  • @property
Overrides: Device.dict

writeKS(self, f, preexisting=False, noformat=False, s=None)

source code 
Overrides: Device.writeKS

mirrored(self)

source code 
Decorators:
  • @property

_setSize(self, size)

source code 

Set the device's size to a new value.

Overrides: StorageDevice._setSize
(inherited documentation)

vgSpaceUsed(self)

source code 

Space occupied by this LV, not including snapshots.

Decorators:
  • @property

vg(self)

source code 

This Logical Volume's Volume Group.

Decorators:
  • @property

mapName(self)

source code 

This device's device-mapper map name

Decorators:
  • @property
Overrides: DMDevice.mapName

path(self)

source code 

Device node representing this device.

Decorators:
  • @property
Overrides: StorageDevice.path

getDMNode(self)

source code 

Return the dm-X (eg: dm-0) device node for this device.

Overrides: DMDevice.getDMNode

name(self)

source code 

This device's name.

Decorators:
  • @property
Overrides: Device.name

lvname(self)

source code 

The LV's name (not including VG name).

Decorators:
  • @property

complete(self)

source code 

Test if vg exits and if it has all pvs.

Decorators:
  • @property

setupParents(self, orig=False)

source code 

Run setup method of all parent devices.

Overrides: Device.setupParents
(inherited documentation)

_setup(self, intf=None, orig=False)

source code 

Open, or set up, a device.

Overrides: StorageDevice._setup

_teardown(self, recursive=None)

source code 

Close, or tear down, a device.

Overrides: StorageDevice._teardown

_postTeardown(self, recursive=False)

source code 

Perform post-teardown operations.

Overrides: StorageDevice._postTeardown
(inherited documentation)

_statusWindow(self, intf=None, title="", msg="")

source code 
Overrides: StorageDevice._statusWindow

_create(self, w)

source code 

Create the device.

Overrides: StorageDevice._create

_preDestroy(self)

source code 

Preparation and precondition checking for device destruction.

Overrides: StorageDevice._preDestroy
(inherited documentation)

_destroy(self)

source code 

Destroy the device.

Overrides: StorageDevice._destroy

resize(self, intf=None)

source code 

Resize the device.

New size should already be set.

Overrides: StorageDevice.resize
(inherited documentation)

dracutSetupArgs(self)

source code 
Overrides: Device.dracutSetupArgs

checkSize(self)

source code 

Check to make sure the size of the device is allowed by the format used.

Returns: 0 - ok 1 - Too large -1 - Too small

Overrides: StorageDevice.checkSize