cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid1 sdc1[3] sdd1[2]
1953382471 blocks super 1.2 [2/2] [UU]
bitmap: 0/15 pages [0KB], 65536KB chunk
unused devices: <none>
# mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Sat Nov 25 16:57:03 2017
Raid Level : raid1
Array Size : 524156928 (499.88 GiB 536.74 GB)
Used Dev Size : 524156928 (499.88 GiB 536.74 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Fri Apr 5 22:41:32 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Name : Pharaon:2 (local to host Pharaon)
UUID : 555dfe0a:d88d6c19:58de0652:ec1c80ff
Events : 2668
Number Major Minor RaidDevice State
0 8 35 0 active sync /dev/sdc3
1 8 51 1 active sync /dev/sdd3
/usr/share/mdadm/checkarray --all --fast checkarray: I: check queued for array md1. checkarray: I: selecting high I/O scheduling class and 0 niceness for resync of md1.
mdadm --wait /dev/md1
mdadm --grow /dev/md1 --bitmap internal
mdadm --grow /dev/md1 --bitmap none
#mdadm --stop /dev/md2 mdadm: stopped /dev/md2
#mdadm --assemble --scan mdadm: /dev/md/1 has been started with 2 drives.
#mdadm -f /dev/md1 /dev/sdc1 mdadm: set /dev/sdc1 faulty in /dev/md1
#mdadm -r /dev/md1 /dev/sdc1 mdadm: hot removed /dev/sdc1 from /dev/md1
#mdadm --add /dev/md1 /dev/sdd1 mdadm: re-added /dev/sdd1
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm --create /dev/md0 -c 128 -l 1 -n 2 /dev/sdb1 missing
mkfs.ext3 /dev/md0
# init 1 # mkdir /tmp/newroot # mount /dev/md0 /tmp/newroot # cp -p -P /[slozka] /tmp/newroot/
# ls / > /tmp/xx ... odstranil z xx nechtene slozky ... # for i in `cat /tmp/xx`; do cp -p -P /$i /tmp/newroot/; done
mkdir /tmp/newroot/proc mkdir /tmp/newroot/sys mkdir /tmp/newroot/dev mkdir /tmp/newroot/tmp ... u tmp se musi pridat sticky bit ..
dpkg-reconfigure grub-pc
mdadm /dev/md0 -a /dev/sdb
CONFIG_EFI=y CONFIG_FB_EFI=y CONFIG_EFI_VARS=m CONFIG_EFI_PARTITION=y
Disk /dev/sdc: 3907029168 sectors, 1.8 TiB Logical sector size: 512 bytes Disk identifier (GUID): 264269A5-E3C2-404D-8BC2-35EE099743AB Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 2726299647 1.3 TiB FD00 Linux RAID 2 2726299648 2726301695 1024.0 KiB EF00 EFI System 3 2726301696 2726506495 100.0 MiB FD00 Linux RAID 4 2726506496 3041079295 150.0 GiB 0700 Microsoft basic data 5 3041079296 3907029134 412.9 GiB 0700 Microsoft basic data
mdadm --create /dev/md1 -l1 -n2 /dev/sdc1 missing
mdadm --examine --scan >> /etc/mdadm/mdadm.conf
mkfs.ext4 /dev/md1
init 1 mkdir /tmp/old mkdir /tmp/new mount -o ro,remount / mount -o ro /dev/md0 /tmp/old mount /dev/md1 /tmp/new rsync -a /tmp/old/* /tmp/new
init 1 mkdir /tmp/old mkdir /tmp/new mount -o ro,remount / mount -o ro /dev/md0 /tmp/old mount /dev/md1 /tmp/new
mount -t proc proc /tmp/new/proc mount -t sysfs sys /tmp/new/sys mount -o bind /dev /tmp/new/dev chroot /tmp/new
apt-get purge grub* apt-get install grub-efi
mkfs.vfat /dev/sdc2
grub-install /dev/sdc
mount /dev/sdc2 /boot/efi cp /boot/efi/efi/debian/grubx64.efi /boot/efi/efi/boot/bootx64.efi
ls
ls (md/1)/
set root=(md/1)
linux /boot/vmlinuz root=/dev/md0 ro
insmod efi_gop insmod efi_uga insmod font insmod gfxterm set gfxmode=auto set gfxpayload=keep terminal_output gfxterm
boot
grub rescue> set prefix=(hd0,1)/boot/grub grub rescue> set root=(hd0,1) grub rescue> insmod normal grub rescue> normal grub rescue> insmod linux grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 grub rescue> initrd /boot/initrd.img-3.13.0-29-generic grub rescue> boot
efibootmgr -v grub-install /dev/sda
apt-get install initramfs-tools Nastavuji balík busybox (1:1.20.0-8.1) … Nastavuji balík libklibc (2.0.1-3.1) … Nastavuji balík klibc-utils (2.0.1-3.1) … Nastavuji balík initramfs-tools (0.113) …
make menuconfig Device Drivers ---> Block Devices ---> <*> RAM block device support General setup ---> <*> Initial RAM filesystem and RAM disk (initramfs/initrd) support
/etc/initramfs-tools/modules ... md raid1 ext4 mkinitramfs -o /boot/initrd.img-3.4.8-ng
* rval, ze mu chybi console-setup.. tak nainstalujeme :)
apt-get install console-setup navic instaloval console-setup-linux
EFI/Boot/bootx64.efi
/debian/grubx64.efi
/Microsoft/Boot/...
bootmgfw.efi
bootmgr.efi
...
memtest.efi
menuentry "Windows Boot Manager (UEFI on /dev/sda5)" --class windows --class os {
insmod part_gpt
insmod fat
set root='(hd2,gpt5)'
search --no-floppy --fs-uuid --set=root 6C5E-8A91
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Number Start (sector) End (sector) Size Code Name 1 2048 2726299647 1.3 TiB FD00 Linux RAID 2 2726299648 2726301695 1024.0 KiB 8300 Linux filesystem 3 2726301696 3670020095 450.0 GiB 0700 Microsoft basic data 4 3670020096 3670634495 300.0 MiB 2700 Basic data partition 5 3670634496 3670839295 100.0 MiB EF00 EFI system partition 6 3670839296 3671101439 128.0 MiB 0C01 Microsoft reserved part 7 3671101440 3907028991 112.5 GiB 0700 Basic data partition
umount /mnt/oldroot
mdadm --stop /dev/md2 mdadm: stopped /dev/md2
umount /dev/md1
mdadm -f /dev/md1 /dev/sdc1 mdadm: set /dev/sdc1 faulty in /dev/md1
mdadm -r /dev/md1 /dev/sdc1 mdadm: hot removed /dev/sdc1 from /dev/md1
gdisk /dev/sdc
mdadm --add /dev/md1 /dev/sdc1 mdadm: re-added /dev/sdc1
mdadm --grow /dev/md1 --bitmap none
mdadm --grow /dev/md1 --size max mdadm: component size of /dev/md1 has been set to 1953382471K
mdadm --wait /dev/md1
mdadm --grow /dev/md1 --bitmap internal mdadm: failed to set internal bitmap.
dadm --stop /dev/md1 mdadm: stopped /dev/md1
mdadm --assemble --scan mdadm: /dev/md/1 has been started with 2 drives.
resize2fs /dev/md1 resize2fs 1.44.5 (15-Dec-2018) Systém souborů v /dev/md1 je připojen do /mnt/data, požadována změna velikosti za běhu. old_desc_blocks = 82, new_desc_blocks = 117 Systém souborů na /dev/md1 je nyní 488345617 (4k) bloků dlouhý.