tuned-adm

title: tuned-adm(8)

text:
# tuned-adm(8)

## NAME
tuned-adm - command line tool for switching between different tuning profiles

## SYNOPSIS
tuned-adm [list | active | profile [profile]... | profile_info [profile]... | off | auto_profile | profile_mode | verify [-i | --ignore-missing] | recommend | instance_acquire_devices devices instance | get_instances [plugin] | instance_get_devices instance]

## DESCRIPTION
This command line utility allows you to switch between user definable tuning profiles. Several predefined profiles are already included. You can even create your own profile, either based on one of the existing ones by copying it or make a completely new one. The distribution provided profiles are stored in subdirectories below /usr/lib/tuned/profiles/ and the user defined profiles in subdirectories below /etc/tuned/profiles/. If there are profiles with the same name in both places, user defined profiles have precedence.

## OPTIONS
list

List all available profiles.

profiles List all available profiles.

plugins List all available plugins.

-v, --verbose List plugin's configuration options and their hints.

active

Show current active profile.

profile [PROFILE_NAME]...

Switches to the given profile. If more than one profile is given, the profiles are merged (in case of conflicting settings, the setting from the last profile is used) and the resulting profile is applied. If no profile is given, then all available profiles are listed. If the profile given is not valid, the command gracefully exits without performing any operation.

profile_info [PROFILE_NAME]...

Show information/description of given profile or current profile if no profile is specified.

verify [-i | --ignore-missing]

Verifies current profile against system settings. Outputs information whether system settings match current profile or not (e.g. somebody modified a sysfs/sysctl value by hand). Detailed information about what is checked, what value is set and what value is expected can be found in the log. With the -i or --ignore-missing it does not treat missing tuning (tuning unsupported by the platform) as error.

recommend

Recommend a profile suitable for your system. Currently only static detection is implemented - it decides according to data in /etc/system-release-cpe and virt-what output. The rules for autodetection are defined in the file /usr/lib/tuned/recommend.d/50-tuned.conf. The default rules recommend profiles targeted to the best performance, or the balanced profile if unsure. The default rules can be overridden by the user by putting a file named recommend.conf into /etc/tuned, or by creating a file in the /etc/tuned/recommend.d directory. The file /etc/tuned/recommend.conf is evaluated first. If no match is found, the files in the /etc/tuned/recommend.d directory are merged with the files in the /usr/lib/tuned/recommend.d directory (if there is a file with the same name in both directories, the one from /etc/tuned/recommend.d is used) and the files are evaluated in alphabetical order. The first matching entry is used.

auto_profile

Enable automatic profile selection mode, switch to the recommended profile.

profile_mode

Show current profile selection mode.

instance_acquire_devices devices instance

Move all provided devices under the given plugin instance. The plugin instance is identified using its name from the TuneD profile. The devices are specified using a comma-separated list. When moving a set of CPUs, it is possible to use the cpulist syntax by including the 'cpulist:' prefix. For instance, 'cpulist:0,2-4' will move the devices cpu0, cpu1, cpu2, and cpu4.

get_instances [plugin]

List active instances of a given plugin or all active instances if no plugin is specified.

instance_get_devices instance

List devices currently assigned to a given instance.

off

Unload tunings.

## FILES

```
/etc/tuned/*
/usr/lib/tuned/*
```

## SEE ALSO
tuned(8) tuned.conf(5) tuned-profiles(7) tuned-profiles-atomic(7) tuned-profiles-sap(7) tuned-profiles-sap-hana(7) tuned-profiles-mssql(7) tuned-profiles-oracle(7) tuned-profiles-realtime(7) tuned-profiles-nfv-host(7) tuned-profiles-nfv-guest(7) tuned-profiles-cpu-partitioning(7) tuned-profiles-compat(7) tuned-profiles-postgresql(7) tuned-profiles-openshift(7) tuned-profiles-spectrumscale-ece(7)

## AUTHOR

```
Jaroslav Škarvada <jskarvad@redhat.com>
Jan Kaluža <jkaluza@redhat.com>
Jan Včelák <jvcelak@redhat.com>
Marcela Mašláňová <mmaslano@redhat.com>
Phil Knirsch <pknirsch@redhat.com>
```


tuned-gui

package: tuned

title: tuned-gui(8)

text:
# tuned-gui(8)

## NAME
tuned-gui - graphical interface for configuration of TuneD

## SYNOPSIS
tuned-gui

## DESCRIPTION
tuned-gui is graphical interface for configuration of TuneD daemon. GUI allows user to easily create, remove or update TuneD profiles and load those profiles into TuneD. It is also possible to explore all available plugins and information about them, like their description or help for their configuration parameters.

## TABS
SUMMARY

Display current active profile and configuration of plugins used by it.

PROFILES

Display available profiles and their origin (System | User). Profiles can be managed by 'create new profile', 'Edit' and 'Remove' buttons.

PLUGINS

Display available plugins and all accessible information about them.

## SEE ALSO
tuned(8) tuned-adm(8)

## AUTHOR

```
Jaroslav Škarvada <jskarvad@redhat.com>
Marek Stana
Tomáš Korbař <tkorbar@redhat.com>
```

## REPORTING BUGS
Report bugs to https://bugzilla.redhat.com/.


systemd-hwdb

package: udev

title: systemd-hwdb(8)

summary: hardware database management tool

text:
# systemd-hwdb(8)

## NAME
systemd-hwdb - hardware database management tool

## SYNOPSIS
systemd-hwdb [options] update

systemd-hwdb [options] query modalias

## DESCRIPTION
systemd-hwdb expects a command and command specific arguments. It manages the binary hardware database.

## OPTIONS
--usr

Generate in /usr/lib/udev instead of /etc/udev. Added in version 219.

-r, --root=PATH

Alternate root path in the filesystem. Added in version 219.

-s, --strict

When updating, return non-zero exit value on any parsing error. Added in version 239.

-h, --help

Print a short help text and exit.

### systemd-hwdb [options] update
Update the binary database.

### systemd-hwdb [options] query MODALIAS
Query database and print result.

## SEE ALSO
systemd(1) hwdb(7)


systemd-udev-settle.service

title: systemd-udev-settle.service(8)

text:
# systemd-udev-settle.service(8)

## NAME
systemd-udev-settle.service - Wait for all pending udev events to be handled

## SYNOPSIS
systemd-udev-settle.service

## DESCRIPTION
This service calls udevadm settle to wait until all events that have been queued by udev(7) have been processed. It is a crude way to wait until "all" hardware has been discovered. Services may pull in this service and order themselves after it to wait for the udev queue to be empty.

Using this service is not recommended. There can be no guarantee that hardware is fully discovered at any specific time, because the kernel does hardware detection asynchronously, and certain buses and devices take a very long time to become ready, and also additional hardware may be plugged in at any time. Instead, services should subscribe to udev events and react to any new hardware as it is discovered. Services that, based on configuration, expect certain devices to appear, may warn or report failure after a timeout. This timeout should be tailored to the hardware type. Waiting for systemd-udev-settle.service usually slows boot significantly, because it means waiting for all unrelated events too.

## SEE ALSO
udev(7), udevadm(8)


systemd-udevd.service

title: systemd-udevd.service(8)

summary: Device event managing daemon

text:
# systemd-udevd.service(8)

## NAME
systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd - Device event managing daemon

## SYNOPSIS
systemd-udevd.service

systemd-udevd-control.socket

systemd-udevd-kernel.socket

/usr/lib/systemd/systemd-udevd [--daemon] [--debug] [--children-max=] [--exec-delay=] [--event-timeout=] [--resolve-names=early|late|never] [--version] [--help]

## DESCRIPTION
systemd-udevd listens to kernel uevents. For every event, systemd-udevd executes matching instructions specified in udev rules. See udev(7).

The behavior of the daemon can be configured using udev.conf(5), its command line options, environment variables, and on the kernel command line, or changed dynamically with udevadm control.

## OPTIONS
-d, --daemon

Detach and run in the background. Added in version 186.

-D, --debug

Print debug messages to standard error. Added in version 186.

-c, --children-max=

Limit the number of events executed in parallel. Added in version 186.

-e, --exec-delay=

Delay the execution of each RUN{program} parameter by the given number of seconds. This option might be useful when debugging system crashes during coldplug caused by loading non-working kernel modules. Added in version 186.

-t, --event-timeout=

Set the number of seconds to wait for events to finish. After this time, the event will be terminated. The default is 180 seconds. Added in version 216.

-s, --timeout-signal=

Set the signal which systemd-udevd will send to forked off processes after reaching event timeout. The setting can be overridden at boot time with the kernel command line option udev.timeout_signal=. Setting to SIGABRT may be helpful in order to debug worker timeouts. Defaults to SIGKILL. Note that setting the option on the command line overrides the setting from the configuration file. Added in version 246.

-N, --resolve-names=

