Score:0

Want to replace mdadm raid (with only 1 working drive left) with a new single - non raid drive

mr flag

I setup a brand new system a few months ago and chose to make it use a RAID. That consisted of a boot drive, and two identical drives for the raid.

The second of the identical raid drives died, so now my system is basically a single drive raid.

I want to move to keeping the boot drive (sda1) but replacing the other drive with a solid state drive.

My problem is that I just don't understand how the raid works and what is stored where.

This is what I have left:

Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: TOSHIBA DT01ACA1 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/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: Hitachi HDT72101 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: D44AD34E-AE8F-452A-A6B8-67950F5F2954

Device Start End Sectors Size Type /dev/sda1 2048 1050623 1048576 512M EFI System

Disk /dev/md0: 931.4 GiB, 1000069595136 bytes, 1953260928 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 Disklabel type: gpt Disk identifier: 85A80476-09FF-4D7C-8205-3289F645CA69

Device Start End Sectors Size Type /dev/md0p1 2048 1953253375 1953251328 931.4G Linux filesystem

My assumptions are

  1. /dev/sda1 is a disk on its own, handling booting
  2. /dev/sdb is the one remaining functional drive from the raid
  3. /dev/md0 is some sort of "shadow" drive that represents the now (1) disk wide raid, using /dev/sdb only now since the other drive died

This is the mdadm query result:

drool@rolath2:/home/felinicity/server$ sudo mdadm --query --detail /dev/md0 [sudo] password for drool: /dev/md0: Version : 1.2 Creation Time : Mon Jan 31 16:37:22 2022 Raid Level : raid1 Array Size : 976630464 (931.39 GiB 1000.07 GB) Used Dev Size : 976630464 (931.39 GiB 1000.07 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent

 Intent Bitmap : Internal

   Update Time : Tue Nov 15 18:00:48 2022
         State : clean, degraded
Active Devices : 1

Working Devices : 1 Failed Devices : 0 Spare Devices : 0

Consistency Policy : bitmap

          Name : ubuntu-server:0
          UUID : 2325d27a:bc0c11b5:9e1c5b30:0647ee03
        Events : 31895

Number   Major   Minor   RaidDevice State
   0       8       16        0      active sync   /dev/sdb
   -       0        0        1      removed

What is my easiest path toward using a solid state drive for either everything, or just to replace /dev/sdb and keep all the data on /dev/sdd?

I'm not against keeping the boot drive, staying with a 1 drive raid (which seems dumb), or adding a new larger SSDs and letting raid populate them and then removing the non-SSD drive.

I just dont want to build and install all the crap I've already loaded.

in flag
RAID1 works best when using identical storage devices, otherwise there are unused blocks (if you’re lucky) or serious degradation issues. If you are not wedded to the idea of RAID and do not have a pair of matching storage devices, it may be simpler to copy the data off the remaining RAIDed disk and then eliminate the `md0` device
Paul Coene avatar
mr flag
I am down with that, I just don't understand the relationship between the boot drive, md0 and my actual drive /dev/sdb. sbd doesn't even show up in the output of df. /dev/md0p1 seems to hold all the data - I assume this is a raid shim over the top of the raid drives. If I just copy everything off /dev/sdb somehow, how will the EFI boot drive learn about it?
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.