Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I tell if disks are mirrored? 1

Status
Not open for further replies.

mrmac228

IS-IT--Management
May 27, 2003
255
GB
I've just started (today!) working on an HP-UX 11.11 system. I can see that I have two disks on the system, but what is the easiest way to find out if they are mirrored?
If they are not then I need to partition and add the new partitions to the currently mounted /var and /usr partitions. How would I do this?

I have done a keyword search on these topics and have found pvdisplay and vgdisplay and the associated /usr/sbin/[pv*][lv*] commands but I'm not confident in how to interpret their output e.g. vgdisplay -v vg00 show the logical volumes and the LV status shows available/syncd. Does this mean the disk (or at least lv) is mirrored?

Thanks

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
do the following:
Code:
# bdf
result:
...
/dev/vg00/lvol7    1638400  637021  938796   40% /usr
/dev/vg00/lvol4    1048576  323567  679732   32% /tmp
...
(only some lines)

then:

Code:
# lvdisplay /dev/vg00/lvol7   (i.e. /usr)

result:# lvdisplay /dev/vg00/lvol3
--- Logical volumes ---
LV Name                     /dev/vg00/lvol7
VG Name                     /dev/vg00
LV Permission               read/write   
LV Status                   available/syncd           
[B]Mirror copies               0            [/B]
Consistency Recovery        MWC                 
Schedule                    parallel     
LV Size (Mbytes)            256             
Current LE                  64        
Allocated PE                64          
Stripes                     0       
Stripe Size (Kbytes)        0                   
Bad block                   off          
Allocation                  strict/contiguous         
IO Timeout (Seconds)        default

and take a look to "Mirror copies", it will tell you if the lvol has a mirror or not.

The 2nd question, what do you need? to increase the space or mount another lvol inside /var and /usr? (i.e. /var/foo and /usr/app)

Cheers.
 
Chacalinc,

I ran what you suggested and got 0. I take it this means the logical volume is NOT mirrored?

Increase the space available for /var and /usr.

I've also noticed that the total disk space is about 10GB (using bdf and swapinfo) but the disk is 16GB. I read in this forum (thread51-68850) the physical extents limits the disk size to 9GB is this likely to be the cause here and if so how do I up the physical extents such that the whole disk is available?

Cheers.

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
Hi,

>> I ran what you suggested and got 0. I take it this means the logical volume is NOT mirrored?

Yes, they are not mirrored.
Take care that you can mirror selected lvols or all of them, so you must run lvdisplay on all lvols.

>> total disk space is about 10GB (using bdf and swapinfo) but the disk is 16GB.

issue the following:

Code:
# ioscan -fnC disk     <-- to see the physical disks

# diskinfo /dev/rdsk/c0t0d0  <-- to see the info of the disk
obviously, use your raw devices.

# vgdisplay vg00     <-- to see the VG info. Issue it for all VolumeGroups you have.

# vgdisplay -v vg00   <-- more detailed VG info.

and show us the results.

Cheers.
 
Chacalinc,

Thanks for your help. Luckily I had checked all the lvols and none were mirrored. I also picked up from SAM that when you look at the disks options it has what the filesystem (or something like that) is on the disk or unused if not. The other disk had unused by it. So that confirmed it too.

The diskinfo command was not one I had found in my trawls about /usr/bin /usr/sbin, so that's been noted.

Again whilst looking at things I tried a couple of commands out from SAM like extend. When I tried to extend /usr it said I had 5GB to use. Unfortunately /usr being mounted was the next problem and I left it at that, but at least I know there is 5GB just sitting on the first disk still to be used. I've also been using the second disk and have got 2 new lvols mounted and ready for installing too. I assumed this would be easier given that if I wanted to extend /usr & /var I'd need to be in single user mode.

So, for the moment, many thanks .... and have a star!

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
excellent!

I guess on your first disk drive you have all the capacity in the Volume Group, but not all used on lvols, so you have space to increase the /var and /usr. You can get the free space with the vgdisplay command, it will show you the &quot;Free PE&quot;, this number multiplied by &quot;PE Size (MBytes)&quot; will tell you the space in MB you have free.

If you need more space, you can add the second disk to the VolumeGroup using the &quot;vgextend&quot; command, and the 2 disks will be used in only one VG, so the VG will be greater than the disk drives and you will get more spaceto increase the lvols.

After that, you can issue a &quot;lvextend&quot; to increase the space of the lvols where /var and /usr resides. And finally, with /var and /usr unmounted, you can issue an &quot;extendfs&quot; command to increase the filse system to the new size.

In the &quot;man lvextend&quot; the last lines show you a generic procedure to increase the space:

Code:
1. lvextend -L 400 /dev/vg00/lvol7
2. umount /mount_point_of_lvol7
3. extendfs /dev/vg00/rlvol7   <-- note raw device
4. mount /dev/vg00/lvol7  /mount_point_of_lvol7

Hope this help you and good luck!

Cheers.
 
If you have HP-UX OnLineJFS software installed(check by swlist cmd):

B3929CA B.11.11 HP OnLineJFS

then you can increase the size of a file system without umount/mount:

# pvcreate -f /dev/rdsk/cxtxdx
# vgextend vg00 /dev/dsk/cxtxdx
# lvextend -L 1000 /dev/vg00/lvol7
# fsadm -F vxfs -b 1000m /<filesystem>

To check the new size of 1000mb of your /usr:
# bdf /use


regards,

Frank
 
Chacalinc,

I've got a problem with unmounting the /usr, as it's being used. Even if I switch to single-user, there is still PID 0 (swapper) using /usr. Any idea how to umount /usr?

Thanks

Robert
 
Robert, I'd suggest you make this a new thread. Only I'd get notification that an update to this current thread.

FYI I did a shutdown -r 1 to make sure /usr wasn't mounted

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
Hi you can't run any command until you mount /usr i.e
you can't run lvexted until you mount /usr even it single user mode.
in sort you can't increase size of it as single user

you have to boot system in lvm mode

Boot your machine in LVM maintenance mode
(hpux -lm at ISL>)

then you will be able to use lv command without mount /usr.

Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top