Specify when systemd-udevd should resolve names of users and groups. When set to early (the default), names will be resolved when the rules are parsed. When set to late, names will be resolved for every event. When set to never, names will never be resolved and all devices will be owned by root. Added in version 186.

-h, --help

Print a short help text and exit.

--version

Print a short version string and exit.

## KERNEL COMMAND LINE
Parameters prefixed with "rd." will be read when systemd-udevd is used in an initrd, those without will be processed both in the initrd and on the host.

udev.log_level=, rd.udev.log_level=

Set the log level. Added in version 247.

udev.children_max=, rd.udev.children_max=

Limit the number of events executed in parallel. Added in version 186.

udev.exec_delay=, rd.udev.exec_delay=

Delay the execution of each RUN{program} parameter by the given number of seconds. This option might be useful when debugging system crashes during coldplug caused by loading non-working kernel modules. Added in version 186.

udev.event_timeout=, rd.udev.event_timeout=

Wait for events to finish up to the given number of seconds. This option might be useful if events are terminated due to kernel drivers taking too long to initialize. Added in version 216.

udev.timeout_signal=, rd.udev.timeout_signal=

Specifies a signal that systemd-udevd will send to workers on timeout. Note that kernel command line option overrides both the setting in the configuration file and the one on the program command line. Added in version 246.

udev.blockdev_read_only, rd.udev.blockdev_read_only

If specified, mark all physical block devices read-only as they appear. Synthetic block devices (such as loopback block devices or device mapper devices) are left as they are. This is useful to guarantee that the contents of physical block devices remains unmodified during runtime, for example to implement fully stateless systems, for testing or for recovery situations where corrupted file systems shall not be corrupted further through accidental modification. A block device may be marked writable again by issuing the blockdev --setrw command, see blockdev(8) for details.

Added in version 246.

net.ifnames=

Network interfaces are renamed to give them predictable names when possible. It is enabled by default; specifying 0 disables it. Added in version 199.

net.naming_scheme=

Network interfaces are renamed to give them predictable names when possible (unless net.ifnames=0 is specified, see above). With this kernel command line option it is possible to pick a specific version of this algorithm and override the default chosen at compilation time. Expects one of the naming scheme identifiers listed in systemd.net-naming-scheme(7), or "latest" to select the latest scheme known (to this particular version of systemd-udevd.service). Note that selecting a specific scheme is not sufficient to fully stabilize interface naming: the naming is generally derived from driver attributes exposed by the kernel. As the kernel is updated, previously missing attributes systemd-udevd.service is checking might appear, which affects older name derivation algorithms, too.

Added in version 240.

net.ifname_policy=policy1[,policy2,...][,MAC]

Specifies naming policies applied when renaming network interfaces. Takes a list of policies and an optional MAC address separated with comma. Each policy value must be one of the policies understood by the NamePolicy= setting in .link files, e.g. "onboard" or "path". See systemd.link(5) for more details. When the MAC address is specified, the policies are applied to the interface which has the address. When no MAC address is specified, the policies are applied to all interfaces. This kernel command line argument can be specified multiple times. This argument is not directly read by systemd-udevd, but is instead converted to a .link file by systemd-network-generator.service(8). For this argument to take effect, systemd-network-generator.service must be enabled.

Example:

```
net.ifname_policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab
net.ifname_policy=keep,kernel,path,slot,onboard,mac
```

This is mostly equivalent to creating the following .link files:

```
# 91-name-policy-with-mac.link
[Match]
MACAddress=01:23:45:67:89:ab
[Link]
NamePolicy=keep kernel path slot onboard
AlternativeNamePolicy=path slot onboard
```

and

```
# 92-name-policy-for-all.link
[Match]
OriginalName=*
[Link]
NamePolicy=keep kernel path slot onboard mac
AlternativeNamePolicy=path slot onboard mac
```

Added in version 250.

## SEE ALSO
udev.conf(5), udev(7), udevadm(8)


udevadm

title: udevadm(8)

summary: udev management tool

text:
# udevadm(8)

## NAME
udevadm - udev management tool

## SYNOPSIS
udevadm [--debug] [--version] [--help]

udevadm info [options] [devpath]

udevadm trigger [options] [devpath]

udevadm settle [options]

udevadm control option

udevadm monitor [options]

udevadm test [options] devpath

udevadm test-builtin [options] command devpath

udevadm verify [options...] [file...]

udevadm wait [options] device|syspath

udevadm lock [options] command

## DESCRIPTION
udevadm expects a command and command specific options. It controls the runtime behavior of systemd-udevd, requests kernel events, manages the event queue, and provides simple debugging mechanisms.

## OPTIONS
-d, --debug

Print debug messages to standard error. This option is implied in udevadm test and udevadm test-builtin commands.

-h, --help

Print a short help text and exit.

### udevadm info [options] [devpath|file|unit]
Query the udev database for device information.

Positional arguments should be used to specify one or more devices. Each one may be a device name (in which case it must start with /dev/), a sys path (in which case it must start with /sys/), or a systemd device unit name (in which case it must end with ".device", see systemd.device(5)).

-q, --query=TYPE

Query the database for the specified type of device data. Valid TYPEs are: name, symlink, path, property, all.

--property=NAME

When showing device properties using the --query=property option, limit display to properties specified in the argument. The argument should be a comma-separated list of property names. If not specified, all known properties are shown. Added in version 250.

--value

When showing device properties using the --query=property option, print only their values, and skip the property name and "=". Cannot be used together with -x/--export or -P/--export-prefix.

Added in version 250.

-p, --path=DEVPATH

The /sys/ path of the device to query, e.g. [/sys/]/class/block/sda. This option is an alternative to the positional argument with a /sys/ prefix. udevadm info --path=/class/block/sda is equivalent to udevadm info /sys/class/block/sda.

-n, --name=FILE

The name of the device node or a symlink to query, e.g. [/dev/]/sda. This option is an alternative to the positional argument with a /dev/ prefix. udevadm info --name=sda is equivalent to udevadm info /dev/sda.

-r, --root

Print absolute paths in name or symlink query.

-a, --attribute-walk

Print all sysfs properties of the specified device that can be used in udev rules to match the specified device. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules. This switch supports JSON output mode (see --json= below). Note that because this switch generates multiple JSON objects, JSON-SEQ mode is automatically enabled (RFC7464). (Note: tools such as jq[1] natively support JSON-SEQ via the --seq switch.)

-t, --tree

Display a sysfs tree. This recursively iterates through the sysfs hierarchy and displays it in a tree structure. If a path is specified only the subtree below and its parent directories are shown. This will show both device and subsystem items. Added in version 251.

-x, --export

Print output as key/value pairs. Values are enclosed in single quotes. This takes effects only when --query=property or --device-id-of-file=FILE is specified.

-P, --export-prefix=NAME

Add a prefix to the key name of exported values. This implies --export.

-d, --device-id-of-file=FILE

Print major/minor numbers of the underlying device, where the file lives on. If this is specified, all positional arguments are ignored.

-e, --export-db

Export the content of the udev database.

-c, --cleanup-db

Cleanup the udev database.

-w[SECONDS], --wait-for-initialization[=SECONDS]

Wait for device to be initialized. If argument SECONDS is not specified, the default is to wait forever. Added in version 243.

--subsystem-match[=SUBSYSTEM], --subsystem-nomatch[=SUBSYSTEM]

When used with --export-db, only show devices of or not of the given subsystem respectively. Added in version 255.

--attr-match[=FILE[=VALUE]], --attr-nomatch[=FILE[=VALUE]]

When used with --export-db, only show devices matching or not matching the given attribute respectively. Added in version 255.

--property-match[=KEY=VALUE]

When used with --export-db, only show devices matching the given property and value. Added in version 255.

--tag-match[=TAG]

When used with --export-db, only show devices with the given tag. Added in version 255.

--sysname-match[=NAME]

When used with --export-db, only show devices with the given "/sys" path. Added in version 255.

--name-match[=NAME]

When used with --export-db, only show devices with the given name in "/dev". Added in version 255.

--parent-match[=NAME]

When used with --export-db, only show devices with the given parent device. Added in version 255.

--initialized-match, --initialized-nomatch

When used with --export-db, only show devices that are initialized or not initialized respectively. Added in version 255.

--json=MODE

Shows output formatted as JSON. Expects one of "short" (for the shortest possible output without any redundant whitespace or line breaks), "pretty" (for a pretty version of the same, with indentation and line breaks) or "off" (to turn off JSON output, the default).

-h, --help

Print a short help text and exit.

--no-pager

Do not pipe output into a pager.

The generated output shows the current device database entry in a terse format. Each line shown is prefixed with one of the following characters:

Table 1. udevadm info output prefixes

Prefix

Meaning

"P:"

Device path in /sys/

"M:"

Device name in /sys/ (i.e. the last component of "P:")

"R:"

