Child pages
  • Multiple devices (md, software RAID)
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Preparing a RAID system of 2 disks and 2 partitions

Create the partitions

fdisk /dev/sdb

  • p check the partition table
  • n create partition (ex +128M)
  • t filesystem
  • a bootflag
  • w write 

Set the RAID1 system on the 2 partitions

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1

mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdb2 /dev/sdc2

 

Check the RAID-DEVICES

cat /proc/mdstat

 

Make the file system

mkfs.ext3 /dev/md0

mkfs.ext4 /dev/md1

 

Mount the disks

mkdir /mnt/md0

mkdir /mnt/md1

mount /dev/md0 /mnt/md0/

mount /dev/md1 /mnt/md1/

 

Copy the data of Home

cd /home

tar c * | tar x -C /mnt/md1

 

Find the UUID of the 1st partition

blkid

/dev/md1: UUID="3968404e-6571-4671-a157-9113a9f2fcba" TYPE="ext4"

 

Make md1 be the home directory

emacs /etc/fstab

# /home was on /dev/sda9 during installation

UUID=3968404e-6571-4671-a157-9113a9f2fcba /home ext3 defaults 0 2  

  • No labels