[opensuse] Creating a software RAID 1 with one device? mdadm: option -t not valid in create mode.
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data. Solution: trying to create a "broken" RAID1 with mdadm on sdb1 and copy over the data. Mount the RAID 1 as /home to see if all works. Format sda1 (current /home) and join then the disk to the RAID1. Currently I am stuck already at the first step: With reference to: https://unix.stackexchange.com/questions/63928/can-i-create-a-software-raid-... I tried the proposed solution. The RAID1 should be EXT4. So: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing mkfs -text4 /dev/md0 But, when I try I get a (for me) surprising response from mdadm: mdadm: option -t not valid in create mode I am not aware that I am using an option -t in the command. So it is possible that I am commiting a syntax error. Can anybody help me out about what I am doing wrong? (All this is of course in su -) P.S. I tried with: no partition, partition sdb1 not formatted, partition sdb1 formatted already in EXT4. The answer is always the same. "option -t not valid in create mode". _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 19/07/2019 à 10:06, stakanov a écrit :
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data.
very bad idea. your home content is probably not 4Tb (else the disk would be too small), so backup it *first* a raid, any raid, is no backup at all. Even, make *two* backups if you home content is of any matter for you! then back to raid. is a similar situation, I used btrfs capacity of running self raid live. I know you may dislike btrfs, but in this situation it's a life saver (think of a disk getting bad). AFAIK you can convert ext4 to btrfs (but not the other way round) I could even *move* a root partition to a other disk using this. Basically, starting with a btrfs partition, you can *add* any other partition to the old one (aka give more room to data), then balance the data official info here: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Ad... jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data venerdì 19 luglio 2019 10:18:55 CEST, jdd@dodin.org ha scritto:
Le 19/07/2019 à 10:06, stakanov a écrit :
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data.
very bad idea. your home content is probably not 4Tb (else the disk would be too small), so backup it *first*
a raid, any raid, is no backup at all. Even, make *two* backups if you home content is of any matter for you!
then back to raid.
is a similar situation, I used btrfs capacity of running self raid live. I know you may dislike btrfs, but in this situation it's a life saver (think of a disk getting bad). AFAIK you can convert ext4 to btrfs (but not the other way round)
I could even *move* a root partition to a other disk using this.
Basically, starting with a btrfs partition, you can *add* any other partition to the old one (aka give more room to data), then balance the data
official info here:
https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Ad ding_new_devices
jdd Uh, RAID and btrfs .... I have some experience with xfs, with ext4 but the ones I have with btrfs are, if not to say negative, a bit "mitigated". I would in all cases prefer ext4. Now the fact of the backup, I have 750 GB free on the /home The 4 GB new will be in RAID 1 I do not own any disk large enough to backup all data. Only one user is backed up with really important data. The rest shall benefit from a higher security in case of hardware failure.
So the issue is: why the f. mdadm gives "option -t not valid in create mode". Provided that the command reported originally, is all in one line, and should work. So what does not work here? Of course I can try to do three backup disks with several users spread everywhere .... not very reliable either. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 19/07/2019 à 11:16, stakanov a écrit :
Uh, RAID and btrfs .... I have some experience with xfs, with ext4 but the ones I have with btrfs are, if not to say negative, a bit "mitigated".
the only problem I had was about partition size with snapshots
I would in all cases prefer ext4. Now the fact of the backup, I have 750 GB free on the /home
so more than 3Tb of data. simply rsync them to the 4Tb disk and disconnect it from the computer. If ever you need frequent sync, use a smaller disk with the time option. I personally have 3 >4Tb disks with one connected semi permanently (usb, switched off most of the time) and the two others rsynced from the first at various moments. the *only* interest of RAID is the time frame: the computer don't really stops when a disk is bad. BUT you have to get a spare disk to replace the faulty one ASAP, you are not protected from a AC surge that can destroy the two disks at once (as can do fire, thief or simply error I stopped with RAID when I noticed a RAID 1 (mirror) disk can't be read simply alone (on an other computer), it have to be seen as RAID. Possible, but not immediate. of course yo do what you want jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data venerdì 19 luglio 2019 11:40:42 CEST, jdd@dodin.org ha scritto:
Le 19/07/2019 à 11:16, stakanov a écrit :
Uh, RAID and btrfs .... I have some experience with xfs, with ext4 but the ones I have with btrfs are, if not to say negative, a bit "mitigated".
the only problem I had was about partition size with snapshots
I would in all cases prefer ext4. Now the fact of the backup, I have 750 GB free on the /home
so more than 3Tb of data. simply rsync them to the 4Tb disk and disconnect it from the computer. If ever you need frequent sync, use a smaller disk with the time option. I personally have 3 >4Tb disks with one connected semi permanently (usb, switched off most of the time) and the two others rsynced from the first at various moments.
the *only* interest of RAID is the time frame: the computer don't really stops when a disk is bad.
BUT you have to get a spare disk to replace the faulty one ASAP, you are not protected from a AC surge that can destroy the two disks at once (as can do fire, thief or simply error
I stopped with RAID when I noticed a RAID 1 (mirror) disk can't be read simply alone (on an other computer), it have to be seen as RAID. Possible, but not immediate.
of course yo do what you want
jdd Well with mdadm you should not be in the problem not to be able on another computer. That problem you have it instead when you use RAID from BIOS (softraidfunktion in mainboard. What happens is that the RAID will then depend from that very chipset. mdadm should survive a change of MB flawlessly.
For what is security: I had only one time a real bad experience, when a RAID 1 had a bad Disc that reappeared and vanished at times. This caused the /home to be written to some extend to one disk, then to the other. It can be avoided though by doing a regular scrub of the RAID so you will immediately discover imminent disk failure due to a hardware problem. Sure, an external 4 TB disk as regular backup would be nice and better. But, be honest, it would have to be 8TB or more, to be able to do at least some incremental backups. Otherwise you will have to loose a lot of time to rsync it regularly (and with rsync you can do a lot of things wrong). b) the "he is dead" argument: I simply do not have the money for that external disk. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 19/07/2019 à 12:11, stakanov a écrit :
b) the "he is dead" argument: I simply do not have the money for that external disk.
that's why we said: do the backup first. Of course, if you really need permanent access (no shutdown time), only raid can do that jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data venerdì 19 luglio 2019 13:09:06 CEST, jdd@dodin.org ha scritto:
Le 19/07/2019 à 12:11, stakanov a écrit :
b) the "he is dead" argument: I simply do not have the money for that external disk.
that's why we said: do the backup first.
Of course, if you really need permanent access (no shutdown time), only raid can do that
jdd Need.... I would do reference to a nice sentence we had in the office. "Technical breakdowns tend to manifest themselves in periods of critical need. So be nice and talk friendly to your machine".... If one disk really breaks it is sure that even with a backup, it is much safer to have also a RAID1. Now the critical data I back them up. Just not "all".
I would also need to convert to raid the kvm store I have created. But this is not really important, as I do not do valid work on it for now. That is a 2 TB disk by the way. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/07/2019 13.37, stakanov wrote:
In data venerdì 19 luglio 2019 13:09:06 CEST, jdd@dodin.org ha scritto:
Le 19/07/2019 à 12:11, stakanov a écrit :
b) the "he is dead" argument: I simply do not have the money for that external disk.
that's why we said: do the backup first.
Of course, if you really need permanent access (no shutdown time), only raid can do that
jdd Need.... I would do reference to a nice sentence we had in the office. "Technical breakdowns tend to manifest themselves in periods of critical need. So be nice and talk friendly to your machine".... If one disk really breaks it is sure that even with a backup, it is much safer to have also a RAID1. Now the critical data I back them up. Just not "all".
I would also need to convert to raid the kvm store I have created. But this is not really important, as I do not do valid work on it for now. That is a 2 TB disk by the way.
The order of preferables is: * one disk * better one disk with a backup * even better raid plus backup. Raid without backup is *baaaad*. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 19/07/2019 10.18, jdd@dodin.org wrote:
Le 19/07/2019 à 10:06, stakanov a écrit :
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data.
very bad idea. your home content is probably not 4Tb (else the disk would be too small), so backup it *first*
a raid, any raid, is no backup at all. Even, make *two* backups if you home content is of any matter for you!
Right. If you have two disks, the correct thing is to use one, and the other as offline backup. Ie, plug the disk, make a backup, remove the disk. If a mirror is wanted, then the correct thing is to have three disks. Two for the raid, another for external offline backup. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On Fri, 19 Jul 2019 10:18:55 +0200 "jdd@dodin.org" <jdd@dodin.org> wrote:
Le 19/07/2019 à 10:06, stakanov a écrit :
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data.
very bad idea. your home content is probably not 4Tb (else the disk would be too small), so backup it *first*
a raid, any raid, is no backup at all. Even, make *two* backups if you home content is of any matter for you!
then back to raid.
I agree with jdd. You can make a backup in the same space as the original simply by using rsync (or make multiple incremental backups in the same space using something like dirvish). That is a much more important and urgent use of your second disk than making a RAID mirror. Please reconsider. It will be very hard to resist saying 'we told you so' in the future :( -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/07/2019 10.06, stakanov wrote:
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data. Solution: trying to create a "broken" RAID1 with mdadm on sdb1 and copy over the data. Mount the RAID 1 as /home to see if all works. Format sda1 (current /home) and join then the disk to the RAID1.
Currently I am stuck already at the first step: With reference to: https://unix.stackexchange.com/questions/63928/can-i-create-a-software-raid-...
I tried the proposed solution. The RAID1 should be EXT4. So: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing mkfs -text4 /dev/md0 ................^
that's the -t But I don't see why you type that "missing mkfs -text4 /dev/md0", it is not in the instructions. Ah, it is in a reply post. It is wrong. It should be two lines, and the "missing" must be a comment or something I don't understand. It is possibly "-t ext4", an option to a second command, "mkfs -t ext4 ..." Can't be "-text4" because a single dash expects one letter, not a word. For a word option you would have to use a double dash, "--help" for instance.
But, when I try I get a (for me) surprising response from mdadm: mdadm: option -t not valid in create mode
I am not aware that I am using an option -t in the command. So it is possible that I am commiting a syntax error.
-- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data venerdì 19 luglio 2019 11:27:48 CEST, Carlos E. R. ha scritto:
On 19/07/2019 10.06, stakanov wrote:
Scope: I have two discs with 4 TB. One is used as home. I wish to run home on a RAID1. But I have no means to do a backup of all data. Solution: trying to create a "broken" RAID1 with mdadm on sdb1 and copy over the data. Mount the RAID 1 as /home to see if all works. Format sda1 (current /home) and join then the disk to the RAID1.
Currently I am stuck already at the first step: With reference to: https://unix.stackexchange.com/questions/63928/can-i-create-a-software-rai d-1-with-one-device
I tried the proposed solution. The RAID1 should be EXT4. So: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing mkfs -text4 /dev/md0
................^
that's the -t
But I don't see why you type that "missing mkfs -text4 /dev/md0", it is not in the instructions. Ah, it is in a reply post. It is wrong. It should be two lines, and the "missing" must be a comment or something I don't understand.
It is possibly "-t ext4", an option to a second command, "mkfs -t ext4 ..."
Can't be "-text4" because a single dash expects one letter, not a word. For a word option you would have to use a double dash, "--help" for instance.
But, when I try I get a (for me) surprising response from mdadm: mdadm: option -t not valid in create mode
I am not aware that I am using an option -t in the command. So it is possible that I am commiting a syntax error. Very nice. Thank you.
this actually to work: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 and creates the array. Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0 I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/ and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1 _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/07/2019 12.03, stakanov wrote:
In data venerdì 19 luglio 2019 11:27:48 CEST, Carlos E. R. ha scritto:
On 19/07/2019 10.06, stakanov wrote:
Very nice. Thank you.
this actually to work: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1
and creates the array.
It is possible the intention was (a single line): mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing -n, --raid-devices= Specify the number of active devices in the array. This, plus the number of spare devices (see below) must equal the number of component-devices (including "miss- ing" devices) that are listed on the command line for --create. Setting a value of 1 is probably a mistake and so requires that --force be specified first. A value of 1 will then be allowed for linear, multipath, RAID0 and RAID1. It is never allowed for RAID4, RAID5 or RAID6. This number can only be changed using --grow for RAID1, RAID4, RAID5 and RAID6 arrays, and only on kernels which provide the necessary support. That is, a raid with 2 componenents: one sdb1, the other is "missing".
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label.
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data venerdì 19 luglio 2019 12:13:52 CEST, Carlos E. R. ha scritto:
On 19/07/2019 12.03, stakanov wrote:
In data venerdì 19 luglio 2019 11:27:48 CEST, Carlos E. R. ha scritto:
On 19/07/2019 10.06, stakanov wrote: Very nice. Thank you.
this actually to work: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1
and creates the array.
It is possible the intention was (a single line):
mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing
-n, --raid-devices= Specify the number of active devices in the array. This, plus the number of spare devices (see below) must equal the number of component-devices (including "miss- ing" devices) that are listed on the command line for --create. Setting a value of 1 is probably a mistake and so requires that --force be specified first. A value of 1 will then be allowed for linear, multipath, RAID0 and RAID1. It is never allowed for RAID4, RAID5 or RAID6. This number can only be changed using --grow for RAID1, RAID4, RAID5 and RAID6 arrays, and only on kernels which provide the necessary support.
That is, a raid with 2 componenents: one sdb1, the other is "missing". Hum, maybe I will have to do it again then.
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label. That is? What label would I add. Why would you advice to add a lable?
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup.
As said: I do not have currently the money said but true. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data venerdì 19 luglio 2019 12:20:03 CEST, stakanov ha scritto:
In data venerdì 19 luglio 2019 12:13:52 CEST, Carlos E. R. ha scritto:
On 19/07/2019 12.03, stakanov wrote:
In data venerdì 19 luglio 2019 11:27:48 CEST, Carlos E. R. ha scritto:
On 19/07/2019 10.06, stakanov wrote: Very nice. Thank you.
this actually to work: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1
and creates the array.
It is possible the intention was (a single line):
mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing
-n, --raid-devices=
Specify the number of active devices in the array. This, plus the number of spare devices (see below) must equal the number of component-devices (including "miss- ing" devices) that are listed on the command line for --create. Setting a value of 1 is probably a mistake and so requires that --force be specified first. A value of 1 will then be allowed for linear, multipath, RAID0 and RAID1. It is never allowed for RAID4, RAID5 or RAID6. This number can only be changed using --grow for RAID1, RAID4, RAID5 and RAID6 arrays, and only on kernels which provide the necessary support.
That is, a raid with 2 componenents: one sdb1, the other is "missing".
Hum, maybe I will have to do it again then.
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label.
That is? What label would I add. Why would you advice to add a lable?
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup.
As said: I do not have currently the money said but true.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de Oh I see:https://unix.stackexchange.com/questions/310478/how-to-resize-and-label-raid...
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/07/2019 12.27, stakanov wrote:
In data venerdì 19 luglio 2019 12:20:03 CEST, stakanov ha scritto:
In data venerdì 19 luglio 2019 12:13:52 CEST, Carlos E. R. ha scritto:
...
Hum, maybe I will have to do it again then.
I don't know for sure. Possibly.
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label.
That is? What label would I add. Why would you advice to add a lable?
usually mkfs -t ext4 -L Eduardo /dev/md0 or afterwards: e2label /dev/md0 Eduardo
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup.
As said: I do not have currently the money said but true.
Then don't use raid. Seriously. Use a backup strategy instead. There are failure modes that can destroy data on both members of the array simultaneously. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data venerdì 19 luglio 2019 12:33:57 CEST, Carlos E. R. ha scritto:
On 19/07/2019 12.27, stakanov wrote:
In data venerdì 19 luglio 2019 12:20:03 CEST, stakanov ha scritto:
In data venerdì 19 luglio 2019 12:13:52 CEST, Carlos E. R. ha scritto: ...
Hum, maybe I will have to do it again then.
I don't know for sure. Possibly.
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label.
That is? What label would I add. Why would you advice to add a lable?
usually
mkfs -t ext4 -L Eduardo /dev/md0
or afterwards:
e2label /dev/md0 Eduardo
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup.
As said: I do not have currently the money said but true.
Then don't use raid. Seriously. Use a backup strategy instead.
There are failure modes that can destroy data on both members of the array simultaneously. Well, no, I checked it. I did everything right. Just the label missing.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data venerdì 19 luglio 2019 12:33:57 CEST, Carlos E. R. ha scritto:
On 19/07/2019 12.27, stakanov wrote:
In data venerdì 19 luglio 2019 12:20:03 CEST, stakanov ha scritto:
In data venerdì 19 luglio 2019 12:13:52 CEST, Carlos E. R. ha scritto: ...
Hum, maybe I will have to do it again then.
I don't know for sure. Possibly.
Then missing mkfs -text4 /dev/md0 creates the defective RAID1 with ext4 as /dev/md0
Yes. But add a label.
That is? What label would I add. Why would you advice to add a lable?
usually
mkfs -t ext4 -L Eduardo /dev/md0
or afterwards:
e2label /dev/md0 Eduardo
I then did mkdir /temporaryraid and then cp -ax /home /temporaryraid/
and it does it. I will then umount and logout, do the rest in root, mount / dev/md0 as home and start again the system. I all is well, I will the erase the original home and join the new/old hdd to be part of the RAID1
You need to purchase another disk for the backup.
As said: I do not have currently the money said but true.
Then don't use raid. Seriously. Use a backup strategy instead.
There are failure modes that can destroy data on both members of the array simultaneously.
O.K. I did lable it and did mount it by lable as /home Now I tried it and the data is there, all works. Config: sda with sda 1 boot efi sda 2 swap sda 3 root sdb with: sdb 1 part of MD0 sdc with sdc 1 kvmstorage sdd with: sdd1 old ext4 If I take of the partition of the old disk (currently now sdd 1 then I could do: sfdisk -d /dev/sdb | sfdisk /dev/sdd this should create an identical disk for the Md0 _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/07/2019 20.10, stakanov wrote:
In data venerdì 19 luglio 2019 12:33:57 CEST, Carlos E. R. ha scritto:
If I take of the partition of the old disk (currently now sdd 1 then I could do:
sfdisk -d /dev/sdb | sfdisk /dev/sdd this should create an identical disk for the Md0
Beware if it creates the same labels and identifiers. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 07/19/2019 03:06 AM, stakanov wrote:
I tried the proposed solution. The RAID1 should be EXT4. So: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing mkfs -text4 /dev/md0
Those are TWO different commands: (1) create the single drive array: mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb1 missing (2) create the filesystem on the array: mkfs -t ext4 /dev/md0 No wonder mdadm said there is no -t option. So if you are creating the array, do what you are doing, create the first array with a 'missing' disk. Copy all data to that array (make sure it will assemble, etc..). Then pull the current drive and boot from the array. When that is working fine, partition the current drive exactly like the disk in the array and create the filesystems. Then connect the freshly formatted drive and use mdadm --re-add to add the drive in place of the 'missing' drive. mdadm will automatically start syncing the drives. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
jdd@dodin.org
-
stakanov