Re: how to replace a disk in a raid-1 array by a larger one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 05/08/2021 11:35, François Patte wrote:

Bonjour,

I have a raid-1 array of 2 disks (1 Tb) and I want to replace these disks by 2 2Tb disks.

Here is the result of lsblk for these disks:

sde                         8:64   0 931,5G  0 disk
├─sde1                      8:65   0    40G  0 part
│ └─md4                     9:4    0    40G  0 raid1
│   ├─systeme-swap        253:1    0     4G  0 lvm   [SWAP]
│   ├─systeme-var         253:2    0    15G  0 lvm   /var
│   └─systeme-chiffre     253:3    0    15G  0 lvm
└─sde2                      8:66   0 891,5G  0 part
  └─md5                     9:5    0 891,4G  0 raid1
    └─data-home           253:5    0   891G  0 lvm   /home
sdf                         8:80   0 931,5G  0 disk
├─sdf1                      8:81   0    40G  0 part
│ └─md4                     9:4    0    40G  0 raid1
│   ├─systeme-swap        253:1    0     4G  0 lvm   [SWAP]
│   ├─systeme-var         253:2    0    15G  0 lvm   /var
│   └─systeme-chiffre     253:3    0    15G  0 lvm
└─sdf2                      8:82   0 891,5G  0 part
  └─md5                     9:5    0 891,4G  0 raid1
    └─data-home           253:5    0   891G  0 lvm   /home

My idea is to stop the array, remove one disk and have this array in degraded mode with the other disk. Then plug a new disk (2Tb) on which I build a new array in degraded mode with all partitions and lvm needed. Then I transfer all the data from the remaining 1Tb disk to the new array, replace the 1Tb disk by a new 2Tb disk and then synchronize the new array.

Is it the good way to proceed? Or is there another better way?

Thank you for all advices.


I imagine you might have your own reasons. I would, just I have been doing for long time, leave it all to LVM(which underneath as far as I know uses "md" for raid, at least it some cases). That way you have just one business logic to deal with, to manage, thus much lower TCO. (lvm2 has, in my opinion, fantastic man pages)
choose your PVs, create VG(s) and as an example:
$ -> lvcreate --type raid0 -i 4 -I 16 -n 0 -l 90%pv dellH200.InternalB /dev/sd{c..f}
and so on...
If you can, turn the situation into an opportunity to "migrate".

cheers, L

--
François Patte
UFR de mathématiques et informatique
Laboratoire MAP5 --- UMR CNRS 8145
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)1 4286 2145
http://www.math-info.univ-paris5.fr/~patte <http://www.math-info.univ-paris5.fr/~patte>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux