当前位置:   article > 正文

添加大小均为 10G 的虚拟磁盘,配置 raid-5 磁盘。

添加大小均为 10G 的虚拟磁盘,配置 raid-5 磁盘。

添加大小均为 10G 的虚拟磁盘,配置 raid-5 磁盘。

添加大小均为 10G 的虚拟磁盘,配置 raid-5 磁盘。
 创建 LVM 命名为/dev/vg01/lv01,大小为 100G,格式化为 ext4,挂在到本地目
录/webdata,在分区内建立测试空文件 disk.txt
  • 1
  • 2
  • 3
#添加十三块10G的硬盘
[root@storagesrv ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   20G  0 disk 
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   19G  0 part 
  ├─centos-root 253:0    0   17G  0 lvm  /
  └─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sdb               8:16   0   10G  0 disk 
sdc               8:32   0   10G  0 disk 
sdd               8:48   0   10G  0 disk 
sde               8:64   0   10G  0 disk 
sdf               8:80   0   10G  0 disk 
sdg               8:96   0   10G  0 disk 
sdh               8:112  0   10G  0 disk 
sdi               8:128  0   10G  0 disk 
sdj               8:144  0   10G  0 disk 
sdk               8:160  0   10G  0 disk 
sdl               8:176  0   10G  0 disk 
sdm               8:192  0   10G  0 disk 
sdn               8:208  0   10G  0 disk 
sr0              11:0    1  4.2G  0 rom  
[root@storagesrv ~]# 
[root@storagesrv ~]# mdadm -Cv /dev/md0 -n12 -x1 -l5 /dev/sd[b-n]
[root@storagesrv ~]# vgcreate /dev/vg01 /dev/md0
[root@storagesrv ~]# lvcreate -L +100G -n lv01 vg01
[root@storagesrv ~]# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/centos/swap
  LV Name                swap
  VG Name                centos
  LV UUID                uR2how-ZAht-cG0G-9i1s-lcnE-RxnH-iCHcdq
  LV Write Access        read/write
  LV Creation host, time localhost, 2022-04-01 11:54:25 -0400
  LV Status              available
  # open                 2
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/centos/root
  LV Name                root
  VG Name                centos
  LV UUID                ogcqfJ-fNdW-2BaJ-d237-tUJT-Wv3p-u8Q1Ct
  LV Write Access        read/write
  LV Creation host, time localhost, 2022-04-01 11:54:25 -0400
  LV Status              available
  # open                 1
  LV Size                <17.00 GiB
  Current LE             4351
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0
   
  --- Logical volume ---
  LV Path                /dev/vg01/lv01
  LV Name                lv01
  VG Name                vg01
  LV UUID                QuU2P3-siBK-7Lc0-Rp9Z-tIAI-eyxS-q6ewtJ
  LV Write Access        read/write
  LV Creation host, time storagesrv, 2022-05-17 14:24:57 -0400
  LV Status              available
  # open                 0
  LV Size                100.00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     22528
  Block device           253:2
[root@storagesrv ~]# mkfs.ext4 /dev/vg01/lv01 
[root@storagesrv ~]# 
[root@storagesrv ~]# mkdir /webdata
[root@storagesrv ~]# mount /dev/vg01/lv01 /webdata/
[root@storagesrv ~]# cd /webdata/
[root@storagesrv webdata]# touch disk.txt
[root@storagesrv webdata]# ls
disk.txt  lost+found
[root@storagesrv webdata]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/192095
推荐阅读
相关标签
  

闽ICP备14008679号