Hello
I have existing Debian system and and I'm trying to put it in a RAID-1 array. The current system runs on a 120 gb SSD storage (sda) device and a 2 TB hard drive (sdc).I added a additional 120 gb SSD (sdb) and a 2 TB hard drive (sdd).
In the first step, I copied the partitions:
sfdisk -d /dev/sda | sfdisk /dev/sdb
sfdisk -d /dev/sdc | sfdisk /dev/sdd
After that I tried to create an mdadm array:
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
after this command mdadm answers me:
mdadm: cannot open /dev/sdb : Device or resource busy
Where do I make a mistake ?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to add software RAID-1 to an existing system?
-
- Posts: 932
- Joined: 2020-05-03 14:16
- Has thanked: 7 times
- Been thanked: 68 times
Re: How to add software RAID-1 to an existing system?
The devices and/or partitions must not be mounted during creation of the RAID array
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
The_full_story and Nothing_have_changed
- eriefisher
- Posts: 130
- Joined: 2008-06-04 03:49
- Location: Ontario's South Coast
Re: How to add software RAID-1 to an existing system?
____________________________________________
There's a manual?
Siduction
Debian Sid
Xfce4 4.14
There's a manual?
Siduction
Debian Sid
Xfce4 4.14
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: How to add software RAID-1 to an existing system?
Wrong title. You do not want to add sofware RAID but convert the system to RAID 1. Much harder.
Be happy. If the mdadm command had completed without error, it would have overwritten your system.
Method 1:
- backup data
- réinstall system with RAID
- restore data
Method 2:
- backup system and data
- create RAID arrays
- restore system and data
Method 3 (the dangerous one):
- create degraded RAID arrays on the new disks
- copy system and data to the RAID arrays (adjusting fstab an so on as required)
- reinstall/update the boot loader to boot from the RAID array
- reboot on the RAID system
- add the original disks to the RAID arrays
Be happy. If the mdadm command had completed without error, it would have overwritten your system.
Method 1:
- backup data
- réinstall system with RAID
- restore data
Method 2:
- backup system and data
- create RAID arrays
- restore system and data
Method 3 (the dangerous one):
- create degraded RAID arrays on the new disks
- copy system and data to the RAID arrays (adjusting fstab an so on as required)
- reinstall/update the boot loader to boot from the RAID array
- reboot on the RAID system
- add the original disks to the RAID arrays