dd if=/dev/zero of=/tmp/disk/1 bs=1M seek=1023 count=1 &&
losetup /dev/loop1 /tmp/disk/1
| mdadm | -C /dev/mdN | --level=foo | --raid-devices=X | /dev/bar /dev/baz /dev/qux |
| Create /dev/mdN | Raid level foo | Total number of devices in the array | Devices to include in the array. 'missing' is a possible device |
mdadm -C /dev/md0 --level=raid1 --raid-devices=2 /dev/sda1 /dev/sdb1mdadm /dev/md0 -r /dev/sda1 to remove the failed device from the array, at which point you can deal with the failed hardwaremdadm /dev/md0 -a /dev/sda1 to add the fixed drive back.mdadm /dev/md0 --fail /dev/sda1 can be used to simulate a drive failure.--spare-devices=N option. For example, mdadm --create /dev/md1 --level=raid5 --raid-devices=3 --spare-devices=1 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1.mdadm /dev/md1 -a /dev/sde1.| Logical Volume Foo | Logical Volume Baz | Logical Volume Bar | |
| Volume Group One | |||
| Physical Volume md0 | Physical Volume md1 | Physical Volume md2 | Physical Volume md3 |
pvcreate /dev/md0vgcreate TriVG /dev/md0vgextend command.lvcreate -n lv01 -L 512M TriVGmkfs -j /dev/TriVG/lv01
/dev/[VG]/[LV], even if the underlying physical disk changes./etc and /var) should be stored separately.lvcreate command: lvcreate -s -n [New LV Name] -L [Space to allocate to changes] [VG]/[Source LV]vgreduce VolGroupFoo --removemissing.