YaST2 Developers Documentation: Storage.ycp



functions
files
intro

Storage.ycp

  • Johannes Buchhold <jbuch@suse.de>
  • Purpose: These module contains all settings/information which
  • are needed to partitioning the harddisk. Futhermore it contains a interface
  • to * access and modify the partitioning settings.
  • Todo: Translate
  • Diese Modul enthält alle Informationen die für die Partitionierung der
  • Festplatten erforderlich sind. Diese Informationen bestehen aus der
  • Beschreibung, der vor der Partitionierung vorhandenen Platteneinstellungen,
  • und der Art und Weise wie diese verändert werden soll.
  • Alle nötigen Zugriffsfunktionen auf diese Datenstruktur sind ebenfalls in
  • diesem Modul enthalten. Der Zugriff auf die Speicherung der
  • Partitionseinstellungen läuft * also nur über dieses Modul.
  • Der Zufriff und die Rückgabe von Teilen der Partitionsdatenstruktur
  • wurde versucht * "intelligent" zu gestallten und ist im einzelen bei den
  • entspechenden Funktionen * näher erklärt.

Imports

  • Arch
  • AsciiFile
  • Console
  • FileSystems
  • Label
  • Misc
  • Mode
  • Partitions
  • RootPart
  • RootPart
  • StorageDevices

Includes

  • partitioning/write_fstab.ycp

Global Functions

global AddMountPointsForWinParts (list partitions, boolean primary) -> list

Search in the list partitions for windows partitions and add the key "mount" to the found windows partitions. @parm partitions the partitions list @parm primary handle primary or logical partitions

Parameters:
partitions
primary
Return value:
new partitions with windows mountpoints

global GetDeviceName (string disk, any partition) -> string

Parameters:
disk
partition

global GetDiskPartition (string device) -> map

Parameters:
device

global CheckForLvmRootFs () -> boolean

CheckForLvmRootFs --------------------------------------------------------------------- check if the root filesystem is a lvm logical volume

global Record () -> void

global Rollback () -> boolean

global Commit () -> boolean

global Save (string doc) -> void

Parameters:
doc

global IsMainDevMd (string maindevkey) -> boolean

Return true if Storage contains a /dev/md entry with the key "key". @param maindevkey

Parameters:
maindevkey

global IsMainDevVg (string maindevkey) -> boolean

Return true if Storage contains a volume group with the key "key".

Parameters:
maindevkey
Return value:
@param maindevkey

global IsMainDevDisk (string maindevkey)

Parameters:
maindevkey

global ExistsMainDevKeyEntry (string maindevkey) -> boolean

Return true if Storage contains a maindev with the key "maindevkey".

Parameters:
maindevkey
Return value:
@param maindevkey

global GetMainDev (string maindevkey) -> map

Return a map that contains the maindev for maindevkey.

Parameters:
maindevkey

global AddMainDev (string maindevkey, map newmaindev) -> boolean

Add a maindev to Storage.

Parameters:
maindevkey key for the new maindev
newmaindev map with the new maindev

global SetMainDev (string maindevkey, map newmaindev) -> boolean

Modify a maindev in Storage.

Parameters:
maindevkey describe the maindev
newmaindev map with modified maindev

global GetMainDevFilter (string what, string how) -> map

Parameters:
what "all" | "only_md" | "only_vg" | "only_disk" | "add_subdev_possible"
how "all" | "key_list"
Return value:
| list

global GetMainDevParam (string maindevkey, string paramkey)

Parameters:
maindevkey
paramkey

global IsSubDevExtended (string subdevkey) -> boolean

I386: Check if the patition-id is an extended -id

Parameters:
subdevkey
Return value:

global AddRaidSizeInfo () -> void

Insert Raid size info to Storage

global ZeroDevice (string del_device) -> integer

Delete the partition table and disk label of device

Parameters:
del_device

global HaveLinuxPartitions () -> boolean

Determine if there is any Linux partition on this system. If there is none, we don't need to ask if the user wants to update or boot an installed system - he can only do a new installation anyway. No time-consuming or dangerous operations should be performed here, only simple checks for existence of a Linux (type 83) partition.

Return value:
true if there is anything that might be a Linux partition

global GetLvmMdSystemInfo (map targetMap) -> map

Parameters:
targetMap

global ReadLvmMd (map targetMap) -> map

Reads LVM (vgscan ...) and MD data (/proc)

Parameters:
targetMap

global GetLoopDev (integer start) -> string

Find next free loop device.

Parameters:
start
Return value:
loop_dev ( e.g.: /dev/loop1 )

YaST2 Developers Documentation