apt-get update
apt-get upgrade
apt-get upgrade
apt-get dist-upgrade
apt-get install mdadm
modprobe raid1
(do not need to add to /etc/modules)
cat /proc/mdstat
fdisk -l
fdisk /dev/sdb
type fd (linux auto raid)
sfdisk -d /dev/sdb | sfdisk --force /dev/sdc
Remove previous RAID data if any:
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdc1
Create the array with missing disk
mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1
Create the array with both disk
mdadm --create /dev/md0 --level=1 --raid-disks=2 /dev/sdb1 /dev/sdc1
----------------------------------- (if using LVM stop here - continue to: https://sites.google.com/a/datafeedfile.com/code/proxmox/proxmoxrecreatelocalmd0lvm2basedsharedlocalfilesystem)
Create the filesystem
mkfs.ext4 /dev/md0
Double check to make sure all okay:
cat /proc/mdstat
Create mount target
mkdir /mnt/md0
chmod -R 777 /mnt/md0
Edit fstab
blkid
nano /etc/fstab
UUID=<UUID> /mnt/md0 ext4 defaults,noatime,nodiratime,noacl,data=writeback,barrier=0,nobh,errors=remount-ro 0 2
mount -a
reboot
It’s exhausting to find educated folks on this matter, however you sound like you already know what you’re talking about! Thanks casino blackjack
ReplyDelete