lmadm


Performs linked filesystem administration.

Synopsis

lmadm -acdmtuvyz dev_name unit offset mount_dir

Description

Performs administrative tasks on a Linked Memory filesystems. lmadm is designed to perform a variety of tasks. It checks and repairs (-c), defragments (-d), mounts (-m),unmounts (-u), and auto-maintains (-a) the filesystem.

Options

-a
Auto-maintains the filesystem: Unmounts the filesystem, checks/repairs, defragments, and remounts the filesystem. In case of a failure in the consistency check/repair or defragmentation process, the filesystem is formatted. This option is used mainly at system startup. This option is mutually exclusive with all other options except for -v and -y. This option implies -y.
-c
Consistency check and repair. Consistency check is performed in multiple passes and all repairs are reported. This option is mutually exclusive with -a, -m, and -u.
-d
Defragments the filesystem. As a result of adding and deleting files, filesystems become fragmented and free extents become scattered. The defragmentation process gathers all scattered free extents and combines them into a single contiguous extent. This process not only improves system performance, but it also enables the filesystem to succeed in allocating storage for larger files. This option is mutually exclusive with -a, -m, and -u.
-m
Mounts the filesystem. It only mounts the filesystem on the specified device, if the filesystem is not already mounted. This option is mutually exclusive with all other options except -v and -y.
-t
Displays output on the TV monitor as well.
-u
Unmounts the filesystem. It only unmounts the filesystem, if the filesystem is mounted. This option is mutually exclusive with all other options except -v and -y.
-v
Signifies verbose.
-y
Performs all major/minor repairs needed to bring the filesystem to a consistent state.
-z
Removes all zero-sized files. This is performed during the defragmentation process, therefore it is to be used in conjunction with the -a or -d options.

Arguments

dev_name
Name of the device on which the filesystem resides.
unit
Device unit number.
offset
Offset within the device where the filesystem resides.
mount_dir
Name of the directory on which the filesystem is mounted.

Examples

The following line maintains the nvram filesystem for operation, this is mainly invoked at system startup:

$boot/system/Programs/lmadm -a ram 3 0 nvram

The following line performs consistency check and an automatic repair:

$c/lmadm -cy ram 3 0 nvram 

The following line verbosely performs a defragmentation process on the nvram filesystem:

$c/lmadm -dv ram 3 0 nvram 

The following line mounts the nvram filesystem

$c/lmadm -m ram 3 0 nvram

Caveats

Don't run the defragmentation process unless you have a clean filesystem.

Always check/repair the filesystem first, before the defragmentation process is started. If you use both -d and -c, the filesystem is first checked and repaired and then defragmented. The result of defragmenting a corrupted filesystem is unpredictable. If you use -a, and the check/repair process fails, the filesystem is automatically formatted. All existing data on the filesystem is cleared.

Implementation

Command implemented in V21.

Associated Files

$c/lmadm