How can I reconfigure a raid1 so that it is not raid1 anymore and without loss of data? I do not want raid.
I find myself with a server with predefined images that have a software raid1 setup. My guess is that there are 2 SSD disks of 1 GB size but I am not sure. Anyway, I'd like to get rid of the raid.
I do not need a raid1 setup. I would like to change that into a normal disk layout without raid and without loss of data. I am not sure if that is possible and I am not sure how to start.
I'll try to provide the information that I believe could give a good start to analyze. Please let me know if other information is needed and I will try my best to provide that.
Information of fdisk -l
:
Disk /dev/loop0: 99,37 MiB, 104185856 bytes, 203488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 66,38 MiB, 69591040 bytes, 135920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 66,4 MiB, 69619712 bytes, 135976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 89,9 MiB, 93417472 bytes, 182456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 61,75 MiB, 64729088 bytes, 126424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/nvme0n1: 894,26 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: KCD51LUG960G
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: 4FE276C7-2079-4748-8EDE-F2AD23CF0096
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 6143 4096 2M BIOS boot
/dev/nvme0n1p2 6144 58593279 58587136 28G Linux RAID
/dev/nvme0n1p3 58593280 78125055 19531776 9,3G Linux swap
/dev/nvme0n1p4 78125056 1875382271 1797257216 857G Linux RAID
Disk /dev/nvme1n1: 894,26 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: KCD51LUG960G
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: 6496C65A-EEF2-4B3E-AE51-232E4BE14414
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 6143 4096 2M BIOS boot
/dev/nvme1n1p2 6144 58593279 58587136 28G Linux RAID
/dev/nvme1n1p3 58593280 78125055 19531776 9,3G Linux swap
/dev/nvme1n1p4 78125056 1875382271 1797257216 857G Linux RAID
Disk /dev/md4: 856,102 GiB, 920195497984 bytes, 1797256832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md2: 27,96 GiB, 29996482560 bytes, 58586880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg00-usr: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg00-var: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/vg00-home: 836,102 GiB, 898717712384 bytes, 1755308032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Information of lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 99,4M 1 loop /snap/core/11187
loop1 7:1 0 66,4M 1 loop /snap/lxd/20806
loop2 7:2 0 66,4M 1 loop /snap/lxd/20840
loop3 7:3 0 89,1M 1 loop /snap/core/8268
loop4 7:4 0 61,7M 1 loop /snap/core20/1026
nvme0n1 259:0 0 894,3G 0 disk
├─nvme0n1p1 259:2 0 2M 0 part
├─nvme0n1p2 259:3 0 28G 0 part
│ └─md2 9:2 0 28G 0 raid1 /
├─nvme0n1p3 259:4 0 9,3G 0 part [SWAP]
└─nvme0n1p4 259:5 0 857G 0 part
└─md4 9:4 0 857G 0 raid1
├─vg00-usr 253:0 0 10G 0 lvm /usr
├─vg00-var 253:1 0 10G 0 lvm /var
└─vg00-home 253:2 0 837G 0 lvm /home
nvme1n1 259:1 0 894,3G 0 disk
├─nvme1n1p1 259:6 0 2M 0 part
├─nvme1n1p2 259:7 0 28G 0 part
│ └─md2 9:2 0 28G 0 raid1 /
├─nvme1n1p3 259:8 0 9,3G 0 part [SWAP]
└─nvme1n1p4 259:9 0 857G 0 part
└─md4 9:4 0 857G 0 raid1
├─vg00-usr 253:0 0 10G 0 lvm /usr
├─vg00-var 253:1 0 10G 0 lvm /var
└─vg00-home 253:2 0 837G 0 lvm /home
Information of df -h
:
Filesystem Size Used Avail Use% Mounted on
udev 32G 0 32G 0% /dev
tmpfs 6,3G 1,5M 6,3G 1% /run
/dev/md2 28G 536M 27G 2% /
/dev/vg00/usr 9,8G 2,6G 6,8G 28% /usr
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/mapper/vg00-var 9,8G 983M 8,4G 11% /var
/dev/mapper/vg00-home 824G 363M 790G 1% /home
/dev/loop0 100M 100M 0 100% /snap/core/11187
/dev/loop2 67M 67M 0 100% /snap/lxd/20840
/dev/loop1 67M 67M 0 100% /snap/lxd/20806
/dev/loop3 90M 90M 0 100% /snap/core/8268
/dev/loop4 62M 62M 0 100% /snap/core20/1026
tmpfs 6,3G 0 6,3G 0% /run/user/1000
You can see in the above information that the /home
directory is mounted to a partition of almost 900 GB size. I do not need raid1 for that part and I hope I could double that size for usage by removing raid1. That is my motivation. Any alternative to removing raid1 which allows me to double the size of the /home
is welcome.