Device number in /sys/ (i.e. the numeric suffix of the last component of "P:")

"J:"

Device ID

"U:"

Kernel subsystem

"B:"

Driver subsystem

"T:"

Kernel device type within subsystem

"D:"

Kernel device node major/minor

"I:"

Network interface index

"N:"

Kernel device node name

"L:"

Device node symlink priority

"S:"

Device node symlink

"Q:"

Block device sequence number (DISKSEQ)

"V:"

Attached driver

"E:"

Device property

### udevadm trigger [options] [devpath|file|unit]
Request device events from the kernel. Primarily used to replay events at system coldplug time.

Takes device specifications as positional arguments. See the description of info above.

-v, --verbose

Print the list of devices which will be triggered.

-n, --dry-run

Do not actually trigger the event.

-q, --quiet

Suppress error logging in triggering events. Added in version 248.

-t, --type=TYPE

Trigger a specific type of devices. Valid types are "all", "devices", and "subsystems". The default value is "devices".

-c, --action=ACTION

Type of event to be triggered. Possible actions are "add", "remove", "change", "move", "online", "offline", "bind", and "unbind". Also, the special value "help" can be used to list the possible actions. The default value is "change".

--prioritized-subsystem=SUBSYSTEM[,SUBSYSTEM...]

Takes a comma separated list of subsystems. When triggering events for devices, the devices from the specified subsystems and their parents are triggered first. For example, if --prioritized-subsystem=block,net, then firstly all block devices and their parents are triggered, in the next all network devices and their parents are triggered, and lastly the other devices are triggered. This option can be specified multiple times, and in that case the lists of the subsystems will be merged. That is, --prioritized-subsystem=block --prioritized-subsystem=net is equivalent to --prioritized-subsystem=block,net. Added in version 251.

-s, --subsystem-match=SUBSYSTEM

Trigger events for devices which belong to a matching subsystem. This option supports shell style pattern matching. When this option is specified more than once, then each matching result is ORed, that is, all the devices in each subsystem are triggered.

-S, --subsystem-nomatch=SUBSYSTEM

Do not trigger events for devices which belong to a matching subsystem. This option supports shell style pattern matching. When this option is specified more than once, then each matching result is ANDed, that is, devices which do not match all specified subsystems are triggered.

-a, --attr-match=ATTRIBUTE=VALUE

Trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. When this option is specified multiple times, then each matching result is ANDed, that is, only devices which have all specified attributes are triggered.

-A, --attr-nomatch=ATTRIBUTE=VALUE

Do not trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. When this option is specified multiple times, then each matching result is ANDed, that is, only devices which have none of the specified attributes are triggered.

-p, --property-match=PROPERTY=VALUE

Trigger events for devices with a matching property value. This option supports shell style pattern matching. When this option is specified more than once, then each matching result is ORed, that is, devices which have one of the specified properties are triggered.

-g, --tag-match=TAG

Trigger events for devices with a matching tag. When this option is specified multiple times, then each matching result is ANDed, that is, devices which have all specified tags are triggered.

-y, --sysname-match=NAME

Trigger events for devices for which the last component (i.e. the filename) of the /sys/ path matches the specified PATH. This option supports shell style pattern matching. When this option is specified more than once, then each matching result is ORed, that is, all devices which have any of the specified NAME are triggered.

--name-match=NAME

Trigger events for devices with a matching device path. When this option is specified more than once, then each matching result is ORed, that is, all specified devices are triggered. Added in version 218.

-b, --parent-match=SYSPATH

Trigger events for all children of a given device. When this option is specified more than once, then each matching result is ORed, that is, all children of each specified device are triggered.

--initialized-match, --initialized-nomatch

When --initialized-match is specified, trigger events for devices that are already initialized by systemd-udevd, and skip devices that are not initialized yet. When --initialized-nomatch is specified, trigger events for devices that are not initialized by systemd-udevd yet, and skip devices that are already initialized.

Typically, it is essential that applications which intend to use such a match, make sure a suitable udev rule is installed that sets at least one property on devices that shall be matched. See also Initialized Devices section below for more details.

Warning

--initialized-nomatch can potentially save a significant amount of time compared to re-triggering all devices in the system and e.g. can be used to optimize boot time. However, this is not safe to be used in a boot sequence in general. Especially, when udev rules for a device depend on its parent devices (e.g. "ATTRS" or "IMPORT{parent}" keys, see udev(7) for more details), the final state of the device becomes easily unstable with this option.

Added in version 251.

-w, --settle

Apart from triggering events, also waits for those events to finish. Note that this is different from calling udevadm settle. udevadm settle waits for all events to finish. This option only waits for events triggered by the same command to finish. Added in version 238.

--uuid

Trigger the synthetic device events, and associate a randomized UUID with each. These UUIDs are printed to standard output, one line for each event. These UUIDs are included in the uevent environment block (in the "SYNTH_UUID=" property) and may be used to track delivery of the generated events. Added in version 249.

--wait-daemon[=SECONDS]

Before triggering uevents, wait for systemd-udevd daemon to be initialized. Optionally takes timeout value. Default timeout is 5 seconds. This is equivalent to invoking udevadm control --ping before udevadm trigger. Added in version 241.

-h, --help

Print a short help text and exit.

In addition, optional positional arguments can be used to specify device names or sys paths. They must start with /dev/ or /sys/ respectively.

### udevadm settle [options]
Watches the udev event queue, and exits if all current events are handled.

-t, --timeout=SECONDS

Maximum number of seconds to wait for the event queue to become empty. The default value is 120 seconds. A value of 0 will check if the queue is empty and always return immediately. A non-zero value will return an exit code of 0 if queue became empty before timeout was reached, non-zero otherwise.

-E, --exit-if-exists=FILE

Stop waiting if file exists.

-h, --help

Print a short help text and exit.

See systemd-udev-settle.service(8) for more information.

### udevadm control option
Modify the internal state of the running udev daemon.

-e, --exit

Signal and wait for systemd-udevd to exit. No option except for --timeout can be specified after this option. Note that systemd-udevd.service contains Restart=always and so as a result, this option restarts systemd-udevd. If you want to stop systemd-udevd.service, please use the following:

```
systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service
```

-l, --log-level=value

Set the internal log level of systemd-udevd. Valid values are the numerical syslog priorities or their textual representations: emerg, alert, crit, err, warning, notice, info, and debug.

-s, --stop-exec-queue

Signal systemd-udevd to stop executing new events. Incoming events will be queued.

-S, --start-exec-queue

Signal systemd-udevd to enable the execution of events.

-R, --reload

Signal systemd-udevd to reload the rules files and other databases like the kernel module index. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events.

-p, --property=KEY=value

Set a global property for all events.

-m, --children-max=value

Set the maximum number of events, systemd-udevd will handle at the same time. When 0 is specified, then the maximum is determined based on the system resources.

--ping

Send a ping message to systemd-udevd and wait for the reply. This may be useful to check that systemd-udevd daemon is running. Added in version 241.

-t, --timeout=seconds

The maximum number of seconds to wait for a reply from systemd-udevd.

--load-credentials

When specified, the following credentials are used when passed in: udev.conf.*

These credentials should contain valid udev.conf(5) configuration data. From each matching credential a separate file is created. Example: a passed credential udev.conf.50-foobar will be copied into a configuration file /run/udev/udev.conf.d/50-foobar.conf. Added in version 256.

udev.rules.*

These credentials should contain valid udev(7) rules. From each matching credential a separate file is created. Example: a passed credential udev.rules.50-foobar will be copied into a configuration file /run/udev/rules.d/50-foobar.rules. Added in version 256.

Note, this does not imply --reload option. So, if systemd-udevd is already running, please consider to also specify -reload to make the copied udev rules files used by systemd-udevd.

Added in version 256.

-h, --help

Print a short help text and exit.

### udevadm monitor [options]
Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event.

-k, --kernel

Print the kernel uevents.

-u, --udev

Print the udev event after the rule processing.

-p, --property

Also print the properties of the event.

-s, --subsystem-match=string[/string]

Filter kernel uevents and udev events by subsystem[/devtype]. Only events with a matching subsystem value will pass. When this option is specified more than once, then each matching result is ORed, that is, all devices in the specified subsystems are monitored.

-t, --tag-match=string

Filter udev events by tag. Only udev events with a given tag attached will pass. When this option is specified more than once, then each matching result is ORed, that is, devices which have one of the specified tags are monitored.

-h, --help

Print a short help text and exit.

### udevadm test [options] [devpath|file|unit]
Simulate a udev event run for the given device, and print debug output.

-a, --action=ACTION

Type of event to be simulated. Possible actions are "add", "remove", "change", "move", "online", "offline", "bind", and "unbind". Also, the special value "help" can be used to list the possible actions. The default value is "add".

-N, --resolve-names=early|late|never

