LoginSignup
9

More than 5 years have passed since last update.

RAID1のHDDが片方だけ手元にあるときのマウント方法

Last updated at Posted at 2013-12-13

mount

mount
# mdadm --assemble /dev/md1 /dev/sde1
mdadm: /dev/md1 assembled from 1 drive - need all 2 to start it (use --run to insist).
# ls -l /dev/md1
brw-rw---T 1 root disk 9, 1 12月 14 06:49 /dev/md1
# mdadm --run /dev/md1
mdadm: started /dev/md1
# mount -o ro /dev/md1 /mnt

umount

umount
# umount /mnt
# sudo mdadm --stop /dev/md1

その他確認方法

ファイルシステムがLinuxRaidAutodetectであることを確認。
# fdisk -l /dev/sde
Disk /dev/sde: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x0001d3aa

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048   976771071   488384512   fd  Linux raid autodetect
認識したか確認(md1)
# cat /proc/mdstat 
Personalities : [raid1] 
md1 : active raid1 sde1[0]
      488253248 blocks super 1.2 [2/1] [U_]

md0 : active raid1 sdb1[0] sdc1[1]
      976630336 blocks super 1.2 [2/2] [UU]

unused devices: <none>
HDDが片方しかない場合の表示
# mdadm -D /dev/md1
/dev/md1:
        Version : 1.2
  Creation Time : Wed Aug  7 20:15:15 2013
     Raid Level : raid1
     Array Size : 488253248 (465.63 GiB 499.97 GB)
  Used Dev Size : 488253248 (465.63 GiB 499.97 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Sat Dec 14 06:59:51 2013
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : server2:0
           UUID : 2b74a108:2cc695cd:3a89d850:27a782fb
         Events : 172

    Number   Major   Minor   RaidDevice State
       0       8       65        0      active sync   /dev/sde1
       1       0        0        1      removed
HDDが2つある時の表示
# mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Sat Oct  5 05:10:37 2013
     Raid Level : raid1
     Array Size : 976630336 (931.39 GiB 1000.07 GB)
  Used Dev Size : 976630336 (931.39 GiB 1000.07 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Sat Dec 14 07:00:47 2013
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : take:0
           UUID : 085f26a1:5a98bf98:27fb0e99:3d06d852
         Events : 101

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9