disksetup
Describes the disksetup command that formats disks for use by HPE Data Fabric
storage.
Description
disksetup command must be run as root.
disksetup command formats specified disks for use by HPE Data Fabric storage, and adds those disks to the disktab file. You do not need to set up Redundant Array of Independent Disks (RAID) on disks used by
the file system. HPE Data Fabric uses disksetup
to set up storage pools. In most cases, you should let HPE Data Fabric calculate
storage pools using the default stripe width of two or three
disks. If you anticipate a high volume of random-access I/O, you can use the
-W option to specify larger storage pools of up to 8 disks each.
See Setting Up Disks for Data Fabric for more information about when and how
to use disksetup.
/usr/bin/python to /usr/bin/python3. The disksetup
command fails if /usr/bin/python is not found.
sudo alternatives --set python /usr/bin/python3Syntax
/opt/mapr/server/disksetup
[-F]
[-G]
[-X]
[-M]
[-W <stripe_width>]
<disk list file>
Options
|
Option |
Description |
|---|---|
|
|
Forces formatting of all specified disks. Disks that are already
formatted for HPE Data Fabric are not
reformatted by |
|
|
Generates the |
-X |
Fixes disktab contents from
/proc/partitions, but does not format disks. Use this
option if there is a change in the names of the disk devices referenced by
disktab, but the disks themselves are still usable. For example, if /dev/sdb
has been renamed to /dev/sdf but the device itself has the same GUID, only
the disktab contents need to be updated to point to /dev/sdf. |
|
|
Uses the maximum available number of disks per storage pool. |
|
|
Specifies the number of disks per storage pool. |
Examples
Setting up disks specified in the file /tmp/disks.txt:/opt/mapr/server/disksetup -F /tmp/disks.txtReformatting
all disksTo reformat all disks, remove the disktab file and
issue the disksetup -F command to format the
disk:
/opt/mapr/server/disksetup -FTo reformat a particular
disk from the disktab, use the maprcli disk remove and maprcli disk add
commands. For more information, see Setting Up Disks for HPE Data Fabric.
To specify the disks to be formatted for use by the HPE Data Fabric cluster, create a text file /tmp/disks.txt
listing the disks and partitions for use by HPE Data Fabric on the node. Each line lists
either a single disk, or all applicable partitions on a single disk. When listing
multiple partitions on a line, separate each partition by spaces. For
example:
/dev/sdb
/dev/sdc1 /dev/sdc2 /dev/sdc4
/dev/sddLater,
when you run disksetup to format the disks, specify the
disks.txt file. For
example:
/opt/mapr/server/disksetup -F /tmp/disks.txtThe disksetup command removes all data from the specified disks.
Ensure that you specify the disks correctly, and that you have backed up any data
that you wish to keep.
If you are re-using a node that was used previously in another cluster, be sure to format the disks to remove any traces of data from the old cluster.
Test Purposes Only: Using a Flat File for StorageWhen
setting up a small cluster for evaluation purposes, if a particular node does not have
physical disks or partitions available to dedicate to the cluster, you can use a flat
file on an existing disk partition as the node's storage. Create at least a 16GB file,
and include a path to the file in the disk list file for the
disksetup
script.
The following example creates a 20 GB flat file
(bs=1G specifies 1 gigabyte blocks, multiplied by
count=20) at
/root/storagefile:
dd if=/dev/zero of=/root/storagefile bs=1G count=20Next,
add the following entry to the disk list file /tmp/disks.txt to be used
by disksetup:
/root/storagefile