用mdadm创建一个raid 10的设备,并通过FC输出

创建一个raid 10的设备

scutech@infokist:~$ lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT|grep nvme
nvme0n1                 931.3G                   disk   
├─nvme0n1p9                 8M                   part   
└─nvme0n1p1             931.3G zfs_member        part   
nvme1n1                 931.3G                   disk   
├─nvme1n1p9                 8M                   part   
└─nvme1n1p1             931.3G zfs_member        part   
scutech@infokist:~$ 

root@infokist:~# mdadm --create --verbose /dev/md1 --level=10 --raid-devices=2 /dev/nvme0n1p1 /dev/nvme1n1p1
mdadm: layout defaults to n2
mdadm: layout defaults to n2
mdadm: chunk size defaults to 512K
mdadm: size set to 976421888K
mdadm: automatically enabling write-intent bitmap on large array
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md1 started.
root@infokist:~# 
root@infokist:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid10 nvme1n1p1[1] nvme0n1p1[0]
      976421888 blocks super 1.2 2 near-copies [2/2] [UU]
      [>....................]  resync =  0.6% (5922240/976421888) finish=79.1min speed=204215K/sec
      bitmap: 8/8 pages [32KB], 65536KB chunk

md0 : active raid10 sdae[4] sdag[6](S) sdaf[5] sdac[2] sdad[3] sdaa[0] sdab[1]
      23441685504 blocks super 1.2 512K chunks 2 near-copies [6/6] [UUUUUU]
      bitmap: 0/175 pages [0KB], 65536KB chunk

创建lv

root@infokist:~# pvcreate /dev/md1p1
WARNING: xfs signature detected on /dev/md1p1 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/md1p1.
  Physical volume "/dev/md1p1" successfully created
root@infokist:~# vgcreate redologvg /dev/md1p1
  Volume group "redologvg" successfully created
root@infokist:~# lvcreate -L 11G -n redologlv redologvg
  Logical volume "redologlv" created.
root@infokist:~# ll /dev/redologvg/redologlv 
lrwxrwxrwx 1 root root 7 Sep  1 14:39 /dev/redologvg/redologlv -> ../dm-3
root@infokist:~# 

FC输出

root@infokist:~#  tcm_node --iblock=iblock_2/iblock_backstore_1 /dev/md1
Status: DEACTIVATED  Max Queue Depth: 0  SectorSize: 512  HwMaxSectors: 256
        iBlock device: md1  UDEV PATH: /dev/md1  readonly: 0
        Major: 9 Minor: 1  CLAIMED: IBLOCK
root@infokist:~#  /opt/scutech/dbackup3/bin/fc_node --addlun=20:01:00:0e:1e:c2:f4:a1  1 2 lio_port  iblock_2/iblock_backstore_1
Successfully created FC Target Logical Unit
root@infokist:~# ls /sys/kernel/config/target/qla2xxx/20\:01\:00\:0e\:1e\:c2\:f4\:a1/tpgt_1/lun/
lun_1  lun_2
root@infokist:~# /opt/scutech/dbackup3/bin/fc_node --addlunacl 20:01:00:0e:1e:c2:f4:a1 1 21:00:00:24:ff:2e:f6:b3 2 2
Successfully added FC Initiator Mapped LUN: 2 ACL 21:00:00:24:ff:2e:f6:b3 for FC Target Portal Group: 20:01:00:0e:1e:c2:f4:a1 1
root@infokist:~# 
姚远ACE CSDN认证博客专家 ACE 华为云 MVP
Oracle ACE,华为云 MVP,Oracle10g,12c OCM; MySQL 5.6,5.7,8.0 OCP;CCNA; EMC Certified; IBM P Certified; RHCE; SQLServer 764; DB2 Certified; TOEIC 890;获得过两次国家部级科技进步奖;发明过两项计算机专利。微信:yaoyuanace 邮箱:yaoyuanace(at)qq.com
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页