Score:0

How to drop raid1 and combine two disks to one

cn flag

Goal

In the remote server, it comes with 2 x 2TB disk with RAID-1, however, I have already filled the disk with data and I would like to remove the RAID-1 scheme and make it ~4TB in single mountpoint (to extend the first disk).

Background

For the original lsblk, it looks like:

NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
nvme0n1     259:0    0  1.8T  0 disk
├─nvme0n1p1 259:1    0    4G  0 part
│ └─md0       9:0    0    4G  0 raid1 [SWAP]
├─nvme0n1p2 259:2    0  512M  0 part
│ └─md1       9:1    0  511M  0 raid1 /boot
└─nvme0n1p3 259:3    0  1.8T  0 part
  └─md2       9:2    0  1.8T  0 raid1 /
nvme1n1     259:4    0  1.8T  0 disk
├─nvme1n1p1 259:5    0    4G  0 part
│ └─md0       9:0    0    4G  0 raid1 [SWAP]
├─nvme1n1p2 259:6    0  512M  0 part
│ └─md1       9:1    0  511M  0 raid1 /boot
└─nvme1n1p3 259:7    0  1.8T  0 part
  └─md2       9:2    0  1.8T  0 raid1 /

My target will be the second /dev/md2/ in nvme1n1p3.

Steps completed

I have performed the following setup and not sure what will be the next step.

mdadm /dev/md2 --fail /dev/nvme1n1p3
mdadm /dev/md2 --remove /dev/nvme1n1p3
mdadm --grow /dev/md2 --raid-devices=1 --force

And the result of lsblk becomes:

NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
nvme0n1     259:0    0  1.8T  0 disk
├─nvme0n1p1 259:1    0    4G  0 part
│ └─md0       9:0    0    4G  0 raid1 [SWAP]
├─nvme0n1p2 259:2    0  512M  0 part
│ └─md1       9:1    0  511M  0 raid1 /boot
└─nvme0n1p3 259:3    0  1.8T  0 part
  └─md2       9:2    0  1.8T  0 raid1 /
nvme1n1     259:4    0  1.8T  0 disk
├─nvme1n1p1 259:5    0    4G  0 part
│ └─md0       9:0    0    4G  0 raid1 [SWAP]
├─nvme1n1p2 259:6    0  512M  0 part
│ └─md1       9:1    0  511M  0 raid1 /boot
└─nvme1n1p3 259:7    0  1.8T  0 part

Would be great if someone can provide a guide for the next step, thanks! :D

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.