干货 腾讯云轻量100GB、500GB、1TB三块数据盘组raid0 1.6T大盘鸡
我看腾讯云轻量数据盘100GB、500GB、1TB三块都可以购买一次,因此直接下单,爽歪歪,加起来1.7TB了,然后每次挂载嫌麻烦,因此想到可以通过mdadm组raid0,直接组成一块硬盘不爽歪歪么。反正也不放重要数据。本教程仅仅针对如何组成raid0实操。不对具体的数据负责,操作前请自行备份好相关数据!!!!!!!
后台挂载号硬盘后,链接ssh,登陆后查看硬盘
fdisk -l
Disk /dev/vda: 107.4 GB, 107374182400 bytes, 209715200 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x0009ac89 Device Boot Start End Blocks IdSystem/dev/vda1 * 2048 209715166 104856559+83LinuxDisk /dev/vdb: 118.1 GB, 118111600640 bytes, 230686720 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x8b564d31 Device Boot Start End Blocks IdSystem/dev/vdb1 2048 230686719 115342336 83LinuxDisk /dev/vdc: 1073.7 GB, 1073741824000 bytes, 2097152000 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/vdd: 107.4 GB, 107374182400 bytes, 209715200 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/vde: 536.9 GB, 536870912000 bytes, 1048576000 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
vdc vdd vde三块是我新挂载的硬盘,因此直接怼
mdadm -Cv /dev/md0 -a yes -n 3 -l 0 /dev/vdc /dev/vdd /dev/vde
mdadm: chunk size defaults to 512Kmdadm: Defaulting to version 1.2 metadatamdadm: array /dev/md0 started.
可以看到组完成,然后输入命令重新查看
fdisk -l
出来了
Disk /dev/md0: 1717.6 GB, 1717581119488 bytes, 3354650624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes
接下来格式化mkfs.xfs -f /dev/md0
# mkfs.xfs -f /dev/md0meta-data=/dev/md0 isize=512 agcount=32, agsize=13104128 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=419331328, imaxpct=5 = sunit=128 swidth=384 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal log bsize=4096 blocks=204752, version=2 = sectsz=512 sunit=8 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0
然后查看分区ID:lkid /dev/md0
/dev/md0: UUID="记住这一串数字" TYPE="xfs"
然后修改修改/etc/fstab文件
在文件最后用过uuid加上下面这一行
UUID="上面的UUID" /挂载目录 xfs defaults 0 0
如
UUID="12345D" /ssd xfs defaults 0 0
/ssd 为挂载目录
保存,然后正常执行挂载流程,挂载教程请自行百度。 LVM不香吗,,为何这么麻烦。。 raid0 大哥 对头 组raid0 三个硬盘组成一个硬盘用, 他组raid是为了把空间合并到一起,不是备份数据 被你们玩出花了。 有效教程好;Phttps://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif 会玩,腾讯云大盘车活动链接:https://curl.qcloud.com/pSLPDVAw
页:
[1]