如何将软件 RAID 1 转换为两个 RAID 0 驱动器

如何将软件 RAID 1 转换为两个 RAID 0 驱动器

/dev/nvme 驱动器被分配给 ZFS 池,而/dev/sda&/dev/sdb处于软件 RAID 1 中。如果可能的话,我如何才能在不丢失任何数据或不需要重新启动的情况下删除该软件 RAID。

Disk /dev/nvme2n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZQLB3T8HALS-00007              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 63B6E337-3B79-C648-9CC1-AB9B1A767803

Device              Start        End    Sectors  Size Type
/dev/nvme2n1p1       2048 7501459455 7501457408  3.5T Solaris /usr & Apple ZFS
/dev/nvme2n1p9 7501459456 7501475839      16384    8M Solaris reserved 1


Disk /dev/nvme1n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZQLB3T8HALS-00007              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E2B1ABF6-8F20-3E4D-9DE6-BB6A099164F2

Device              Start        End    Sectors  Size Type
/dev/nvme1n1p1       2048 7501459455 7501457408  3.5T Solaris /usr & Apple ZFS
/dev/nvme1n1p9 7501459456 7501475839      16384    8M Solaris reserved 1


Disk /dev/nvme0n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZQLB3T8HALS-00007              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 38A8941A-DCA5-E549-A796-4A0DA2B5E134

Device              Start        End    Sectors  Size Type
/dev/nvme0n1p1       2048 7501459455 7501457408  3.5T Solaris /usr & Apple ZFS
/dev/nvme0n1p9 7501459456 7501475839      16384    8M Solaris reserved 1


Disk /dev/nvme3n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZQLB3T8HALS-00007              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: EF28D0ED-F30A-804D-87A0-F59C5E681FCA

Device              Start        End    Sectors  Size Type
/dev/nvme3n1p1       2048 7501459455 7501457408  3.5T Solaris /usr & Apple ZFS
/dev/nvme3n1p9 7501459456 7501475839      16384    8M Solaris reserved 1


Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Disk model: INTEL SSDSC2KB48
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 14E4EB70-4780-46B5-A496-36204C410BC8

Device         Start       End   Sectors   Size Type
/dev/sda1         34   1046527   1046494   511M EFI System
/dev/sda2    1046528  84932607  83886080    40G Linux RAID
/dev/sda3   84932608 125892607  40960000  19.5G Linux filesystem
/dev/sda4  125892608 937698991 811806384 387.1G Linux RAID
/dev/sda5  937698992 937703054      4063     2M Linux filesystem



Disk /dev/sdb: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Disk model: INTEL SSDSC2KB48
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 563A4CDC-1C92-47AF-A32A-24EA97B301B5

Device         Start       End   Sectors   Size Type
/dev/sdb1         34   1046527   1046494   511M EFI System
/dev/sdb2    1046528  84932607  83886080    40G Linux RAID
/dev/sdb3   84932608 125892607  40960000  19.5G Linux filesystem
/dev/sdb4  125892608 937698991 811806384 387.1G Linux RAID



Disk /dev/md2: 40 GiB, 42916118528 bytes, 83820544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md4: 387 GiB, 415510626304 bytes, 811544192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/vg-data: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

/etc/fstab

UUID=c4408a1c-aa5b-4ce2-a9e8-1673660331e9       /       ext4    defaults        0       1
LABEL=EFI_SYSPART       /boot/efi       vfat    defaults        0       1
UUID=c90b3083-1b43-427c-8016-1d2406c36417       /var/lib/vz     ext4    defaults        0       0
UUID=e585755c-9908-4c01-a89b-d7fb1880b8f8       swap    swap    defaults        0       0
UUID=aea8f278-23a8-4ce0-97ca-4354720ca602       swap    swap    defaults        0       0
/dev/vg/swaplv       swap    swap    defaults        0       0
/dev/vg/swaplv2       swap    swap    defaults        0       0

swapon——显示

NAME      TYPE       SIZE   USED PRIO
/dev/sdb3 partition 19.5G  19.5G   -2
/dev/sda3 partition 19.5G  19.5G   -3
/dev/dm-1 partition  247G 246.9G   -4
/dev/dm-2 partition  120G 104.8G   -5

显示

  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               386.97 GiB
  PE Size               4.00 MiB
  Total PE              99065
  Alloc PE / Size       99065 / 386.97 GiB
  Free  PE / Size       0 / 0
  VG UUID               e2YzU3-HzQe-DIqH-HGNr-tFqc-cWO1-K92uOR

相关内容