Adjust some README files..

This commit is contained in:
2024-07-01 11:11:05 +02:00
parent 3c7531d016
commit 9113d8167c
4 changed files with 85 additions and 25 deletions

View File

@ -26,7 +26,7 @@ mdadm --manage /dev/md0 --run
# - Completely removing a mdadm raid array
# ---
## - # cat /proc/mdstat
## - # cat /proc/mdstat
## - Personalities : [raid1] [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid10]
## - md1 : active raid1 sda3[0] sdb3[1]
## - 80533504 blocks super 1.2 [2/2] [UU]
@ -98,16 +98,16 @@ update-initramfs -u -k all
## - !! IMPORTANT !!
## - make sure do format the md device NOT the devices included
## - in the array
## -
## -
## - Notice - Lazy Initialization:
## -
## - For creation of an ext4-filesystem, cleaning up (initializing) inode tables
## - For creation of an ext4-filesystem, cleaning up (initializing) inode tables
## - and also initializing journal file are needed. Eanabling lazy
## - initialization speeds up the creation, and do that after mounting first
## - time. This is enabled by default.
## -
## - to disable lazy initialation use:
## -
## -
## - mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/md0
## -
## - Die "-m" Option reserviert soviel Prozent (hier: 0 Prozent) des Speichers
@ -148,7 +148,7 @@ mdadm -r <md-device> <partition-device>
mdadm -a <md-device> <partition-device>
## - Raid Array ist im auto-read-only status
## -
## -
## - Ändern durch:
## -
mdadm --readwrite /dev/md<n>
@ -166,14 +166,74 @@ mdadm --monitor --test -1 </dev/md?>
mdadm -D </dev/md?>
# ---
# =====
# - MBR-Partitionstabelle sichern und wiederherstellen
# ---
# =====
## - Save partitiontable
## -
sfdisk -d /dev/sdb > partitions.sdb.txt
## - Rrestore partitiontable
## - Restore partitiontable
## -
cat partitions.sdb.txt | sfdisk /dev/sdb
## - oder
## -
sfdisk /dev/sdb < partitions.sdb.txt
# =====
# - Restore (replicate) partition table on /dev/sdb (defet device) from /dev/sda (undemaged device)
# =====
## - Replicate GPT partition scheme from /dev/sda to /dev/sdd (useful for RAID array rebuild)
## -
## - !! Faulty device: /dev/sdb !!
## -
sfdisk -d /dev/sda | sfdisk /dev/sdb
## - oder (force)
## -
sfdisk -d /dev/sda | sfdisk -f /dev/sdb
^^^^^^^^
faulty device
# =====
# - GPT Partitionstabelle sichern und wiederherstellen
# =====
## - Save partitiontable
## -
## - sgdisk --backup={/path/to/file} {/dev/device/here}
## -
sgdisk --backup=/root/partitions.sdg.txt /dev/sdg
## - Restore partitiontable
## -
## - sgdisk --load-backup={/path/to/file} {/dev/device/here}
## -
sgdisk --load-backup=/root/partitions.sdg.txt /dev/sdg
# =====
# - Restore (replicate) partition table on /dev/sdg (defet device) from /dev/sdd (undemaged device)
# =====
## - Replicate GPT partition scheme from /dev/sda to /dev/sdd (useful for RAID array rebuild)
## -
## - !! Faulty device: /dev/sdg !!
## -
sgdisk -R /dev/sdg /dev/sdd
^^
faulty device
## - Anschließend neue zufällig GUID vergeben
## -
sgdisk -G /dev/sdd