From aa2b12e8aa0fb12a683121c1fb3a591008309f5a Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 8 Jan 2002 18:42:44 +0000 Subject: [PATCH] Expand documentation about non-devfs module use. --- INSTALL | 16 ++++++++++++++-- scripts/devmap_mknod.sh | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 5232336..6cbfef1 100644 --- a/INSTALL +++ b/INSTALL @@ -58,11 +58,23 @@ Device Mapper installation e.g. add to /etc/rc* Or whenever the device-mapper is loaded (if you built it as a module) - e.g. add a "post-install" line to /etc/modules.conf. + e.g. add the following line to /etc/modules.conf and run depmod -a + and use modprobe dm-mod to load the module + post-install dm-mod /etc/init.d/devmap_mknod.sh + + The script creates the /dev/device-mapper/control device for the ioctl + interface using the major and minor numbers that have been allocated + dynamically. It prints a message if it works or else it fails silently + with a non-zero status code. + + If you want the block devices created by the device-mapper to have a + specific major number, then specify this when loading the module + e.g. modprobe dm-mod major=123 + This major number is visible in /proc/devices. 5) You can now use 'dmsetup' to test the API. If you chose the filesystem interface you will first need to mount dmfs. - e.g. mount -t dmfs dmfs /dmfs + e.g. mount -t dmfs dmfs /dmfs (or add it to /etc/fstab) Read the dmsetup man page for more information. diff --git a/scripts/devmap_mknod.sh b/scripts/devmap_mknod.sh index 79cbc44..229d297 100755 --- a/scripts/devmap_mknod.sh +++ b/scripts/devmap_mknod.sh @@ -17,7 +17,7 @@ make_dir() make_node() { - rm $control || true + rm -f $control || true echo Creating $control character device with major:$major minor:$minor mknod --mode=600 $control c $major $minor } -- 2.43.5