Aktiv/Passive-Cluster
Version vom 5. Februar 2019, 20:30 Uhr von Ktsadmin (Diskussion | Beiträge) (→Root-Partition vergrößern)
Grundinstallation
Bei Strato den Punkt Mein Server/Neuinstallation auswählen und dann den Installationsassistent starten.
| Nutzungszweck: | Experteneinsatz |
| Betriebssystem: | CentOS 7 64bit |
| Sprache: | deutsch |
| Partitionierung: | minimal (/boot 1GB, swap 8GB, / 20GB) |
Dann die Neuinstallation durch setzen des Hakens starten.
Root-Partition vergrößern
Das System im Rescue-Modus über die Strato-Oberfläche starten. Nach der Anmeldung als root, die bestehende Raid-Devices starten.
root@h2814988:~# mdadm -A --scan
root@h2814988:~# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md126 : active raid1 sda1[0] sdb1[1]
1023936 blocks super 1.0 [2/2] [UU]
md127 : active raid1 sda3[0] sdb3[1]
20479872 blocks super 1.0 [2/2] [UU]
unused devices: <none>
Anzeige der Information über das Raid.
root@h2814988:~# mdadm -D /dev/md127
/dev/md127:
Version : 1.0
Creation Time : Mon Feb 4 21:34:05 2019
Raid Level : raid1
Array Size : 20479872 (19.53 GiB 20.97 GB)
Used Dev Size : 20479872 (19.53 GiB 20.97 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Tue Feb 5 19:07:19 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : h2814988:1 (local to host h2814988)
UUID : a48d1ffe:267e9e65:2bd0b927:2fee1978
Events : 4
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 19 1 active sync /dev/sdb3
Nun mit fdisk die Partitonstabelle der beiden Festplatten ändern.
root@h2814988:~# fdisk /dev/sda
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1-3, default 3): 3
Partition 3 has been deleted.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (10049536-3907029167, default 10049536):
Last sector, +sectors or +size{K,M,G,T,P} (10049536-3907029167, default 3907029167): +100G
Created a new partition 3 of type 'Linux' and of size 100 GiB.
Command (m for help): t
Partition number (1-3, default 3): 3
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
root@h2814988:~# partprobe
und zum Schluß das Raid verhrößern
root@h2814988:~# mdadm --grow /dev/md127 --size=max --assume-clean
mdadm: component size of /dev/md127 has been set to 104857524K
unfreeze
root@h2814988:~# mdadm -D /dev/md127
/dev/md127:
Version : 1.0
Creation Time : Mon Feb 4 21:34:05 2019
Raid Level : raid1
Array Size : 104857524 (100.00 GiB 107.37 GB)
Used Dev Size : 104857524 (100.00 GiB 107.37 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Tue Feb 5 19:10:00 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : h2814988:1 (local to host h2814988)
UUID : a48d1ffe:267e9e65:2bd0b927:2fee1978
Events : 6
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 19 1 active sync /dev/sdb3
Repositories
Zuerst zusätzliche Repositories hinzufügen und das System updaten.
yum -y update