LVM: Unterschied zwischen den Versionen

Aus SchnallIchNet
Wechseln zu: Navigation, Suche
Zeile 41: Zeile 41:
  
 
  cat /proc/mdstat output
 
  cat /proc/mdstat output
 
+
Sync both raid-partitions:
+
Sync both raid-partitions:
--------------------------
+
--------------------------
Personalities : [raid1]
+
Personalities : [raid1]
md0 : active raid1 sdb5[1] sda5[0]
+
md0 : active raid1 sdb5[1] sda5[0]
 
       155999040 blocks [2/2] [UU]
 
       155999040 blocks [2/2] [UU]
  
unused devices: <none>
+
unused devices: <none>
  
###
+
###
  
One raid-partition missing:
+
One raid-partition missing:
---------------------------
+
---------------------------
Personalities : [raid1]
+
Personalities : [raid1]
md0 : active raid1 sda5[0]
+
md0 : active raid1 sda5[0]
 
       155999040 blocks [2/1] [U_]
 
       155999040 blocks [2/1] [U_]
  
unused devices: <none>
+
unused devices: <none>

Version vom 6. September 2008, 07:37 Uhr

TODO: mach et schoener... ;-)

lvcreate -L 10G -n <name (z.b. usr)> <vol-group (z.b. main)>

--> don't forget to:

 mkfs.ext3 /dev/<vol-grp>/<name>

z.b.:

mkfs.ext3 /dev/main/usr

vgdisplay (zeige volume-group an -> verbleibender/benutzter speicher etc.) vgdisplay [vol-group (z.b. main)]


lvm vergroessern

lvextend -L +100G /dev/vg1/home

danach das filesystem vergroessern...

resize2fs /dev/mapper/vg1-home

oder

resize2fs /dev/vg1/home


Platte austauschen

ACHTUNG: bei platten die bereits als raid in benutzung waren: das magig-flag am anfang der raid-partition muss ueberschrieben werden!

dd if=/dev/zero of=/dev/sdb5 bs=1024 count=1000

Partitionstabelle auf neue sdb uebertragen:

sfdisk -d /dev/sda | sfdisk /dev/sdb

raid-partition zu md0 hinzufuegen

mdadm /dev/md0 -a /dev/sdb5

replication abwarten:

watch cat /proc/mdstat



States of LVM-Raid

cat /proc/mdstat output

Sync both raid-partitions:
--------------------------
Personalities : [raid1]
md0 : active raid1 sdb5[1] sda5[0]
     155999040 blocks [2/2] [UU]
unused devices: <none>
###
One raid-partition missing:
---------------------------
Personalities : [raid1]
md0 : active raid1 sda5[0]
     155999040 blocks [2/1] [U_]
unused devices: <none>