Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

disklabel(8) [osx man page]

disklabel(8)						    BSD System Manager's Manual 					      disklabel(8)

NAME
disklabel -- manipulate and query an Apple Label disk label SYNOPSIS
disklabel -create disk-device [-msize=size] [property=value] [...] disklabel -status disk-device disklabel -properties disk-device [property[=value]] [...] disklabel -destroy disk-device DESCRIPTION
The disklabel utility manipulates ``Apple Label'' partition metadata. ``Apple Label'' partitions allow for a disk device to have a consis- tent name, ownership, and permissions across reboots, even though uses a dynamic pseudofilesystem for /dev. The ``Apple Label'' partition uses a set of metadata (as a plist) in a reserved area of the partition. This metadata describes the owner, name, and so forth. When -create is used, the -msize argument can specify the size of metadata area; the default is 128Kbytes. The default size unit is bytes, but the following suffixes may be used to multiply by the given factor: ``b'' (512), ``k'' (1024), ``m'' (1048576), and ``g'' (1073741824). Although any key-value pair can be specified for the properties, certain keys are used by the system: owner-uid The user (as either a string or numeric value) to own the device. owner-gid The group (as either a string or numeric value) associated with the device. owner-mode The permissions (as a numeric value) for the device. dev-name The name for the device. If the owner-uid and owner-gid properties are given as strings, the utility will attempt to look up the names (as users or groups, as appro- priate), and will store the numeric values in the metadata. If it cannot find the names, and the values are not given as numbers, it will print an error, and not store the key/value pairs in the metadata. The owner-mode property may be given in decimal, or in octal by using a preceding ``0'' (e.g., ``0666''). Any property may be forced to be treated as a string by enclosing it in double-quotation marks; bear in mind that shell escapes will probably be necessary in this sitation. The -properties directive can print out all keys (if no arguments are given), a requested set of keys (if a list of key names is given), or can modify (or add) keys (if a key-value pairs are given). also maintains a checksum of the metadata; the -status directive verifies this checksum. EXAMPLES
The following example will create a device with 1MByte of metadata area, owned by fred, with a device name of fred, and be writable by fred: disklabel -create /dev/rdisk1s1 -msize=1M owner-uid=fred dev-name=fred owner-mode=0644 The following example will then print out the key-value pairs from the above: disklabel -properties /dev/rdisk1s1 SEE ALSO
pdisk(8) BSD
September 3, 2004 BSD

Check Out this Related Man Page

extendfs(8)						      System Manager's Manual						       extendfs(8)

NAME
extendfs - Extends UFS file systems SYNOPSIS
/sbin/extendfs [- s] [disk_blocks] device_name DESCRIPTION
Use the extendfs command to increase the storage space in a UFS file system. The file system must not be mounted when you perform this operation. To extend a mounted (in use) UFS file system, use the mount command with the -o extend option. The procedure for increasing the storage space of a UFS file system is as follows: Look at the contents the /etc/fstab file to identify the disk partition that maps to the file system. Ensure that there is available storage space on the target disk as follows: If LSM is in use on your system, use LSM commands to increase the size of the LSM volume as described in the Logical Storage Manager guide. If LSM is not in use on your system, use the disklabel command or the diskconfig graphical user interface to check the current size and use of partitions on the disk. If there is adequate space on an adjacent partition, use the disklabel command to write the current label to a file as fol- lows: # disklabel -r dsk4 > d4label Edit the disklabel file to change the size of the partition on which your UFS file system resides. Increase the number of disk blocks on the partition and decrease the disk block size of the adjacent partition by an equivalent number. Use the disklabel command with the -R option to write the revised label to the raw disk as follows: # disklabel -R /dev/rdisk/dsk4 d4label When the disk label is revised, extend the file system using the extendfs command. You can either use the full extent of the newly sized partition or extend the file system in stages. The following example commands show both methods. To extend the file system to use all the available space, you specify the disk partition on which the file system resides, as follows: # extendfs /dev/disk/dsk4g To extend the file system to use only part of the available space, you specify a number of disk blocks, as follows: # extendfs -s 300000 /dev/disk/dsk4g The remainder of the extended partion is reserved for future use. You can extend a file system as many times as necessary, up to the physical limit of the storage device. When no more space is available on the storage device, you must back up the file system using the dump command and restore the file system to a storage device that has more available space. Once you have extended a file system, the operation cannot be reversed except by a back up and restore operation. Use the dump command to back up the file system. You can then reset the partition sizes manually and restore the file system to the storage device. ERRORS
The disklabel command produces output similar to that of the newfs command. If a list of disk blocks is not displayed on the terminal, the command has failed. Verify the partition settings and the mount status of the target file system. The disklabel command does not permit you to overwrite a partition if it is in use. Refer to the disklabel(8) reference page for more information on label errors. FILES
Specifies the command path. RELATED INFORMATION
diskconfig(8), disklabel(8), mount(8), and fstab(4). extendfs(8)
Man Page