We use cookies to ensure you get the best experience on our website.
Instalacja
apt install mdadm
Sprawdzenie Macierzy
root@chris:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc[1] sdb[0]
5237760 blocks super 1.2 [2/2] [UU]
[==>..................] resync = 11.4% (600960/5237760) finish=0.3min speed=200320K/sec
unused devices: <none>
root@chris:~# lsblk
sda 8:16 0 6.4G 0 disk
└─md0 9:127 0 6.4G 0 raid1 /mnt/raid
sdb 8:32 0 6.4G 0 disk
└─md0 9:127 0 6.4G 0 raid1 /mnt/raid
Tworzenie RAID 0
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb
Tworzenie RAID 1
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb
Create and Mount the Filesystem
# Tworzenie systemu plików na macierzy
mkfs.ext4 -F /dev/md0
# Tworzenie Punktu montowania
mkdir -p /mnt/md0
# Montowanie
mount /dev/md0 /mnt/md0
Wyszukaj ARRAY
mdadm --detail --scan
root@chris:~# mdadm --detail --scan
ARRAY /dev/md/XXX:0 metadata=1.2 name=XXXX:0 UUID=XXX:TTTTT:DDDDD:XXX
root@chris:~#
root@chris:~# mdadm --detail /dev/md
md/ md0
root@chris:~# mdadm --detail /dev/md/raspberrypi\:0
/dev/md/md0:0:
Version : 1.2
Creation Time : Sat Dec 14 01:13:31 2024
Raid Level : raid1
Array Size : X (6.37 GiB 10.00 GB)
Used Dev Size : X (6.37 GiB 10.00 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Dec 16 16:16:16 2022
State : clean, resyncing
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Resync Status : 97% complete
Name : XXX:0
UUID : XXXX:0 UUID=XXX:TTTTT:DDDDD:XXX
Events : 108220
Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sda
1 8 32 1 active sync /dev/sdb
root@chris:~# mdadm --detail /dev/md0
Cześć Podróżniku!
Ta strona ma nie być typowym poradnikiem w IT, Głównym jej cel to zapisanie krótkich notatek, które mogą się przydać w codziennym życiu podczas korzystania/konfiguracji różnych urządzeń np. Ustawienia DHCP na Routerze Cisco, Ustawieniu Karty sieciowej na Linuxie itp.
Wszelkie prawa zastrzeżone
Dodaj komentarz