MapR formats and uses disks for the Lockless Storage Services layer (MapR-FS), recording these disks in the file disktab. In a production environment, or when testing performance, MapR should be configured to use physical hard drives and partitions. In some cases, it is necessary to reinstall the operating system on a node so that the physical hard drives are available for direct use by MapR. Reinstalling the operating system provides an unrestricted opportunity to configure the hard drives. If the installation procedure assigns hard drives to be managed by the Linux Logical Volume manger (LVM) by default, you should explicitly remove from LVM configuration the drives you plan to use with MapR. It is common to let LVM manage one physical drive containing the operating system partition(s) and to leave the rest unmanaged by LVM for use with MapR.
To determine if a disk or partition is ready for use by MapR:
- Run the command sudo lsof <partition> to determine whether any processes are already using the disk or partition.
- There should be no output when running sudo fuser <partition>, indicating there is no process accessing the specific disk or partition.
- The disk or partition should not be mounted, as checked via the output of the mount command.
- The disk or partition should not have an entry in the /etc/fstab file.
- The disk or partition should be accessible to standard Linux tools such as mkfs. You should be able to successfully format the partition using a command like sudo mkfs.ext3 <partition> as this is similar to the operations MapR performs during installation. If mkfs fails to access and format the partition, then it is highly likely MapR will encounter the same problem.
Any disk or partition that passes the above testing procedure can be added to the list of disks and partitions passed to the disksetup command.
To specify disks or partitions for use by MapR:
- Create a text file /tmp/disks.txt listing disks and partitions for use by MapR. Each line lists a single disk, or partitions on a single disk. Example:
/dev/sdb /dev/sdc1 /dev/sdc2 /dev/sdc4 /dev/sdd
Later, when you run disksetup to format the disks, specify the disks and partitions file. Example:
disksetup -F /tmp/disks.txt

You should run disksetup only after running configure.sh.
To test without formatting physical disks:
If you do not have physical partitions or disks available for reformatting, you can test MapR by creating a flat file and including a path to the file in the disk list file. You should create at least a 16GB file or larger.
The following example creates a 20 GB flat file (bs=1G specifies 1 gigabyte, multiply by count=20):
$ dd if=/dev/zero of=/root/storagefile bs=1G count=20
Using the above example, you would add the following to /tmp/disks.txt:
/root/storagefile
Working with a Logical Volume Manager
The Logical Volume Manager creates symbolic links to each logical volume's block device, from a directory path in the form: /dev/<volume group>/<volume name>. MapR needs the actual block location, which you can find by using the ls -l command to list the symbolic links.
- Make sure you have free, unmounted logical volumes for use by MapR:
- Unmount any mounted logical volumes that can be erased and used for MapR.
- Allocate any free space in an existing logical volume group to new logical volumes.
- Make a note of the volume group and volume name of each logical volume.
- Use ls -l with the volume group and volume name to determine the path of each logical volume's block device. Each logical volume is a symbolic link to a logical block device from a directory path that uses the volume group and volume name: /dev/<volume group>/<volume name>
The following example shows output that represents a volume group named mapr containing logical volumes named mapr1, mapr2, mapr3, and mapr4:# ls -l /dev/mapr/mapr* lrwxrwxrwx 1 root root 22 Apr 12 21:48 /dev/mapr/mapr1 -> /dev/mapper/mapr-mapr1 lrwxrwxrwx 1 root root 22 Apr 12 21:48 /dev/mapr/mapr2 -> /dev/mapper/mapr-mapr2 lrwxrwxrwx 1 root root 22 Apr 12 21:48 /dev/mapr/mapr3 -> /dev/mapper/mapr-mapr3 lrwxrwxrwx 1 root root 22 Apr 12 21:48 /dev/mapr/mapr4 -> /dev/mapper/mapr-mapr4
- Create a text file /tmp/disks.txt containing the paths to the block devices for the logical volumes (one path on each line). Example:
$ cat /tmp/disks.txt /dev/mapper/mapr-mapr1 /dev/mapper/mapr-mapr2 /dev/mapper/mapr-mapr3 /dev/mapper/mapr-mapr4
- Pass disks.txt to disksetup
# sudo /opt/mapr/server/disksetup -F /tmp/disks.txt