YaST2 Developers Documentation: Storage.ycp



functions
files
intro

Storage.ycp

  • Johannes Buchhold <jbuch@suse.de>
  • Modified: Wenji Huang <wenji.huang@oracle.com>
  • 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
  • Directory
  • Encoding
  • FileSystems
  • Installation
  • Label
  • Mode
  • Partitions
  • Popup
  • StorageDevices

Includes

  • partitioning/write_fstab.ycp
  • storage/routines.ycp

Global Functions

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

Parameters:
disk
partition

global GetDiskPartition (string device) -> map

Parameters:
device

global GetLoopDev (integer start) -> string

Find next free loop device.

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

global GetLvmMdSystemInfo (map<string,map> targetMap) -> map<string,map>

Parameters:
targetMap

global ReadLvmMd (map<string,map> targetMap) -> map<string,map>

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

Parameters:
targetMap

global AddMountPointsForWinParts (list<map> 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 GetMainDev (string maindevkey) -> map<string, any>

Return a map that contains the maindev for maindevkey. @param maindevkey

Parameters:
maindevkey

global GetMainDevParam (string maindevkey, string paramkey, any default) -> any

Parameters:
maindevkey
paramkey
default

global CheckForLvmRootFs () -> boolean

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

global CheckForEvmsRootFs () -> boolean

CheckForEvmsRootFs --------------------------------------------------------------------- check if the root filesystem is a evms volume

global Record () -> void

global Rollback () -> boolean

global Commit () -> boolean

global Save (string doc) -> void

Parameters:
doc

global ExistsMainDevKeyEntry (string maindevkey) -> boolean

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

Parameters:
maindevkey
Return value:
@param maindevkey

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) -> boolean

Parameters:
maindevkey

global AddMainDev (string maindevkey, map<string, any> 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<string, any> newmaindev) -> boolean

Modify a maindev in Storage.

Parameters:
maindevkey describe the maindev
newmaindev map with modified maindev

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

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

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

YaST2 Developers Documentation