Storage.ycp |
|
|
This module has an unstable interface. |
Returns Device Name
- Parameters:
-
disk partition
- Return value:
-
device name
- Example
-
Storage::GetDeviceName ("/dev/md", 1)
Returns ...
- Parameters:
-
dev
- Return value:
-
EvmsDevDisk
- Parameters:
-
device tg
Returns map describing the disk partition
- Parameters:
-
device
- Return value:
-
DiskPartition
Returns disk identified by 'device' taken from the 'tg' (target) map
- Parameters:
-
tg device
Sets partition 'part' into the 'tg' map and returns changed 'tg' map
- Parameters:
-
tg part
- Return value:
-
changed tg
Find next free loop device.
- Parameters:
-
start
- Return value:
-
loop_dev ( e.g.: /dev/loop1 )
Get List of swap partitions
- Return value:
-
List of swap partitions
Returns map of free space per partition
- Parameters:
-
device testsize used_fs verbose
Adds ... and returns the changed map
- Parameters:
-
targets
- Return value:
-
targets
Adds mountpoint info to the target map and returns the changed map
- Parameters:
-
target
- Return value:
-
target
Updates target map
- See
-
GetTargetMap()
Returns map with disk info
- Parameters:
-
device disk
- Return value:
-
disk info
Finds and returns fstab entry
$[ "spec" : "...", "file" : "...", "vfstype" : "...", "mntops" : "...", "freq" : ..., "passno" : ..., ]
- Parameters:
-
fstab mount device uuid label
- Return value:
-
fstab entry
- Example
-
FindFstabEntry ($[], "", "", "", "")
Returns map describing the disk target
Creates a new partition
- Parameters:
-
disk device ptype id start len mby
- Return value:
-
if successful
Sets a mountpoint for partition
- Parameters:
-
device mp
- Return value:
-
if successful
Sets whether a partition should be formatted
- Parameters:
-
device format fs
- Return value:
-
if successful
Sets partition ID
- Parameters:
-
device id
- Return value:
-
if successful
Restores the original partition ID
- Parameters:
-
device
- Return value:
-
if succesful
- See
-
SetPartitionId()
Sets a new size for partition
- Parameters:
-
device disk new_size
- Return value:
-
if successfull
Delete the partition table and disk label of device
- Parameters:
-
disk size_k
Set the flag if a disk needs to be initialized
- Parameters:
-
disk value
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
Removes ... maps to ...
- Parameters:
-
device
mark swap-partitions with pseudo Mountpoint swap in targetMap
- Parameters:
-
target Disk map
- Return value:
-
modified target
Returns a system target map.
$[
... ?
]
- Return value:
-
target map
Rereads the system target map and returns it
- Return value:
-
target map
- See
-
GetTargetMap();
Apply storage changes
Umounts a device
- Parameters:
-
dev
- Return value:
-
if successful
- See
-
Mount()
Mounts a device
- Parameters:
-
dev mp fstopt mount options
- Return value:
-
if successful
- See
-
Umount()
Mounts a device
- Parameters:
-
dev mp
- Return value:
-
if successful
- See
-
Umount()
Reads and returns fstab from directory
- Parameters:
-
dir
GetMountPoints() collect mountpoint:device as map to get a sorted list usually starting with a "/". Exception is "swap" For directory mount points (key starting with /) the value is a list [partitionName, fsid, targetdevice, raid_type] For swap mount points, the value is a list of lists: [[partitionName, fsid, targetdevice, raid_type], ...]
Set
- Parameters:
-
tg device key value
- Return value:
-
changed target map
Check if a disk is a real disk and not RAID or LVM
Structure entry ~ $[
"type":`CT_DISK, "driver" : "?", "readonly" : false / true, ]
- Parameters:
-
entry
- Return value:
-
true if real disk
Checks if a container is partitionable
Structure entry ~ $[ "type" : ... ? ]
- Parameters:
-
entry
- Return value:
-
true if partitionable
Get list of all Partitions on all real disks
- Return value:
-
Partition list
Get list of all Linux Partitions on all real disks
- Return value:
-
Partition list
Check if swap paritition is availbe on a disk
- Parameters:
-
disk Disk to be checked
- Return value:
-
true if swap available.
Returns list of primary partitions found
- Parameters:
-
targets foreign_os
- Return value:
-
of primary partitions
Returns whether a partition is resizable
- Parameters:
-
part
- Return value:
-
resizable ?
Adds an entry into the fstab
- Parameters:
-
e
- Return value:
-
(0 and higher == OK, otherwise error)
Writes fstab to the disk
Detects a filesystem on a device
- Parameters:
-
device name
- Return value:
-
filesystem
Updates fstab on disk
Structure version $[
// This means version 9.1 "major" : 9, "minor" : 1, ]
- Parameters:
-
oldv newv
Get used real disks
- Parameters:
-
tg ignore_boot
- Return value:
-
disks List of disks
CheckForLvmRootFs --------------------------------------------------------------------- check if the root filesystem is a lvm logical volume
CheckForEvmsRootFs --------------------------------------------------------------------- check if the root filesystem is a evms volume