All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to break one full RAID-1 to two degraded RAID-1?
@ 2020-01-29  3:17 Ram Ramesh
  2020-01-29  4:09 ` Reindl Harald
  0 siblings, 1 reply; 9+ messages in thread
From: Ram Ramesh @ 2020-01-29  3:17 UTC (permalink / raw)
  To: Linux Raid

I have my entire debian 9.0 installation (root/usr/home etc) in two nvme 
RAID-1 mirror. Is it possible to break them in to two degraded arrays?

Specifically I want to do this.

 1. Break current debian 9 full RAID1 into two degraded RAID1 A & RAID1  B
 2. Boot only A and upgrade to debian 10 and make sure it works
 3. If it works, add B back into A and get Debian 10 in fully complete RAID1
 4. If it does not work, I boot B and add A back and get back debian 9
    in full working RAID1

Is this possible?

Ramesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-01-29  3:17 Is it possible to break one full RAID-1 to two degraded RAID-1? Ram Ramesh
@ 2020-01-29  4:09 ` Reindl Harald
  2020-01-29 22:32   ` Ram Ramesh
  0 siblings, 1 reply; 9+ messages in thread
From: Reindl Harald @ 2020-01-29  4:09 UTC (permalink / raw)
  To: Ram Ramesh, Linux Raid



Am 29.01.20 um 04:17 schrieb Ram Ramesh:
> I have my entire debian 9.0 installation (root/usr/home etc) in two nvme
> RAID-1 mirror. Is it possible to break them in to two degraded arrays?
> 
> Specifically I want to do this.
> 
> 1. Break current debian 9 full RAID1 into two degraded RAID1 A & RAID1  B
> 2. Boot only A and upgrade to debian 10 and make sure it works
> 3. If it works, add B back into A and get Debian 10 in fully complete RAID1
> 4. If it does not work, I boot B and add A back and get back debian 9
>    in full working RAID1

i would simply remove one disk completly and in case i want to keep the
upgraded system wipe it and resync afterwards or when i want back to the
old one put it back and wipe the modified

full resync, done

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-01-29  4:09 ` Reindl Harald
@ 2020-01-29 22:32   ` Ram Ramesh
  2020-01-30  6:30     ` Reindl Harald
  0 siblings, 1 reply; 9+ messages in thread
From: Ram Ramesh @ 2020-01-29 22:32 UTC (permalink / raw)
  To: Reindl Harald, Linux Raid

On 1/28/20 10:09 PM, Reindl Harald wrote:
>
> Am 29.01.20 um 04:17 schrieb Ram Ramesh:
>> I have my entire debian 9.0 installation (root/usr/home etc) in two nvme
>> RAID-1 mirror. Is it possible to break them in to two degraded arrays?
>>
>> Specifically I want to do this.
>>
>> 1. Break current debian 9 full RAID1 into two degraded RAID1 A & RAID1  B
>> 2. Boot only A and upgrade to debian 10 and make sure it works
>> 3. If it works, add B back into A and get Debian 10 in fully complete RAID1
>> 4. If it does not work, I boot B and add A back and get back debian 9
>>     in full working RAID1
> i would simply remove one disk completly and in case i want to keep the
> upgraded system wipe it and resync afterwards or when i want back to the
> old one put it back and wipe the modified
>
> full resync, done

Thanks. I thought of this, but both disk in question are nvme ssd with 
manually added heat sink. It will be a hassle to remove and reinstall. I 
think I will go with the back up rather than remove disk physically. I 
was just exploring if I can avoid back up by using one of the RAID1 
disks. After all, mirror just means that.

Regards
Ramesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-01-29 22:32   ` Ram Ramesh
@ 2020-01-30  6:30     ` Reindl Harald
  2020-01-30  7:27       ` Wols Lists
  0 siblings, 1 reply; 9+ messages in thread
From: Reindl Harald @ 2020-01-30  6:30 UTC (permalink / raw)
  To: Ram Ramesh, Linux Raid



Am 29.01.20 um 23:32 schrieb Ram Ramesh:
> On 1/28/20 10:09 PM, Reindl Harald wrote:
>>
>> Am 29.01.20 um 04:17 schrieb Ram Ramesh:
>>> I have my entire debian 9.0 installation (root/usr/home etc) in two nvme
>>> RAID-1 mirror. Is it possible to break them in to two degraded arrays?
>>>
>>> Specifically I want to do this.
>>>
>>> 1. Break current debian 9 full RAID1 into two degraded RAID1 A &
>>> RAID1  B
>>> 2. Boot only A and upgrade to debian 10 and make sure it works
>>> 3. If it works, add B back into A and get Debian 10 in fully complete
>>> RAID1
>>> 4. If it does not work, I boot B and add A back and get back debian 9
>>>     in full working RAID1
>> i would simply remove one disk completly and in case i want to keep the
>> upgraded system wipe it and resync afterwards or when i want back to the
>> old one put it back and wipe the modified
>>
>> full resync, done
> 
> Thanks. I thought of this, but both disk in question are nvme ssd with
> manually added heat sink. It will be a hassle to remove and reinstall. I
> think I will go with the back up rather than remove disk physically. 

why would you remove it phyiscally to remove it rom the array? seriously?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-01-30  6:30     ` Reindl Harald
@ 2020-01-30  7:27       ` Wols Lists
  2020-02-07  7:02         ` Ram Ramesh
  0 siblings, 1 reply; 9+ messages in thread