Specify when udevadm should resolve names of users and groups. When set to early (the default), names will be resolved when the rules are parsed. When set to late, names will be resolved for every event. When set to never, names will never be resolved and all devices will be owned by root. Added in version 209.

-h, --help

Print a short help text and exit.

### udevadm test-builtin [options] command [devpath|file|unit]
Run a built-in command COMMAND for device DEVPATH, and print debug output.

-a, --action=ACTION

Type of event to be simulated. Possible actions are "add", "remove", "change", "move", "online", "offline", "bind", and "unbind". Also, the special value "help" can be used to list the possible actions. The default value is "add". Added in version 250.

-h, --help

Print a short help text and exit.

--version

Print a short version string and exit.

### udevadm verify [options] [file] ...
Verify syntactic, semantic, and stylistic correctness of udev rules files.

Positional arguments could be used to specify one or more files to check. If no files are specified, the udev rules are read from the files located in the same udev/rules.d directories that are processed by the udev daemon.

The exit status is 0 if all specified udev rules files are syntactically, semantically, and stylistically correct, and a non-zero error code otherwise.

-N, --resolve-names=early|never

Specify when udevadm should resolve names of users and groups. When set to early (the default), names will be resolved when the rules are parsed. When set to never, names will never be resolved. Added in version 254.

--root=PATH

When looking for udev rules files located in udev/rules.d directories, operate on files underneath the specified root path PATH. Added in version 254.

--no-summary

Do not show summary. Added in version 254.

--no-style

Ignore style issues. When specified, even if style issues are found in udev rules files, the exit status is 0 if no syntactic or semantic errors are found. Added in version 254.

-h, --help

Print a short help text and exit.

### udevadm wait [options] [device|syspath] ...
Wait for devices or device symlinks being created and initialized by systemd-udevd. Each device path must start with "/dev/" or "/sys/", e.g. "/dev/sda", "/dev/disk/by-path/pci-0000:3c:00.0-nvme-1-part1", "/sys/devices/pci0000:00/0000:00:1f.6/net/eth0", or "/sys/class/net/eth0". This can take multiple devices. This may be useful for waiting for devices being processed by systemd-udevd after e.g. partitioning or formatting the devices.

-t, --timeout=SECONDS

Maximum number of seconds to wait for the specified devices or device symlinks being created, initialized, or removed. The default value is "infinity". Added in version 251.

--initialized=BOOL

Check if systemd-udevd initialized devices. Defaults to true. When false, the command only checks if the specified devices exist. Set false to this setting if there is no udev rules for the specified devices, as the devices will never be considered as initialized in that case. See Initialized Devices section below for more details. Added in version 251.

--removed

When specified, the command wait for devices being removed instead of created or initialized. If this is specified, --initialized= will be ignored. Added in version 251.

--settle

When specified, also watches the udev event queue, and wait for all queued events being processed by systemd-udevd. Added in version 251.

-h, --help

Print a short help text and exit.

### udevadm lock [options] [command] ...
udevadm lock takes an (advisory) exclusive lock on a block device (or all specified devices), as per Locking Block Device Access[2] and invokes a program with the locks taken. When the invoked program exits the locks are automatically released and its return value is propagated as exit code of udevadm lock.

This tool is in particular useful to ensure that systemd-udevd.service(8) does not probe a block device while changes are made to it, for example partitions created or file systems formatted. Note that many tools that interface with block devices natively support taking relevant locks, see for example sfdisk(8)'s --lock switch.

The command expects at least one block device specified via --device= or --backing=, and a command line to execute as arguments.

--device=DEVICE, -d DEVICE

Takes a path to a device node of the device to lock. This switch may be used multiple times (and in combination with --backing=) in order to lock multiple devices. If a partition block device node is specified the containing "whole" block device is automatically determined and used for the lock, as per the specification. If multiple devices are specified, they are deduplicated, sorted by the major/minor of their device nodes and then locked in order. This switch must be used at least once, to specify at least one device to lock. (Alternatively, use --backing=, see below.)

Added in version 251.

--backing=PATH, -b PATH

If a path to a device node is specified, identical to --device=. However, this switch alternatively accepts a path to a regular file or directory, in which case the block device of the file system the file/directory resides on is automatically determined and used as if it was specified with --device=. Added in version 251.

--timeout=SECS, -t SECS

Specifies how long to wait at most until all locks can be taken. Takes a value in seconds, or in the usual supported time units, see systemd.time(7). If specified as zero the lock is attempted and if not successful the invocation will immediately fail. If passed as "infinity" (the default) the invocation will wait indefinitely until the lock can be acquired. If the lock cannot be taken in the specified time the specified command will not be executed and the invocation will fail. Added in version 251.

--print, -p

