There were 900 disks in that server which was running on 53-09-04 . I wanted to change the disk attribute of all disks from reserve_policy reserve to reserve_policy no_reserve . I have written below for loop to check and there was another for loop to change it too !
for i in `lspv|grep -v root|awk '{print $1}'`
do
echo $i >>/tmp/123
lsattr -El $i|grep reserve_policy|awk '{print $2}' >>/tmp/123
done
This for loop will check all disks and apend the /tmp/123 file with result.
Thanks,
Dipak Warade,
www.unix4you.com
for i in `lspv|grep -v root|awk '{print $1}'`
do
echo $i >>/tmp/123
lsattr -El $i|grep reserve_policy|awk '{print $2}' >>/tmp/123
done
This for loop will check all disks and apend the /tmp/123 file with result.
Thanks,
Dipak Warade,
www.unix4you.com
No comments:
Post a Comment