Browse Source

establishing RAID1

dev
Christian Rotzoll 6 years ago
parent
commit
0f1a0b0fa8
  1. 6
      home.admin/config.scripts/blitz.datadrive.sh

6
home.admin/config.scripts/blitz.datadrive.sh

@ -104,13 +104,13 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# mount the BTRFS drive
echo "Mounting under /mnt/data ..."
sudo mkdir -p /mnt/data
sudo mount /dev/sdb1 /mnt/data
sudo mount /dev/${dev1} /mnt/data
echo "OK"
echo ""
# adding the second device
echo "Adding the second device as RAID1 .."
sudo btrfs device add -f /dev/sdc /mnt/data
sudo btrfs device add -f /dev/${dev2} /mnt/data
sudo btrfs filesystem balance start -dconvert=raid1 -mconvert=raid1 /mnt/data
echo ""
exit 0
@ -129,7 +129,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
sudo btrfs filesystem show /mnt/data
sudo btrfs filesystem df /mnt/data
sudo umount /mnt/data
exit 0

Loading…
Cancel
Save