Instead of locking the specified devices and executing a command, just print the device paths that would be locked, and execute no command. This command is useful to determine the "whole" block device in case a partition block device is specified. The devices will be sorted by their device node major number as primary ordering key and the minor number as secondary ordering key (i.e. they are shown in the order they'd be locked). Note that the number of lines printed here can be less than the number of --device= and --backing= switches specified in case these resolve to the same "whole" devices. Added in version 251.

-h, --help

Print a short help text and exit.

## INITIALIZED DEVICES
Initialized devices are those for which at least one udev rule already completed execution – for any action but "remove" — that set a property or other device setting (and thus has an entry in the udev device database). Devices are no longer considered initialized if a "remove" action is seen for them (which removes their entry in the udev device database). Note that devices that have no udev rules are never considered initialized, but might still be announced via the sd-device API (or similar).

## EXAMPLE
Example 1. Format a File System

Take a lock on the backing block device while creating a file system, to ensure that systemd-udevd doesn't probe or announce the new superblock before it is comprehensively written:

```
# udevadm lock --device=/dev/sda1 mkfs.ext4 /dev/sda1
```

Example 2. Format a RAID File System

Similar, but take locks on multiple devices at once:

```
# udevadm lock --device=/dev/sda1 --device=/dev/sdb1 mkfs.btrfs /dev/sda1 /dev/sdb1
```

Example 3. Copy in a File System

Take a lock on the backing block device while copying in a prepared file system image, to ensure that systemd-udevd doesn't probe or announce the new superblock before it is fully written:

```
# udevadm lock -d /dev/sda1 dd if=fs.raw of=/dev/sda1
```

## SEE ALSO
udev(7), systemd-udevd.service(8)

## NOTES
1.

jq

https://jqlang.github.io/jq/manual/

2.

Locking Block Device Access

https://systemd.io/BLOCK_DEVICE_LOCKING


mkudffs

package: udftools

title: mkudffs(8)

summary: create a UDF filesystem

text:
# mkudffs(8)

## NAME
mkudffs — create a UDF filesystem

## SYNOPSIS
mkudffs [ options ] device [ blocks-count ]

## DESCRIPTION
mkudffs is used to create a UDF filesystem on a device (usually a disk). device is the special file corresponding to the device (e.g. /dev/hdX) or file image. blocks-count is the number of blocks on the device. If omitted, mkudffs automagically figures the filesystem size. The order of options matters. Encoding option must be first and options to override default settings implied by the media type or UDF revision should be after the option they are overriding.

## OPTIONS
-h,--help

Display the usage and list of options.

-l,--label= label

Specify the UDF label. UDF label is synonym for specifying both --lvid and --vid options. If omitted, mkudffs label is LinuxUDF. (Option available since mkudffs 1.1)

-u,--uuid= uuid

Specify the UDF uuid. It must be exactly 16 hexadecimal lowercase digits and is used for first 16 characters of --fullvsid option. If omitted, mkudffs uuid is generated from local time and a random number. (Option available since mkudffs 1.1)

-b,--blocksize= block-size

Specify the size of blocks in bytes. Valid block size for a UDF filesystem is power of two in range from 512 to 32768 and must match a device logical (sector) size. If omitted, mkudffs block size is set to device logical block (sector) size. If logical block (sector) size is unknown (e.g. when creating disk image) then for --media-type=hd is used block size 512 and for other media types 2048. (Prior to mkudffs 1.1 default value was always 2048 independently of --media-type)

-m,--media-type= media-type

Specify the media type. Must be specified before --udfrev. Default value is autodetected. When autodetection does not work (e.g. when creating disk image) then hd value is assumed. Valid media types are:

hd

HD (Hard Disk)

worm

WORM (Write Once Read Many)

mo

MO (Magneto Optical)

cd

CD-ROM (CD Read-Only Memory)

cdr

CD-R (CD Recordable)

cdrw

CD-RW (CD Read-Write)

dvd

DVD-ROM (DVD Read-Only Memory)

dvdr

DVD-R (DVD Recordable)

dvdrw

DVD-RW (DVD Read-Write)

dvdram

DVD-RAM (DVD Random Access Memory)

bdr

BD-R (Blu-ray Disc Recordable)

(Short option variant -m and values cd, dvdr, bdr are available since mkudffs 2.0 and autodetection is supported since mkudffs 2.2)

-r,--udfrev= udf-revision

Specify the UDF revision to use, either in hexadecimal BCD (e.g. 0x0201) or decimal (e.g. 2.01) format. Valid revisions are 1.01, 1.02, 1.50, 2.00, 2.01, 2.50 and 2.60. If omitted, mkudffs UDF revision is 2.01, except for Blu-ray Discs which is 2.50. UDF revisions higher then 2.01 are experimental. Option must be specified after --media-type. (Values in decimal format and UDF revisions higher then 2.01 are supported since mkudffs 2.0, UDF revision 1.01 is supported since mkudffs 2.1)

-n,--no-write

Not really, do not write to device. Just simulate and display what would happen with device. Useful for determining the calculated location of different UDF blocks. (Option available since mkudffs 2.0)

--new-file

Create a new image file specified by device with blocks-count and fail if file already exists. If omitted, mkudffs creates a new image file only in case it does not exist yet. (Option available since mkudffs 2.0)

--lvid= logical-volume-identifier

Specify the Logical Volume Identifier. If omitted, mkudffs Logical Volume Identifier is LinuxUDF. Most UDF implementations use this identifier as a disk label.

--vid= volume-identifier

Specify the Volume Identifier. If omitted, mkudffs Volume Identifier is LinuxUDF.

--vsid= volume-set-identifier

Specify the 17.–127. character of Volume Set Identifier. If omitted, mkudffs Volume Set Identifier is LinuxUDF.

--fsid= file-set-identifier

Specify the File Set Identifier. If omitted, mkudffs File Set Identifier is LinuxUDF.

--fullvsid= full-volume-set-identifier

Specify the full Volume Set Identifier. Overwrite previous --uuid and --vsid options. (Option available since mkudffs 1.1)

--owner= owner-name

Specify the Owner name, person creating the medium or filesystem. It is stored in UDF Logical Volume Info1, part of UDF Implementation Use Volume Descriptor. (Option available since mkudffs 2.3)

--organization= organization-name

Specify the Organization name responsible for creating the medium or filesystem. It is stored in UDF Logical Volume Info2, part of UDF Implementation Use Volume Descriptor. (Option available since mkudffs 2.3)

--contact= contact-information

Specify the Contact information for the medium or filesystem. It is stored in UDF Logical Volume Info3, part of UDF Implementation Use Volume Descriptor. (Option available since mkudffs 2.3)

--uid= uid

Specify the uid of the root (/) directory. If omitted, mkudffs uid is 0. Special value -1 means invalid or not specified uid. (Option available since mkudffs 1.1)

--gid= gid

Specify the gid of the root (/) directory. If omitted, mkudffs gid is 0. Special value -1 means invalid or not specified gid. (Option available since mkudffs 1.1)

--mode= mode

Specify permissions in octal mode bits of the root (/) directory. If omitted, mkudffs mode is 0755. (Option available since mkudffs 2.0)

--read-only

This option specify that the whole UDF disk should be treated as read-only. It sets SoftWriteProtect domain flag in Logical Volume Descriptor and in File Set Descriptor. Plus for overwritable media types (hd, dvdram, dvdrw) set UDF Access Type to read-only. (Option available since mkudffs 2.2)

--bootarea= fill

Specify how to fill UDF boot area which is the first 32kB of the disk and is not used by UDF itself. Option mbr make sense only when running mkudffs on whole disk, not on just one partition. Valid options are:

preserve

preserve existing UDF boot area, do not touch it (default for media type different from hd)

erase

erase existing UDF boot area, fill it by zeros (default for hd media type on partitions and on removable disks)

mbr

put MBR table with one partition which starts at sector 0 (includes MBR itself) and spans whole disk device, needed only for non-removable hard disks used on Microsoft Windows systems (default for hd media type on non-removable hard disk without partitions), see section WHOLE DISK VS PARTITION

mbr:sec-size

same as mbr but explicitly set MBR sector size to sec-size value, default sec-size is device logical block (sector) size with fallback to size 512 bytes

(Option available since mkudffs 2.0)

--strategy= strategy

Specify the allocation strategy to use. Valid strategies are 4 and 4096. If omitted, mkudffs strategy is based on the --media-type.

--spartable, --spartable= spartable-number

Enable usage Sparing Table. Optionally specify also the number of sparing tables. Valid numbers are 1–4. When the spartable number is omitted then two tables are written to the disc. If the option is omitted then usage of Sparing Table depends on the media type. (Option prior to mkudffs 2.0 was available only for cdrw media type)

--sparspace= num-of-entires

Specify the number of entries in Sparing Table. If omitted, the default number of entries is 1024, but depends on the media type. (Option available since mkudffs 2.0)

--packetlen= length

Packet length in a number of blocks used for alignment. All continuous UDF structures would be aligned to packets. It specifies also the size of the Sparing Space and packet length in Sparing Table. It should match the device ECC/packet length. If omitted, default value for DVD discs is 16 blocks, for CD/BD discs it is 32 blocks and otherwise 1 block. (Option prior to mkudffs 2.1 was available only for cdrw and dvdrw media types)

--vat

Enable usage of Virtual Allocation Table (VAT). If omitted, usage depends on the media type. (Option available since mkudffs 2.0)

--startblock= start-block

Specify the block location where the UDF filesystem starts. Normally start block is 0, but when creating second or higher session for Multisession UDF optical disc it is the block location where that new session starts.

When updating existing Multisession UDF image file, mkudffs overwrites only data blocks for a new session at start block position in the image file.

When creating a new UDF image file, mkudffs stores only data blocks for a new session at beginning of the image file. Therefore data for start block would be written to the zero block instead of the start block. Such image without leading blocks (where are located previous sessions) is suitable for burning a new session to the optical disc. But it cannot be read or detected by any UDF tool until leading zero blocks (or previous sessions) are prepended to the image file.

For calculating position where a new session of particular optical disc should start is required to use software which would be used for burning newly created image. So for example, if for burning is used wodim(1) then second value on output from wodim -msinfo call is start block. Accordingly for cdrecord(1) call cdrecord -msinfo or for cdrdao(1) call cdrdao msinfo or for xorriso(1) call xorriso -as cdrecord dev=/dev/cdrw -msinfo.

(Option available since mkudffs 2.3)

--minblocks= min-num-of-blocks

Specify minimal number of blocks to write on disc with Virtual Allocation Table. This option affects block position where is written Virtual Allocation Table. And in case option --closed is used then also it affects block position of the second Anchor Volume Descriptor Pointer.

Default value for cdr media type is 300. This is safe default to allow burning CD-R disc image in Track-at-Once mode. This mode requires to burn image with minimal size of 300 sectors. Burning CD-R discs in other modes (e.g. Disc-at-Once or Packet-Writing) may allow to allow to use also smaller disc images.

For all other media types there is no default minimal limit.

(Option available since mkudffs 2.3)

--closed

Close disc with Virtual Allocation Table. AVDP is written also to the end of the disc. By default, the disc with Virtual Allocation Table is not closed.

--space= space

Specify the Space Set. Unallocated Space Set is used for media which blocks may be allocated immediately. Freed Space Set is used for media which blocks needs to be specially prepared/erased before allocation. In Space Table is stored list of unallocated extents. In Space Bitmap is stored bitmap of unallocated blocks. Not used for VAT.

freedbitmap

Freed Bitmap

freedtable

Freed Table

unallocbitmap

Unallocated Bitmap (default)

unalloctable

Unallocated Table

--ad= ad

Specify the Allocation Descriptors of the root (/) directory.

inicb

Allocation Descriptors in ICB (default)

short

Short Allocation Descriptors

long

Long Allocation Descriptors

--noefe

Don't Use Extended File Entries for the root (/) directory. Affects only UDF 2.00 or higher. Must be specified after --udfrev.

--locale

Treat identifier string options as strings encoded according to the current locale settings (default). Must be specified as the first argument. (Option available since mkudffs 2.0)

--u8

Treat identifier string options as strings encoded in 8-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent to Latin1 (ISO-8859-1). Must be specified as first argument.

--u16

Treat identifier string options as strings encoded in 16-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent to UTF-16BE. Note that it is not possible to include zero byte in command line options, therefore any character which has at least one zero byte cannot be supplied (this applies to all Latin1 characters). Must be specified as the first argument.

--utf8

Treat identifier string options as strings encoded in UTF-8. Must be specified as the first argument. (Prior to mkudffs 2.0 this was default option)

## COMPATIBILITY

### OPERATING SYSTEMS SUPPORT
UDF filesystem is natively supported by large amount of operating systems. See following compatibility table:

Operating system

Maximum UDF revision for

Name

Version

read

write

Linux

2.3.17 – 2.4.5

2.00

2.00

2.4.6 – 2.6.25

2.01

2.01

2.6.26 (and new)

2.50

2.01

Windows

98/Me

1.02

none

2000

1.50

none

XP

2.01

none

Vista (and new)

2.60

2.50

Mac OS

8.1 – 8.5

1.02

none

8.6 – 9.2

1.50

1.50

Mac OS X

10.0 – 10.3

1.50

1.50

10.4

2.01

2.01

10.5 (and new)

2.60

2.50

FreeBSD

5 (and new)

1.50

none

NetBSD

4.0

2.60

none

5.0 (and new)

2.60

2.60

OpenBSD

3.8 – 3.9

1.02

none

4.0 – 4.6

1.50

4.7 (and new)

2.60

Solaris

7 (and new)

1.50

1.50

AIX

5.2 (and new)

2.01

2.01

Note that Windows 98 and Windows Me can read UDF filesystem only from CD and DVD optical discs, not from hard disks.

### BLOCK SIZE
In most cases, operating systems are unable to mount UDF filesystem if UDF block size differs from logical sector size of the device. Typically hard disks have sector size 512 bytes and optical media 2048 bytes. Therefore UDF block size must match the logical sector size of the device.

Linux kernel prior to version 2.6.30 used hardcoded UDF block size of 2048 bytes independently of logical sector size, therefore it was not able to automatically mount UDF filesystem if block size differed from 2048. Since 2.6.30 and prior to 4.11 Linux kernel used a logical sector size of the device as UDF block size, plus it tried fallback to 2048. Since 4.11 it uses logical sector size and fallbacks to any valid block size between logical sector size and 4096. Therefore since version 2.6.30 Linux kernel can automatically mount UDF filesystems correctly if UDF block size matches device logical sector size and since version 4.11 can automatically also mount devices which sector size does not match UDF block size. In any case and also for Linux kernel prior to version 2.6.30, different UDF block size (which is not autodetected) can be manually specified via bs=blocksize mount parameter.

### WHOLE DISK VS PARTITION
UDF filesystem is supposed to be formatted on the whole media and not to the partitioned hard disk. Mac OS X systems enforce this rule and reject to automatically mount UDF filesystem unless it is formatted on the whole unpartitioned hard disk. Possible partition table (e.g. MBR or GPT) on disk with valid UDF filesystem is ignored. On the other hand, Microsoft Windows systems are unable to detect non-removable hard disks without MBR or GPT partition table. Removable disks do not have this restriction. A consequence is that non-removable hard disks formatted to UDF by Windows Vista+ are not recognized by Mac OS X systems and vice-versa. Note that manual mount of UDF partition on partitioned hard disk on Mac OS X system is possible and working (e.g. by running commands: mkdir /Volumes/DriveName && mount_udf /dev/disk1s1 /Volumes/DriveName). But there is no known way to mount an unpartitioned non-removable disk on Windows system.

Thanks to reserved and unused UDF boot area (first 32kB of UDF filesystem) it is possible to deal with this problem, by putting MBR on such non-removable hard disk just for compatibility reasons with Windows. Such MBR table would contain one partition which starts at sector 0 (includes MBR itself) and spans whole disk device. So the whole disk device and also the first partition on disk points to same sectors. Therefore UDF filesystem can be mounted either from whole disk device (needed for Mac OS X systems) or from first partition (needed for Microsoft Windows systems).

Linux kernel ignores MBR table if contains partition which starts at sector 0. Normally Linux kernel can detect and mount UDF filesystem either on a partition or on whole disk device. It does not have any restrictions.

mkudffs option --bootarea=mbr put such MBR table for compatibility with Microsoft Windows systems into disk when formatting.

### LINUX LABEL BUGS
In most cases Logical Volume Identifier is used as UDF label. But Linux libblkid prior to version 2.26 used Volume Identifier. Therefore mkudffs --label for compatibility reasons set both Logical Volume Identifier and Volume Identifier.

Linux libblkid prior to version 2.30 incorrectly processed non-ASCII identifier strings encoded in 8-bit OSTA Compressed Unicode format. Therefore mkudffs since version 2.0 for compatibility reasons tries to encode a non-ASCII identifier strings in 16-bit OSTA Compressed Unicode format and then fallbacks to 8-bit format.

For more information about UDF Label and UUID see udflabel(8) section UDF LABEL AND UUID.

## EXIT STATUS
mkudffs returns 0 if successful, non-zero if there are problems.

## LIMITATIONS
mkudffs cannot create UDF 2.50 Metadata partition, therefore it does not support UDF revisions higher than 2.01 for non Write Once media yet. So there is no support for Blu-ray discs which needs UDF 2.50 (except for Blu-ray Disc Recordable which does not require Metadata partition).

mkudffs prior to version 2.2 was unable to process Unicode strings with code points above U+FFFF. When option --utf8 was specified then input strings were limited to 3-byte UTF-8 sequences and when option --u16 was specified then input strings were limited just to UCS-2BE strings (subset of UTF-16BE).

## BUGS
mkudffs prior to version 1.1 was unable to process non-ASCII characters from identifier strings in --utf8 mode, --vsid option was completely broken and --blocksize must have been manually specified for hard disks as default value was hardcoded for optical disks. mkudffs prior to version 2.0 generated broken and unreadable cdr disc images.

## AUTHOR

```
Ben Fennema
Pali Rohár <pali.rohar@gmail.com>
```

## AVAILABILITY
mkudffs is part of the udftools package and is available from https://github.com/pali/udftools/.

## SEE ALSO
pktsetup(8), udflabel(8), cdrwtool(1), udfinfo(1), wrudf(1)


pktsetup

title: pktsetup(8)

text:
# pktsetup(8)

## NAME
pktsetup - set up and tear down packet device associations

## SYNOPSIS
pktsetup packet_device block_device

pktsetup -d packet_device

pktsetup -s

## DESCRIPTION
Pktsetup is used to associate packet devices with CD or DVD block devices, so that the packet device can then be mounted and potentially used as a read/write filesystem. This requires kernel support for the packet device, and the UDF filesystem.

See: HOWTO.udf (in the udftools documents directory)

## EXIT STATUS
Pktsetup returns 0 on success, nonzero on failure.

## OPTIONS
-d packet-device

Delete the association between the specified packet-device and its block device.

-s

Show the current device mapping, one device per line, in the format

name : pktdevid -> blkdevid

(e.g. "0 : 253:0 -> 22:0")

## EXAMPLE
The following commands provide an example of using the packet device.

```
cdrwtool -d /dev/sr0 -q
pktsetup 0 /dev/sr0
mount -t udf /dev/pktcdvd0 /mnt

 ...
umount /dev/pktcdvd0
pktsetup -d 0
```

## FILES

```
/dev/pktcdvd0,/dev/pktcdvd1,...  CD/DVD packet devices
```

## AUTHOR

```
Jens Axboe <axboe@suse.de>
Some additions by Richard Atterer <atterer@debian.org>
```

## AVAILABILITY
pktsetup is part of the udftools package and is available from https://github.com/pali/udftools/.

## SEE ALSO
cdrwtool(1)


udflabel

title: udflabel(8)

summary: show or change UDF filesystem label

text:
# udflabel(8)

## NAME
udflabel — show or change UDF filesystem label

## SYNOPSIS
udflabel [encoding-options] [block-options] [identifier-options] device [new-label]

## DESCRIPTION
When udflabel is invoked without identifier-options and without specifying new-label then it shows current label of UDF filesystem on device to standard output terminated by new line. Otherwise it updates UDF filesystem (up to the revision 2.60) on device with new specified identifiers from identifier-options. Specifying new-label is synonym for both --lvid and --vid, see section UDF LABEL AND UUID.

## OPTIONS

### GENERAL OPTIONS
-h,--help

Display the usage and the list of options.

### BLOCK OPTIONS
-b,--blocksize= block-size

Specify the size of blocks in bytes. Valid block size for a UDF filesystem is a power of two in the range from 512 to 32768 and must match a device logical (sector) size. If omitted, udflabel tries to autodetect block size. First it tries logical (sector) size and then all valid block sizes.

--startblock= start-block

Specify the block location where the UDF filesystem starts. It is used for calculating the block location of the Volume Recognition Sequence (32 kB after the start block) and the first Anchor Volume Descriptor Pointer (256 blocks after the start block). Normally start block is 0, but for Multisession UDF optical discs it is the block location where the last session of Multisession UDF disc starts.

If omitted, udflabel for optical disc tries to detect start block of the last session from disc Table Of Contents. Otherwise value 0 is used.

For accessing some previous session of Multisession UDF optical disc, it is required to specify correct block where that previous session starts. And also to specify where that session ends via --lastblock option.

For Multisession UDF disc images stored in file there is no way to detect where the last session starts and therefore it is necessary to specify the correct start block location manually from the original optical disc Table Of Contents.

(Option available since udflabel 2.3)

--lastblock= last-block

Specify the block location where the UDF filesystem ends. It is used for calculating the block location of second and third Anchor Volume Descriptor Pointer (256 blocks prior the last block and the last block itself). Normally last block is number of disk blocks minus one, but for Multisession UDF optical discs when reading different session than the last one (specified by --startblock) it is the block location where the specified session ends.

If omitted, udflabel for optical disc tried to detect the last recorded block with fallback to the last block of device or disk file image.

For accessing some previous session of Multisession UDF optical disc, it is required to specify correct value for both --startblock and --lastblock options.

(Option available since udflabel 2.3)

--vatblock= vat-block

Specify the block location of the Virtual Allocation Table. Virtual Allocation Table is present only on UDF disks with Virtual Partition Map and must be at the last written/recorded disk block. If omitted, udflabel for optical disc tries to detect the last recorded block with fallback to the last block of block device or disk file image or block specified by --lastblock. In most cases, this fallback does not have to work and for disk file images with Virtual Allocation Table it is necessary to specify the correct location.

Virtual Allocation Table contains Logical Volume Identifier (UDF Label).

--force

Force updating UDF disks without write support or write protected UDF disks. Some UDF disks may have set write protect flag. Some media, like CD-ROM, DVD-ROM or BD-ROM are read-only. Other media, like CD-RW or DVD-RW, are write-once. UDF is designed also for such media where updating Label or Identifiers is not possible. But in some rare cases, it could make sense to try and overwrite the existing Label or Identifiers also for UDF filesystem which has Access Type either Read-Only or Recordable (Write-Once). This is possible only if underlying media supports overwriting. E.g. UDF image of CD-ROM stored on hard disk or Read-Only UDF image burned to DVD-RAM or BD-RE discs. Option --force ignores UDF Access Type and treats it as Overwritable. Also it ignores UDF SoftWriteProtect and HardWriteProtected flags.

-n,--no-write

Not really, do not write to device. Just simulate and display what would happen with device. Useful for determining which UDF blocks would be overwritten.

### IDENTIFIER OPTIONS
-u,--uuid= uuid

Specify the UDF uuid. Must be exactly 16 hexadecimal lowercase digits and is used for first 16 characters of --fullvsid option. Special value random generates new uuid from local time and a random number. See section UDF LABEL AND UUID.

--lvid= new-logical-volume-identifier

Specify the new Logical Volume Identifier.

--vid= new-volume-identifier

Specify the new Volume Identifier.

--vsid= new-volume-set-identifier

Specify the new 17.–127. character of Volume Set Identifier. See section UDF LABEL AND UUID.

--fsid= new-file-set-identifier

Specify the new File Set Identifier.

--fullvsid= new-full-volume-set-identifier

Specify the new Volume Set identifier. Overwrite previous --uuid and --vsid options. See section UDF LABEL AND UUID.

--owner= new-owner-name

Specify the new Owner name, person who created the medium or filesystem. It is stored in UDF Logical Volume Info1, part of UDF Implementation Use Volume Descriptor. (Option available since udflabel 2.3)

--organization= new-organization-name

Specify the new Organization name responsible for creating the medium or filesystem. It is stored in UDF Logical Volume Info2, part of UDF Implementation Use Volume Descriptor. (Option available since udflabel 2.3)

--contact= new-contact-information

Specify the new Contact information for the medium or filesystem. It is stored in UDF Logical Volume Info3, part of UDF Implementation Use Volume Descriptor. (Option available since udflabel 2.3)

--appid= new-application-identifier

Specify the new Application Identifier which identifies application that created medium or filesystem. It is stored in UDF Primary Volume Descriptor. This identifier can be empty or must start with * and contain only 7bit ASCII characters. (Option available since udflabel 2.3)

--impid= new-developer-identifier

Specify the new Developer Identifier for Implementation Identifier. It is unique identification of the implementation which created medium or filesystem. It is stored in UDF Primary Volume Descriptor. This identifier must start with * and contain only 7bit ASCII characters. (Option available since udflabel 2.3)

### ENCODING OPTIONS
--locale

Treat identifier string options as strings encoded according to current locale settings (default). Must be specified as the first argument.

--u8

Treat identifier string options as strings encoded in 8-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent to Latin1 (ISO-8859-1). Must be specified as first argument.

--u16

Treat identifier string options as strings encoded in 16-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent to UTF-16BE. Note that it is not possible to include zero byte in command line options, therefore any character which has at least one zero byte cannot be supplied (this applies to all Latin1 characters). Must be specified as the first argument.

--utf8

Treat identifier string options as strings encoded in UTF-8. Must be specified as the first argument.

## UDF LABEL AND UUID
UDF specification does not say anything about a disk label but it describes that UDF Logical Volume Identifier is an extremely important field for media identification in a jukebox as that field is displayed to the user. And based on this statement it is a common practice for the majority of UDF implementations to use UDF Logical Volume Identifier as a UDF disk label.

UDF specification does not have a concept of disk UUID like other filesystems. But mandates that the first 16 characters of UDF Volume Set Identifier are unique, a non-fixed and a non-trivial value. Plus first eight characters are hexadecimal digits. Windows application format.exe and Mac OS X application newfs_udf are known to violates this requirement and set only the first 8 characters as unique (others are fixed). Since, there are still a lot of UDF implementations which use in the first 16 characters only hexadecimal digits and all compliant UDF implementations have hexadecimal digits in the first 8 characters, the following algorithm for generating stable UUID was informally chosen and now is used by udftools, util-linux, grub2 and other projects:

0. If Volume Set Identifier has less then 8 characters then stop with empty UUID

1. Take the first 16 bytes from UTF-8 encoded string of Volume Set Identifier

2. If all bytes are hexadecimal digits then use their lowercase form as UUID

3. If first 8 bytes are not all hexadecimal digits then convert those 8 bytes to their hexadecimal representation (resulting in 16 bytes) and use as UUID

4. Otherwise, compose UUID from two 8 byte parts: 1. part: Use the lowercase form of the first 8 bytes (which are hexadecimal digits)

2. part: Convert next 4 bytes (9.–12. pos.) to their hexadecimal representation

Which means that this generated UUID has always 16 hexadecimal lowercase digits. In most cases, this UUID matches case-insensitively the first 16 characters of UDF Volume Set Identifier and for all disks compliant to the UDF specification the first 8 bytes of UUID matches case-insensitively the first 8 characters of UDF Volume Set Identifier. In that algorithm was chosen UTF-8 encoding because it is the only commonly used Unicode transformation to bytes with fixed points in all hexadecimal digits.

## EXIT STATUS
udflabel returns 0 if successful, non-zero if there are problems like block device does not contain UDF filesystem or updating failed.

## LIMITATIONS
udflabel is not able to set new Label, Logical Volume Identifier and File Set Identifier for disks with Virtual Allocation Table (used by Write Once media).

udflabel prior to version 2.3 was unable to handle Multisession UDF discs correctly. It always accessed only the first session (the oldest one) and not the last session (the most recent).

udflabel prior to version 2.2 was unable to print and process Unicode strings with code points above U+FFFF correctly. When option --utf8 was specified then input strings were limited to 3-byte UTF-8 sequences and when option --u16 was specified then input strings were limited just to UCS-2BE strings (subset of UTF-16BE).

udflabel prior to version 2.2 ignored UDF SoftWriteProtect and HardWriteProtected flags and overwritten such disks without any notice.

udflabel prior to version 2.2 was not able to set a new Label, Logical Volume Identifier and File Set Identifier for disks with Metadata Partition (used by UDF revisions higher then 2.01).

udflabel prior to version 2.1 was not able to read Label correctly if the disk had Virtual Allocation Table stored outside of Information Control Block.

## AUTHOR

```
Pali Rohár <pali.rohar@gmail.com>
```

## AVAILABILITY
udflabel is part of the udftools package since version 2.0 and is available from https://github.com/pali/udftools/.

## SEE ALSO
mkudffs(8), pktsetup(8), cdrwtool(1), udfinfo(1), wrudf(1)


udisks

title: udisks(8)

summary: Disk Manager

text:
# udisks(8)

## NAME
udisks - Disk Manager

## DESCRIPTION
udisks provides interfaces to enumerate and perform operations on disks and storage devices. Any application (including unprivileged ones) can access the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system message bus[1]. In addition to the D-Bus API, a library, libudisks2 is also provided. This library can be used from C/C++ and any high-level language with GObjectIntrospection[2] support such as Javascript and Python. udisks is only indirectly involved in what devices and objects are shown in the user interface.

## ACCESS CONTROL
By default, logged-in users in active log-in sessions are permitted to perform operations (for example, mounting, unlocking or modifying) on devices attached to the seat their session is on. Access-control is fine-grained and based on polkit(8), see the “Authorization Checks” chapter in the udisks documentation for more information. Note that the x-udisks-auth option can be used in the /etc/fstab and /etc/crypttab files to specify that additional authorization is required to mount resp. unlock the device (typically requiring the user to authenticate as an administrator).

## DRIVE CONFIGURATION
At start-up and when a drive is connected, udisksd(8) will apply configuration stored in the file /etc/udisks2/IDENTIFIER.conf where IDENTIFIER is the value of the Drive:Id property for the drive. If the file changes on disk its new contents will also be applied to the drive. Typically, users or administrators will never need to edit drive configuration files as they are effectively managed through graphical applications such as gnome-disks(1). Manually editing configuration files is however supported — the file format is a simple .ini-like format (see the Desktop Entry Specification[3] for the exact syntax). New groups and keys may be added in the future.

### ATA group
The ATA group is for settings that apply to drives using the ATA command-set. The following keys are supported:

StandbyTimeout

The standby timeout. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values. This is similar to the -S option in hdparm(8).

APMLevel

The Advanced Power Management level. A low value means aggressive power management and a high value means better performance. Possible settings range from values 1 through 127 (which permit spin-down), and values 128 through 254 (which do not permit spin-down). The highest degree of power management is attained with a setting of 1, and the highest I/O performance with a setting of 254. A value of 255 can be used to disable Advanced Power Management altogether on the drive (not all drives support disabling it, but most do). This is similar to the -B option in hdparm(8).

AAMLevel

The Automatic Acoustic Management level. Most modern harddisk drives have the ability to speed down the head movements to reduce their noise output. The possible values are between 0 and 254. 128 is the most quiet (and therefore slowest) setting and 254 the fastest (and loudest). Some drives have only two levels (quiet / fast), while others may have different levels between 128 and 254. At the moment, most drives only support 3 options, off, quiet, and fast. These have been assigned the values 0, 128, and 254 at present, respectively, but integer space has been incorporated for future expansion, should this change. This is similar to the -M option in hdparm(8).

WriteCacheEnabled

A boolean specifying whether to enable or disable the Write Cache. Valid values for this key are “true” and “false”. This is similar to the -W option in hdparm(8). This key was added in 2.1.

ReadLookaheadEnabled

A boolean specifying whether to enable or disable the Read Look-ahead. Valid values for this key are “true” and “false”. This is similar to the -A option in hdparm(8). This key was added in 2.6.0.

## DEVICE INFORMATION
udisks relies on recent versions of udev(7) and the Linux kernel. Influential device properties in the udev database include:

UDISKS_SYSTEM

If set, this overrides the value of the HintSystem property.

UDISKS_IGNORE

If set, this overrides the value of the HintIgnore property.

UDISKS_AUTO

If set, this overrides the value of the HintAuto property.

UDISKS_CAN_POWER_OFF

If set, this overrides the value of the CanPowerOff property.

UDISKS_NAME

The name to use for the device when presenting it in an user interface. This corresponds to the HintName property.

UDISKS_ICON_NAME

The icon to use for the device when presenting it in an user interface. If set, the name must adhere to the freedesktop.org icon theme specification[4]. This corresponds to the HintIconName property.

UDISKS_SYMBOLIC_ICON_NAME

The icon to use for the device when presenting it in an user interface using a symbolic icon. If set, the name must adhere to the freedesktop.org icon theme specification[4]. This corresponds to the HintSymbolicIconName property.

UDISKS_FILESYSTEM_SHARED

If set to 1, the filesystem on the device will be mounted in a shared directory (e.g. /media/VolumeName) instead of a private directory (e.g. /run/media/$USER/VolumeName) when the Filesystem.Mount() method is handled.

ID_SEAT

The physical seat the device is attached to. If unset or set to the empty string, “seat0” (the first seat) is assumed.

ID_ATA_SMART_ACCESS

Override the access method for SMART data retrieval. Valid values include: sat16, sat12, linux-ide, sunplus, jmicron, none and auto (default). Specify none to avoid any I/O, in such a case the SmartUpdated property will always equal to “0”.

## API STABILITY
udisks guarantees a stable D-Bus API within the same major version and this guarantee also extends to the client-side library libudisks2. Additionally, several major versions of udisks can be installed and operate at the same time although interoperability may be limited - for example, a device mounted using the udisks N.x API may require additional authorization if attempting to unmount it through the the (N-1).x API.

The udisks developers do not anticipate breaking API but does reserve the right to do so and if it happens, promises to bump the major version and ensure the new major version of udisks is parallel-installable with any older major version. However, note that programs, man pages and other artifacts may change name (for example, adopt a “2” suffix) to make room for the next major version. Therefore, applications can not rely on tools like e.g. udisksctl(1) to be available. Additionally, there is no guarantee that the options, command-line switches etc. of command-line tools or similar will remain stable.

Instead, applications should only use the D-Bus API, the libudisks2 library or tools such as dbus-send(1) or gdbus(1) to interact with udisksd(8).

## AUDIENCE
The intended audience of udisks include operating system developers working on the higher-level parts of the operating system, for example the desktop shell (such as GNOME[5]) and disk management applications (e.g. GNOME's Disks[6] application). Software on this level typically depend on a specific (major) version of udisks and may even have support for previous versions of udisks or alternative interfaces performing the same role as udisks.

While udisks indeed provides a stable API and a clear upgrade path, it may not be an appropriate dependency for third party applications. For example, if the operating system switches to udisks version N.x and an application is still using the udisks (N-1).x API, the application will not work unless udisks (N-1).x is installed. While this situation is still workable (since both udisks N.x and udisks (N-1).x can be installed) it may not be desirable to ask the user to install the old version - in fact, the operating system vendor may not even provide a packaged version of the old version. Hence, if an application does not want to tie itself to a specific version of the operating system, it should not use udisks.

Viable alternatives to udisks are APIs that are guaranteed to be around for longer time-frames, including:

•Low-level APIs and commands such as e.g. sysfs[7], libudev[8], /proc/self/mountinfo[9] and util-linux[10].

•High-level APIs such as GVolumeMonitor[11].

In particular, for desktop applications it is a much better idea to use something like GVolumeMonitor since it will make the application show the same devices as the desktop shell (e.g. file manager, file chooser and so on) is showing.

## AUTHOR
This man page was originally written for UDisks2 by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others.

## BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://github.com/storaged-project/udisks/issues.

## SEE ALSO
udev(7), polkit(8), udisksd(8), udisksctl(1), umount.udisks2(8), gnome-disks(1)

## NOTES
1.

system message bus

http://www.freedesktop.org/wiki/Software/dbus

2.

GObjectIntrospection

https://live.gnome.org/GObjectIntrospection

3.

Desktop Entry Specification

http://freedesktop.org/wiki/Specifications/desktop-entry-spec

4.

freedesktop.org icon theme specification

http://www.freedesktop.org/wiki/Specifications/icon-theme-spec

5.

GNOME

http://www.gnome.org

6.

Disks

https://live.gnome.org/Design/Apps/Disks

7.

sysfs

http://en.wikipedia.org/wiki/Sysfs

8.

libudev

https://www.freedesktop.org/software/systemd/man/libudev.html

9.

/proc/self/mountinfo

http://www.kernel.org/doc/Documentation/filesystems/proc.txt

10.

util-linux

http://en.wikipedia.org/wiki/Util-linux

11.

GVolumeMonitor

http://developer.gnome.org/gio/stable/volume_mon.html


udisksd

title: udisksd(8)

summary: The udisks system daemon

text:
# udisksd(8)

## NAME
udisksd - The udisks system daemon

## SYNOPSIS
udisksd [--help] [--replace] [--debug] [--no-sigint] [--force-load-modules]

## DESCRIPTION
The udisksd program provides the org.freedesktop.UDisks2 name on the system message bus. Users or administrators should never need to start this daemon as it will be automatically started by dbus-daemon(1) or systemd(1) whenever an application tries to access its D-Bus interfaces.

See the udisks(8) man page for more information.

## OPTIONS
--help

Show help options.

--replace

Replace existing daemon.

--debug

Print debug or informational messages on stdout/stderr.

--no-sigint

Do not handle SIGINT for controlled shutdown.

--force-load-modules

Activate modules on startup

## AUTHOR
This man page was originally written for UDisks2 by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others.

## BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://github.com/storaged-project/udisks/issues.

## SEE ALSO
udisks(8), udisksctl(1), umount.udisks2(8), polkit(8), dbus-daemon(1), systemd(1)


title: umount.udisks2(8)

text:
# umount.udisks2(8)

## NAME
umount.udisks2 - unmount file systems that have been mounted by UDisks2

## DESCRIPTION
The umount.udisks2 program is a helper for the umount(8) program. Its purpose is to clean up automatically created directories created at file system mount-time. It should never be called directly.

## AUTHOR
This man page was originally written for UDisks2 by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others.

## BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://github.com/storaged-project/udisks/issues.

## SEE ALSO
udisks(8), udisksd(8), udisksctl(1), umount(8),