How to mount software RAID1 member using mdadm

Just a moment ago I connected my old hard drive and realized that it was a RAID member.

$ sudo fdisk -l /dev/sdd
Disk /dev/sdd: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488395055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x90909090

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048     2099199     1048576   fd  Linux raid autodetect
/dev/sdd2         2099200     6293503     2097152   82  Linux swap / Solaris
/dev/sdd3         6293504    69208063    31457280   fd  Linux raid autodetect
/dev/sdd4        69208064   488394751   209593344   fd  Linux raid autodetect

I couldn't mount it out of the box:

$ sudo mkdir /mnt/old_hdd 
$ sudo mount /dev/sdd4 /mnt/old_hdd 
mount: unknown filesystem type 'linux_raid_member'

Fortunately I used RAID1 array:

$ sudo mdadm --examine /dev/sdd4
/dev/sdd4:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 957e7cb5:bfd41f70:9cb84b0d:f53e5a4c
           Name : milosz-desktop:2
  Creation Time : Sat Aug 20 18:48:26 2011
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 419184640 (199.88 GiB 214.62 GB)
     Array Size : 419184496 (199.88 GiB 214.62 GB)
  Used Dev Size : 419184496 (199.88 GiB 214.62 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : db8a694f:750a0ded:22a6d046:5c4db280

    Update Time : Tue May  8 20:50:32 2012
       Checksum : 75dbc3b6 - correct
         Events : 191


   Device Role : Active device 1
   Array State : .A ('A' == active, '.' == missing)

I needed to create md virtual device using mdadm:

$ sudo mdadm -A -R /dev/md9 /dev/sdd4
mdadm: /dev/md9 has been started with 1 drive (out of 2).

So it could be mounted without hassle:

$ sudo mount /dev/md9 /mnt/old_hdd/
$ mount | grep ^/dev/md9
/dev/md9 on /mnt/old_hdd type ext4 (rw)

After data was moved I unmounted file system and removed md virtual device.

$ sudo umount /mnt/old_hdd 
$ sudo mdadm -S /dev/md9
mdadm: stopped /dev/md9
5 (1)
Article Rating (1 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Testing TLS/SSL encryption
Viewed 12856 times since Thu, Jan 16, 2020
A Simple Guide to Oracle Cluster File System (OCFS2) using iSCSI on Oracle Cloud Infrastructure
Viewed 7670 times since Sat, Jun 2, 2018
Manage Linux Password Expiration and Aging Using chage
Viewed 4260 times since Tue, Sep 11, 2018
debian How to Upgrade Debian 8 Jessie to Debian 9 Stretch
Viewed 2066 times since Sun, Sep 23, 2018
HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples
Viewed 4496 times since Fri, Nov 30, 2018
RHEL: Scan and configure new SAN (fibre channel) LUNs
Viewed 7501 times since Sun, May 27, 2018
UUIDs and Linux: Everything you ever need to know [Update]
Viewed 4716 times since Tue, Jul 17, 2018
linux ssh How to Hide the OpenSSH Version Details when Telnet to Port 22
Viewed 3716 times since Wed, Apr 22, 2020
Df command in Linux not updating actual diskspace, wrong data
Viewed 2573 times since Wed, May 30, 2018
RHEL: Extending a multipath LUN
Viewed 4333 times since Sun, May 27, 2018