How to install Mdadm on Linux Mint 18.3

To install Mdadm on Linux Mint 18.3

Mdadm is a free and open source GNU/Linux utility used to manage and monitor software RAID devices. It is used for configuring RAID disks and is also present in the Linux kernel as a block device and it also includes whole hard drives and their partitions. It is so simple to install Mdadm on Linux Mint and this tutorial covers the ground on the same process. 

 

Installing Mdadm

First, make sure you add the necessary repo by executing the following command. 

linuxhelp ~ # add-apt-repository ppa:eugenesan/ppa
You are about to add the following PPA:
 This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.

+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this a nd related PPAs are for personal use only.
.
.
gpg: requesting key 8313A596 from hkp server keyserver.ubuntu.com
gpg: key 8313A596: " Launchpad synergy+"  not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

 

 

Now that the repositories are added to your system, you shall update the repo by running the apt-get update command in the following manner.

linuxhelp ~ # apt-get update
Hit:1 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                                   
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                                
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease                              
Ign:5 http://packages.linuxmint.com sylvia InRelease                                           
Hit:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease          
Hit:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease        
Hit:8 http://packages.linuxmint.com sylvia Release                      
Reading package lists... Done


You shall now proceed with the installation of the mdadm package by triggering the following command which kick-starts the installation process. 

linuxhelp ~ #  apt-get install mdadm -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  default-mta | mail-transport-agent dracut-core
The following NEW packages will be installed:
  mdadm
0 upgraded, 1 newly installed, 0 to remove and 272 not upgraded.
Need to get 394 kB of archives.
After this operation, 1,208 kB of additional disk space will
.
.
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for initramfs-tools (0.122ubuntu8.9) ...
update-initramfs: Generating /boot/initrd.img-4.10.0-38-generic
Warning: No support for locale: en_IN
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.


The application has been successfully installed on the machine. To know more about the options used in the mdadm, execute the following command. 

linuxhelp ~ # mdadm --help
mdadm is used for building, managing, and monitoring
Linux md devices (aka RAID arrays)
Usage: mdadm --create device options...
            Create a new array from unused devices.
       mdadm --assemble device options...
            Assemble a previously created array.
       mdadm --build device options...
            Create or assemble an array without metadata.
       mdadm --manage device options...
            make changes to an existing array.
       mdadm --misc options... devices
            report on or modify various md related devices.
       mdadm --grow options device
            resize/reshape an active array
       mdadm --incremental device
            add/remove a device to/from an array as appropriate
       mdadm --monitor options...
            Monitor one or more array for significant changes.
       mdadm device options...
            Shorthand for --manage.
Any parameter that does not start with ' -'  is treated as a device name
or, for --examine-bitmap, a file name.
The first such name is often the name of an md device.  Subsequent
names are often names of component devices.

 For detailed help on the above major modes use --help after the mode
 e.g.
         mdadm --assemble --help
 For general help on options use
         mdadm --help-options

 


For removing the package, run the following remove command and press y to continue with the uninstallation process. 

linuxhelp ~ # apt-get remove mdadm 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  mdadm
0 upgraded, 0 newly installed, 1 to remove and 272 not upgraded.
After this operation, 1,208 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 220780 files and directories currently installed.)
Removing mdadm (3.3-2ubuntu7.6) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 4 removed doc-base files...
Registering documents with scrollkeeper...
Processing triggers for initramfs-tools (0.122ubuntu8.9) ...
update-initramfs: Generating /boot/initrd.img-4.10.0-38-generic
Warning: No support for locale: en_IN

With this, the tutorial on the installation of Mdadm on Linux Mint 18.3 comes to an end. 
 

FAQ
Q
where to check the options available for mdadm?
A
the options used in the mdadm, execute the following command

# mdadm --help
Q
which command to add the repo for mdadm in terminal?
A
add the repo of mdadm by executing the following command

# add-apt-repository ppa:eugenesan/ppa
Q
Whether mdadm is available for windows?
A
no. mdadm is not available for Windows.
Q
If there is any source package available for mdadm?
A
refer the link for source package of mdadm

'https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/snapshot/mdadm-4.0.tar.gz".
Q
what is the use of installing mdadm in ubuntu?
A
add the repo of mdadm by executing the following command

# add-apt-repository ppa:eugenesan/ppa