From: Wols Lists @ 2020-01-30  7:27 UTC (permalink / raw)
  To: Reindl Harald, Ram Ramesh, Linux Raid

On 30/01/20 06:30, Reindl Harald wrote:
>> Thanks. I thought of this, but both disk in question are nvme ssd with
>> > manually added heat sink. It will be a hassle to remove and reinstall. I
>> > think I will go with the back up rather than remove disk physically. 

> why would you remove it phyiscally to remove it rom the array? seriously?

Because if you physically remove it, BOTH disks will think they are the
surviving copy. You could "assemble" either disk on its own and recover
the array.

But if you remove a disk with --fail --remove, does that tamper with the
superblock? Would that prevent that disk being re-assembled on its own?
Seriously. I don't know. And were I in the OP's shoes I would be asking
the same question.

This is where you want something COW in the stack. Lvm. Btrfs. Where you
can just take a snapshot, upgrade the system, and if it all goes
pear-shaped you throw the snapshot away.

Cheers,
Wol

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-01-30  7:27       ` Wols Lists
@ 2020-02-07  7:02         ` Ram Ramesh
  2020-02-07  9:27           ` Wols Lists
  0 siblings, 1 reply; 9+ messages in thread
From: Ram Ramesh @ 2020-02-07  7:02 UTC (permalink / raw)
  To: Wols Lists, Reindl Harald, Linux Raid

I got no response on this and want to take a shot before going the 
backup way.

Assuming (hda1 and hdb1 in raid1 md0) Will the following work?

 1. Fail and remove hdb1
 2. Create new RAID1 md1 with hdb1 and missing
 3. dd md0 onto md1
 4. Make both bootable. (I suppose I need to change UUID of md1
    partitions. I suppose that is easy)
 5. Boot both and double check
 6. Now upgrade md0 without fear.
 7. Boot and test the new system for a couple of days to make sure
    everything is fine.
 8. If that fails, delete md0, and add hda1 to md1. If not delete md1
    and add hdb1 to md0

Regards
Ramesh

On 1/30/20 1:27 AM, Wols Lists wrote:
> On 30/01/20 06:30, Reindl Harald wrote:
>>> Thanks. I thought of this, but both disk in question are nvme ssd with
>>>> manually added heat sink. It will be a hassle to remove and reinstall. I
>>>> think I will go with the back up rather than remove disk physically.
>> why would you remove it phyiscally to remove it rom the array? seriously?
> Because if you physically remove it, BOTH disks will think they are the
> surviving copy. You could "assemble" either disk on its own and recover
> the array.
>
> But if you remove a disk with --fail --remove, does that tamper with the
> superblock? Would that prevent that disk being re-assembled on its own?
> Seriously. I don't know. And were I in the OP's shoes I would be asking
> the same question.
>
> This is where you want something COW in the stack. Lvm. Btrfs. Where you
> can just take a snapshot, upgrade the system, and if it all goes
> pear-shaped you throw the snapshot away.
>
> Cheers,
> Wol

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-02-07  7:02         ` Ram Ramesh
@ 2020-02-07  9:27           ` Wols Lists
  2020-02-07 14:49             ` Ram Ramesh
  0 siblings, 1 reply; 9+ messages in thread
From: Wols Lists @ 2020-02-07  9:27 UTC (permalink / raw)
  To: Ram Ramesh, Reindl Harald, Linux Raid

On 07/02/20 07:02, Ram Ramesh wrote:
> I got no response on this and want to take a shot before going the
> backup way.
> 
> Assuming (hda1 and hdb1 in raid1 md0) Will the following work?
> 
> 1. Fail and remove hdb1
> 2. Create new RAID1 md1 with hdb1 and missing
> 3. dd md0 onto md1

I wouldn't bother with any of the above. Just shut down and physically
remove a LIVE disk. That now is your backup.

In fact, this might be a good excuse to get a 3rd disk and either go
raid 5 or use it for backups.

