YaST2 Developers Documentation: Storage.ycp

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 Zugriff 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.

This module has an unstable interface.

Imports

  • Arch
  • AsciiFile
  • Directory
  • Encoding
  • FileSystems
  • HTML
  • Hotplug
  • Installation
  • Label
  • LibStorage
  • LibStorage::ContainerInfo
  • LibStorage::DiskInfo
  • LibStorage::DmInfo
  • LibStorage::EvmsCoInfo
  • LibStorage::EvmsInfo
  • LibStorage::LoopInfo
  • LibStorage::LvmLvInfo
  • LibStorage::LvmVgInfo
  • LibStorage::MdInfo
  • LibStorage::PartitionInfo
  • LibStorage::StorageInterface
  • LibStorage::VolumeInfo
  • Misc
  • Mode
  • Partitions
  • Popup
  • ProductFeatures
  • Stage
  • StorageClients
  • StorageDevices
  • String

Includes

  • storage/routines.ycp

Global Functions

Local Functions

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

Get Device Name

Parameters:
disk Disk
partition
Return value:
device name
local GetDiskPartitionTg (string device, map<string,map> tg) -> map

Parameters:
device
tg
global GetLoopDev (integer start) -> string

Find next free loop device.

Parameters:
start
Return value:
loop_dev ( e.g.: /dev/loop1 )
global SwappingPartitions () -> list

Get List of swap partitions

Return value:
List of swap partitions
global Record () -> void

global Rollback () -> boolean

global Commit () -> boolean

global DeletePartitionTable (string disk) -> boolean

Delete the partition table and disk label of device

Parameters:
disk
global InitializeDisk (string disk, boolean value) -> boolean

Set the flag if a disk needs to be initialized

Parameters:
disk
value
local AddMountPointsForWinParts (list<map> partitions, boolean primary, integer max_prim, integer& foreign_nr) -> void

Search in the list partitions for windows partitions and add the key "mount" to the found windows partitions.

Parameters:
partitions
primary
max_prim
foreign_nr
Return value:
new partitions with windows mountpoints
global AddSwapMp (map<string,map> target) -> map<string,map>

mark swap-partitions with pseudo Mountpoint swap in targetMap

Parameters:
target Disk map
Return value:
modified target
global IsRealDisk (map entry) -> boolean

Check if a disk is a real disk and not RAID or LVM

Parameters:
entry
Return value:
true if real disk
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 GetPartitionList () -> list

Get list of all Partitions on all real disks

Return value:
Partition list
global GetOtherLinuxPartitions () -> list

Get list of all Linux Partitions on all real disks

Return value:
Partition list
global CheckSwapOn (string disk) -> boolean

Check if swap paritition is availbe on a disk

Parameters:
disk Disk to be checked
Return value:
true if swap available.
global GetUsedRealDisksNew (map<string,map> tg, boolean ignore_boot) -> list<string>

Get used real disks

Parameters:
tg Target map
ignore_boot
Return value:
disks List of disks
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