-
-
Save Aziz87/4b80808d1cd5b2f02b592d509ecb3d93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.detach | |
dmesg -c | |
nvme detach-ns /dev/nvme0 -n 1 -c 0 | |
nvme delete-ns /dev/nvme0 -n 1 | |
nvme reset /dev/nvme0 | |
2.创建 | |
**#1953125000 = 1,000,000,000,000/512 = 1,953,125,000 (1TB)** | |
nvme create-ns /dev/nvme0 -s 976562500 -c 976562500 -f 0 -d 0 -m 0 | |
nvme attach-ns /dev/nvme0 -n 1 -c 0 | |
nvme create-ns /dev/nvme0 -s 975175680 -c 975175680 -f 0 -d 0 -m 0 #第二个创建的必须 | |
nvme attach-ns /dev/nvme0 -n 2 -c 0 | |
nvme reset /dev/nve0 | |
nvme list | |
[root@localhost Muti-namespace_Test]# nvme list | |
Node SN Model Namespace Usage Format FW Rev | |
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- -------- | |
/dev/nvme0n1 XXXXXX XXXXX 1 500.36 GB / 500.36 GB 512 B + 0 B VDV10152 | |
/dev/nvme0n2 XXXXXX XXXXX 2 499.29 GB / 499.29 GB 512 B + 0 B VDV10152 | |
3,删除 | |
nvme detach-ns /dev/nvme0 -n 1 -c 0 | |
nvme detach-ns /dev/nvme0 -n 2 -c 0 | |
nvme delete-ns /dev/nvme0 -n 1 | |
nvme delete-ns /dev/nvme0 -n 2 | |
4.恢复 | |
nvme create-ns /dev/nvme0 -s 1000204886016 -c 1000204886016 -f 0 -d 0 -m 0 #1000204886016是通过“nvme id-ctrl /dev/nvme0n1 | grep tnvmcap”抓取并除以512 | |
nvme attach-ns /dev/nvme0 -n 1 -c 0 | |
nvme reset /dev/nvme0 | |
nvme list | |
[root@localhost Muti-namespace_Test]# nvme list |
Создание RAID0 NVME
- fdisk /dev/nvme0n2 // p, 1, enter,etner
- fdisk /dev/nvme1n2 // p, 1, enter,etner
- nvme list
- fdisk -l
- partprobe
- df -h
- mdadm --create /dev/md3 -a yes -l 0 -n 2 /dev/nvme0n2p1 /dev/nvme1n2p1
- nvme list
- mkfs -t ext4 /dev/md3
- mount /dev/md3 /mnt
- df -h
Но лучше создать систему через rescue командой Installimage, там в блокноте вписать raid 0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1 Подключаемся через rescue чтобы освободить диски (ОС будет создавтаься с помощью дисков /dev/ram за счет ОЗУ и мы сможем настроить свободные NVME)
2 Удаляем диски на всякий
3 Проверяем
nvme list
fdisk --list
3 Создаем диски
и та же второй диск
4 проверяем