System Administration
Showing posts with label
Shell Scripting
.
Show all posts
Showing posts with label
Shell Scripting
.
Show all posts
Tuesday, August 18, 2015
Shell Script to create mirrors of Physical Volumes
#!/bin/sh
#******* DISK:
# create LVM mirrors for VolGroup
for x in `ls /dev/VolGroup`; do
lvconvert -m 1 /dev/VolGroup/$x `pvdisplay | grep "PV Name" | awk '{printf $3" "}'` &
if [ $? -ne 0 ]; then logError DISK: $x; fi
done
Older Posts
Home
Subscribe to:
Posts (Atom)