- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to list mirrors of dirves
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2004 12:57 PM
10-03-2004 12:57 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2004 01:04 PM
10-03-2004 01:04 PM
Solution# lvdisplay /dev/vg00/lvol10
--- Logical volumes ---
LV Name /dev/vg00/lvol10
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 504
Current LE 63
Allocated PE 126
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2004 01:51 PM
10-03-2004 01:51 PM
Re: How to list mirrors of dirves
Mirroring is performed with the lvextend command using the -m option.
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2004 02:57 PM
10-03-2004 02:57 PM
Re: How to list mirrors of dirves
you will see mirrored drives for /stand,/root,swap,dump.
and as stated earlier do lvdisplay -v /dev/vg00/lvol10 | more
I hope this helps...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2004 06:04 PM
10-03-2004 06:04 PM
Re: How to list mirrors of dirves
If you want to see wheather mirroring is proper or not (fully sync or not) use below command
lvdisplay -v /dev/vgnn/lvolmm |grep stale |wc -l
Output of this command should be zero if volume is fully syncronise.
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 12:41 AM
10-04-2004 12:41 AM
Re: How to list mirrors of dirves
# cat chkstaledsks
#!/bin/sh
# Identifies and displays stale extends on all system volume groups.
# Useful to determine defect harddisks in mirrored enviroments
# Geoff Wild
vgdisplay -v | awk '/LV Name/ { print $3 }' | xargs lvdisplay -v | grep -i -e "lv name" -e "lv status" -e stale -e '?'
# cat chkdisks
#! /bin/sh
# Check the status of HP disks. i
# Currently this just checks for mirrored disks. Even this is not complete;
# while the script does verify that logical volumes are mirrored to different
# disks, it does not verify that logical volumes are mirrored across
# controllers.
VERBOSE=0
while getopts g:v flag
do
case $flag in
v)
VERBOSE=1
;;
*)
print "Usage: `basename $0` [-v] [vgs]"
print "\tIf no VGs are listed all will be checked."
exit 1
;;
esac
done
shift $((OPTIND -1))
VGs="$*"
TMPF=/tmp/lv.out.$$
trap "rm -f $TMPF; exit 1" 1 2 3 15
# First, print the headers. I should have a flag to suppress this.
printf "%-30s\t%-35s %-10s\n" "Logical Volume" Filesystem "Mirrored?"
printf "%-30s\t%-35s %-10s\n" "--------------" ---------- ---------
# First, generate the list of volume groups.
ALLVGs=`/usr/sbin/vgdisplay 2>/dev/null | grep 'VG Name' |\
awk '{print $3}' | sed 's,/dev/,,'`
VGs=${VGs:-$ALLVGs}
for vg in $VGs
do
LVs=`/usr/sbin/vgdisplay -v $vg | grep 'LV Name' | awk '{print $3}'`
for lv in $LVs
do
# Yuck, there has got to be a better way to do an
# anchored search. Yet I don't want to use perl.
str=`echo $lv | sed 's,/,.,g'`
fs=`awk '$1 ~ /^'$str'$/ {print $2}' /etc/mnttab`
# Check for mirrored disks. This is more complicated than
# I thought. There are cases where the LEs are mirrored to
# PEs on the same disks.
ismirr="no" # assume not mirrored
reason="" # but no reason
/usr/sbin/lvdisplay -v $lv > $TMPF
nummirr=`grep 'Mirror copies' $TMPF | awk '{print $3}'`
if [ $nummirr -gt 0 ]
then
# Check for volumes mirrored on the same disk,
# that is, where the number of PEs is more than
# the number of LEs.
badLEs=`grep '^ */dev/' $TMPF | awk '$2!=$3 {print $0}'`
if [ "x$badLEs" = "x" ]
then
ismirr="yes"
else
ismirr="no"
reason="$lv is mirrored on same disk."
fi
else
reason="$lv mirrored copies is 0."
fi
# Anything else to check for? Controller!
printf "%-30s\t%-35s %s\n" "$lv" "$fs" "$ismirr"
# If requested, explain why this disk is not mirrored
if [ $VERBOSE -gt 0 -a "$ismirr" = "no" ]
then
print "\t$reason"
fi
done
done
# Cleanup
/bin/rm -f $TMPF
Rgds...Geoff