> 4. Make both bootable. (I suppose I need to change UUID of md1
>    partitions. I suppose that is easy)

Yes it's easy. Yes it should have been done a LOOONG time ago.

> 5. Boot both and double check

They'll be degraded, so you might have to do a forced assembly to make
them run ...

> 6. Now upgrade md0 without fear.
> 7. Boot and test the new system for a couple of days to make sure
>    everything is fine.
> 8. If that fails, delete md0, and add hda1 to md1. If not delete md1
>    and add hdb1 to md0

Yup.
> 
> Regards
> Ramesh
> 
Cheers,
Wol

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-02-07  9:27           ` Wols Lists
@ 2020-02-07 14:49             ` Ram Ramesh
  2020-02-07 14:55               ` Reindl Harald
  0 siblings, 1 reply; 9+ messages in thread
From: Ram Ramesh @ 2020-02-07 14:49 UTC (permalink / raw)
  To: Wols Lists, Reindl Harald, Linux Raid

On 2/7/20 3:27 AM, Wols Lists wrote:
> On 07/02/20 07:02, Ram Ramesh wrote:
>> I got no response on this and want to take a shot before going the
>> backup way.
>>
>> Assuming (hda1 and hdb1 in raid1 md0) Will the following work?
>>
>> 1. Fail and remove hdb1
>> 2. Create new RAID1 md1 with hdb1 and missing
>> 3. dd md0 onto md1
> I wouldn't bother with any of the above. Just shut down and physically
> remove a LIVE disk. That now is your backup.
>
> In fact, this might be a good excuse to get a 3rd disk and either go
> raid 5 or use it for backups.

Wol, you forgot the history in this thread. I already said removing disk 
is no-no due to the way it is installed nvme with manual install of 
heatsync etc.

Also, I do not understand RAID5 statement. Not seem to be relevant to 
original idea. Also, I only have two nvme slots and no PCIE x4 left. May 
be you have some point that I am not understanding. Please elaborate, if 
you can.
>
>> 4. Make both bootable. (I suppose I need to change UUID of md1
>>     partitions. I suppose that is easy)
> Yes it's easy. Yes it should have been done a LOOONG time ago.
Not if you break md0 into degraded md0 and md1. grub.cfg need to be 
updated after that fact and UUID update is only doable after breakup. 
Again not sure if I am missing something important implied by LOONG in 
your answer.
>
>> 5. Boot both and double check
> They'll be degraded, so you might have to do a forced assembly to make
> them run ...
I converted from from single to raid1. So this process is already 
tested, but yes your point is well taken.
>> 6. Now upgrade md0 without fear.
>> 7. Boot and test the new system for a couple of days to make sure
>>     everything is fine.
>> 8. If that fails, delete md0, and add hda1 to md1. If not delete md1
>>     and add hdb1 to md0
> Yup.
>> Regards
>> Ramesh
>>
> Cheers,
> Wol
>
Thanks for taking the time. I just want to pass it by to make sure that 
I do not assume something and go to point of no return.

Regards
Ramesh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Is it possible to break one full RAID-1 to two degraded RAID-1?
  2020-02-07 14:49             ` Ram Ramesh
@ 2020-02-07 14:55               ` Reindl Harald
  0 siblings, 0 replies; 9+ messages in thread
From: Reindl Harald @ 2020-02-07 14:55 UTC (permalink / raw)
  To: Ram Ramesh, Wols Lists, Linux Raid



Am 07.02.20 um 15:49 schrieb Ram Ramesh:
>>> 4. Make both bootable. (I suppose I need to change UUID of md1
>>>     partitions. I suppose that is easy)
>> Yes it's easy. Yes it should have been done a LOOONG time ago.
> Not if you break md0 into degraded md0 and md1. grub.cfg need to be
> updated after that fact and UUID update is only doable after breakup.
> Again not sure if I am missing something important implied by LOONG in
> your answer

grub itself is installed before the RAID and there is no need to change
any UUID - you just spit out one of the disks from your RAID, work in
degraded mode and if everyhting goes wrong you boot with a recue media
and assemble that disk, zero the one with the damaged OS and resync

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-07 14:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29  3:17 Is it possible to break one full RAID-1 to two degraded RAID-1? Ram Ramesh
2020-01-29  4:09 ` Reindl Harald
2020-01-29 22:32   ` Ram Ramesh
2020-01-30  6:30     ` Reindl Harald
2020-01-30  7:27       ` Wols Lists
2020-02-07  7:02         ` Ram Ramesh
2020-02-07  9:27           ` Wols Lists
2020-02-07 14:49             ` Ram Ramesh
2020-02-07 14:55               ` Reindl Harald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.