User Tools

Site Tools


utils_raid_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
utils_raid_setup [2020/05/20 07:01]
xavier created
utils_raid_setup [2020/05/20 07:36] (current)
xavier
Line 8: Line 8:
  
 Create RAID 5 array:\\ Create RAID 5 array:\\
-''​mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /​dev/​sde''​\\+''​mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /​dev/​sde''​\\ 
 + 
 +Check the array exists:\\ 
 +''#​ cat /​proc/​mdstat''​\\ 
 +''#​ mdadm --detail /​dev/​md0''​\\ 
 +=> there is an initial phase of reconstruction when an array is created. It is supposedly functional during this time.\\ 
 + 
 +Make the array a LVM Physical Volume (so it can be used by LVM):\\ 
 +''#​ pvcreate /​dev/​md0''​\\ 
 +=> That takes time!\\ 
 + 
 +Check result:\\ 
 +''#​ pvs''​\\ 
 +''#​ pvdisplay''​\\ 
 + 
 +Define a LVM Volume Group consisting of the array (usually on several disks, but we already packed them with RAID so it's just one '​drive'​):​\\ 
 +''#​ vgcreate vg_data /​dev/​md0''​\\ 
 +==> takes time as well!\\ 
 + 
 +Check result:\\ 
 +''#​ vgdisplay vg_data''​\\ 
 + 
 +Create LVM Volumes on the Volume Group:\\ 
 +''#​ lvcreate -n vol_perso_data -L 350G vg_data''​\\ 
 +=> use -l instead to give % of available space\\ 
 + 
 +Check result:\\ 
 +''#​ lvs''​\\ 
 +''#​ lvdisplay''​\\ 
 + 
 +We can now use the new Volumes as we would use normal disks!\\ 
 +Access is done through ''/​dev/​vg_data/​vol_*''​\\ 
 + 
 +For example, to create ext4 partitions:​\\ 
 +''#​ mkfs.ext4 /​dev/​vg_data/​vol_music''​\\ 
utils_raid_setup.1589958090.txt.gz · Last modified: 2020/05/20 07:01 by xavier