Moxa V2616A-C8-CT-W7E [65/111] Handling an event with hot swap daemon

Moxa V2616A-C7-CT-T-LX [65/111] Handling an event with hot swap daemon
V2616A Linux Hot-swap Function
6-3
Handling an Event with Hot-swap Daemon
mxhtspd will be triggered when the following events occur:
1. A disk is plugged in
When a disk n with m partitions has been plugged in, the system will automatically mount its partitions on
/media/disknpm, where m ranges from 1 to m. For example, if disk 1 has two partitions, they would be
mounted on /media/disk1p1 and /media/disk1p2.
The action-disk-plugged script will be triggered with the disk number as argument. By default it will scan the
disk on the SATA bus. You can add some operations here when necessary.
Execute the mount command to check the disk mounting situation. The following example shows the status of
2 disks with 2 partitions separately.
Moxa:~# mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,relatime,size=10240k,mode=755)
/dev/hda1 on / type ext2 (ro,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,relatime,mode=755)
usbfs on /proc/bus/usb type usbfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
none on /tmp type tmpfs (rw,relatime)
/dev/hda2 on /home type ext2 (rw,relatime,errors=continue)
/dev/sda1 on /media/disk2p1 type ext3 (rw,relatime,errors=continue,data=ordered)
/dev/sda2 on /media/disk2p2 type ext3 (rw,relatime,errors=continue,data=ordered)
/dev/sdb1 on /media/disk1p1 type ext3 (rw,relatime,errors=continue,data=ordered)
/dev/sdb2 on /media/disk1p2 type ext3 (rw,relatime,errors=continue,data=ordered)
2. The X1 button is pressed
When X1 button is pressed less than 5 seconds, which usually indicates a quick button press, the
action-btn-pressed script will be executed. It will umount all partitions on both SATA-A, SATA-B disks and
the LED will blink 3 times at 1 second intervals to indicate that the disk has been successfully unmounted, and
that users can remove that hard disk from the storage tray.
3. A disk is unplugged
When disk on SATA-A or SATA-B is unplugged, the action-disk-unplugged script will be triggered with
argument n. It will check if all partitions on disk n have been umounted before they were unplugged and warn
the user if they weren’t. The correct procedure is first press the button to umount the partitions and then
unplug the disk. The only purpose of this script is to warn of misuse or incorrect operation.
4. A monitored partition is over the specific usage limit, or does not exist
When /media/disknpm detects this situation, the daemon will show an error message and blink the warning
LED n at 1 second intervals. In addition, the action-part-over-usage script will be launched with argument
/media/disknpm.
ATTENTION
Be sure to press the button before removing the disks. The LEDs will blink 3 times to indicate that the disks
have been successfully unmounted from the system, and that
you can remove the disks from the computer.

Содержание

Похожие устройства

Скачать