• Increase font size
  • Default font size
  • Decrease font size
Home Software SysFunc Sysfunc Reference Guide - Disk management

Sysfunc Reference Guide - Disk management

E-mail Print
Read : 9,597 times
(1 vote, average 5.00 out of 5)
Article Index
Sysfunc Reference Guide
Configuration parameters
System database
Disk management
Error handling
File manipulation
Filesystems
IP V4 addresses
Kernel
Logical volume manager
Miscellaneous
Message display
User interaction
Network
OS
File backup
Software packages
Services
Time and date
Temporary file management
Users and groups
Vmware-specific
Function index
All Pages
This section contains functions to manipulate disks and block devices.

disk_category

Get category of content for a given disk device

Arguments

$1Device path

Returns

Always 0

Displays

'fs' if it is a filesystem 'swap' if it is a swap partition else, the type returned by disk_type()

disk_fs_size

Get the size of a file system (from device name)

File system can be mounted or not.

Note: In order to get the size of a mounted filesystem containing a given path, use fs_size.

Arguments

$1Device

Returns

0 if dev exists and contains a FS, else !=0.

Displays

FS size in bytes. If the device does not exist or does not contain a FS, displays nothing.

disk_normalize_device

Normalize a disk device name

After being normalized, device names can be compared.

Input can be in the form:

- /dev/<vg>/<lv> - /dev/mapper/... - /dev/<partition or disk> (as /dev/sda1) - LABEL=xxx - UUID=xxx

Output is in the form:

- /dev/<vg>/<lv> if LVM logical volume - /dev/<physical> if physical disk - Copy of input if input was not recognised

Arguments

$1Device name to normalize

Returns

0 if device exists, 1 if not

Displays

Normalized name if device exists, copy of input if not

disk_rescan

Scan and discover new SCSI devices

Calling program should wait between 5 and 10 seconds for new devices to be discovered.

Arguments

None

Returns

Always 0

Displays

Nothing

disk_type

Returns type of content for a given disk device

Arguments

$1Device path

Returns

Always 0

Displays

type returned by 'blkid' command

 

Please login or register to add a comment