Raid 1

2022-01-01  本文已影响0人  semiscone

创建 Raid 1 设备

bill@pinnacle:/home/nas$ sudo mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: partition table exists on /dev/sdb1
mdadm: partition table exists on /dev/sdb1 but will be lost or
       meaningless after creating array
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
mdadm: partition table exists on /dev/sdc1
mdadm: partition table exists on /dev/sdc1 but will be lost or
       meaningless after creating array
Continue creating array?
Continue creating array? (y/n) y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
bill@pinnacle:/home/nas$ cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc1[1] sdb1[0]
      3906884608 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  0.4% (18865856/3906884608) finish=465.3min speed=139239K/sec
      bitmap: 30/30 pages [120KB], 65536KB chunk

unused devices: <none>
bill@pinnacle:/home/nas$ mdadm --detail /dev/md0
mdadm: must be super-user to perform this action
bill@pinnacle:/home/nas$ sudo mdadm --detail /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Sat Jan  1 22:54:18 2022
        Raid Level : raid1
        Array Size : 3906884608 (3725.90 GiB 4000.65 GB)
     Used Dev Size : 3906884608 (3725.90 GiB 4000.65 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Sat Jan  1 22:57:33 2022
             State : clean, resyncing
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : bitmap

     Resync Status : 0% complete

              Name : pinnacle:0  (local to host pinnacle)
              UUID : 6407d37e:06c0e5b9:d36b05cf:1f4d62e7
            Events : 39

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
bill@pinnacle:/home/nas$

创建文件系统

bill@pinnacle:/home/nas$ sudo mkfs.ntfs /dev/md0
Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes:   0%
上一篇 下一篇

猜你喜欢

热点阅读