- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- VG Question
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
06-18-2002 08:46 AM
06-18-2002 08:46 AM
I was trying to create a new physical c0t0d2 and logical volume and I got this error msg.
#pvcreate /dev/rdsk/c0t0d2
pvcreate: The physical volume already belongs to volume group.
How do I check what vg's are mounted on c0t0d2?
thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:52 AM
06-18-2002 08:52 AM
Re: VG Question
Try
pvdisplay -v /dev/dsk/c0t0d2
Also check the
/etc/lvmtab
file to see if it's allocated to any VGs on *this* system.
Note: On shared arrays this drive may be in a VG on ANOTHER system. So you need to check *all* systems connected to the array.
If there are actually NO systems currently using it - use
pvcreate -f /dev/rdsk/c0t0d2
To force the initialization.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:52 AM
06-18-2002 08:52 AM
Re: VG Question
Note the use of the block device "dsk" and not "rdsk".
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:52 AM
06-18-2002 08:52 AM
Re: VG Question
Do a strings on /etc/lvmtab | more to know where does this disk belong to .Inc ase you are sure that this disk is a new disk ( ioscan and diskinfo) and doesnt belong to any vg then you can just rename lvmtab to lvmtab.old and recreate the lvmtabb using vgscan -a . The again do a strigns on the lvmtab.
In case you dont find it there then just do a pvcreate -f /dev/rdsk/c0t0d2 ( force option)
vgcreate /dev/vgxx /dev/dsk/c0t0d2
and you are good to get going.
All the best.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:52 AM
06-18-2002 08:52 AM
Re: VG Question
# strings /etc/lvmtab | grep c0t0d2
If you get results, then that disk already belongs to a VG. Too see all VGs and their disks do a
# strings /etc/lvmtab > /tmp/lvmtab.temp
# cat /tmp/lvmtab.temp
If c0t0d2 does not belong to any VGs, just put the '-f' option on your pvcreate command.
# pvcreate -f /dev/dsk/c0t0d2
This will force the pvcreate on that device.
You will get that error if that device was EVER a part of a VG.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:53 AM
06-18-2002 08:53 AM
Re: VG Question
# strings /etc/lvmtab
OR
# vgdisplay -v |grep dsk
If you don't see c0t0d2 in the above 2 cases it's more likely that the disk was previously used in a VG. To reuse it do ..
# pvcreate -f /dev/rdsk/c0t0d2
Be very sure before you run pvcreate with -f option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:55 AM
06-18-2002 08:55 AM
Re: VG Question
Use SAM. Choose "Disks and File systems", then "Disk Devices". This will take several seconds, but will list each disk in your system and show which volume group each is in, as well as other useful info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:55 AM
06-18-2002 08:55 AM
Re: VG Question
pvdisplay -v /dev/dsk/c0t0d2 |more
Check in the /etc/lvmtab file also whether the disk is present or not.
#strings /etc/lvmtab
If it is not present then you can forcefully create the vg by using.
pvcreate -f /dev/rdsk/c0t0d2
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:55 AM
06-18-2002 08:55 AM
Re: VG Question
Check your /etc/fstab for all filesystem locations/ logical configurations.
As mentioned pvcreate -f will blowaway the disk LVM headers..
make sure you're selecting the right disk by blinking it's leds:
dd if=/dev/dsk/c0t0d2 of=/dev/null
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 08:57 AM
06-18-2002 08:57 AM
Re: VG Question
There is a LVM header on the disk you are attempting to 'pvcreate'.
You can attempt to match the device to one present in /etc/lvmtab.
Do 'strings /etc/lvmtab'. If your disk does *not* appear there, then either you have attached a disk from another system or you have 'lvreduce'ed filesystems that were on the disk (as it belonged to a volume group) and 'vgreduce'd the disk (as it belonged to a volume group.
If you are truly sure that you want to 'pvcreate' this disk, do:
# pvcreate -f /dev/rdsk/cXtYdZ
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:22 AM
06-18-2002 09:22 AM
Re: VG Question
root@apache:/etc#>more lvmtab
^CM-h^E/dev/vg00
wM-f;U1M-WyB^A/dev/dsk/c0t4d0
/dev/vg03
wM-f;U5*M-[u^A/dev/dsk/c0t0d0
/dev/vg04
wM-f;U5*M-\M-!^A/dev/dsk/c2t1d1
/dev/vg05
wM-f;U56-^Q^A/dev/dsk/c0t8d0
/dev/vg06
wM-f;U56-W^A/dev/dsk/c0t9d0
then enforce the pvcreate
using dsk
root@apache:/dev#>pvcreate -f /dev/dsk/c0t0d2
pvcreate: "/dev/dsk/c0t0d2": not a character device.
root@apache:/dev#>
enforce the pvcreate
using rdsk
root@apache:/dev#>pvcreate -f /dev/rdsk.c0t0d2
Couldn't stat physical volume "/dev/rdsk.c0t0d2":
pvcreate: Couldn't open physical volume "/dev/rdsk.c0t0d2":
No such file or directory
root@apache:/dev#>
....but I got this msg. Whats the difference between /dsk and /rdsk ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:28 AM
06-18-2002 09:28 AM
SolutionIt should be run like so ..
# pvcreate -f /dev/rdsk/c0t0d2
You got a typo in your last "pvcreate" command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:30 AM
06-18-2002 09:30 AM
Re: VG Question
Use the strings command on /etc/lvmtab file - it's a binary file...
strings /etc/lvmtab
dsk => block device (many bytes at once)
rdsk => character device - bytes one after the other.
As a general rule low-level stuff is rdsk & higher level stuff is dsk
Use
pvcreate -f /dev/rdsk/c0t0d2
That should work.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:33 AM
06-18-2002 09:33 AM
Re: VG Question
Just a note...
You indicated that you used 'more' to view the '/etc/lvmtab' file. You should use the 'strings' command since this file is a binary (not ascii text) file. Your results will be much more readable:
# strings /etc/lvmtab
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:38 AM
06-18-2002 09:38 AM
Re: VG Question
/dev/rdsk/c0t0d2 is the raw device ( character device - charcter one after another) and /dev/dsk/c0t0d2 is a block device(many bytes together).
With pvcreate you have to use the raw device.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:38 AM
06-18-2002 09:38 AM
Re: VG Question
root@apache:/dev#>pvcreate -f /dev/rdsk/c0t0d2
Physical volume "/dev/rdsk/c0t0d2" has been successfully created.
root@apache:/dev#>mkdir /dev/vg07
root@apache:/dev#>mknod /dev/vg07 /dev/rdsk/c0t0d2
mknod: arg count
usage: mknod name b|c major minor
mknod name p
root@apache:/dev#>
...well i was going to do this now:
# pvcreate /dev/rdsk/c0t0d2
# mkdir /dev/vg07
# mknod /dev/vg07/group c 64 0x070000
# vgcreate /dev/vg07 /dev/rdsk/c0t0d2
# lvcreate -L size /dev/vg07
# lvcreate -L size /dev/vg07
# lvcreate -L size /dev/vg07
Creates 3 logical volumes lvol1, lvol2 and lvol3
# newfs -F vxfs /dev/vg07/rlvol1
# newfs -F vxfs /dev/vg07/rlvol2
# newfs -F vxfs /dev/vg07/rlvol3
# mount /dev/vg07/lvol1 /extern01
# mount /dev/vg07/lvol2 /extern02
# mount /dev/vg07/lvol3 /extern03
I got stuck in the mknod command
suggestions?
:-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:40 AM
06-18-2002 09:40 AM
Re: VG Question
The devices indeed belongs to an exiting Volume group.
if it's still included in the system you can check via the command:
"strings /etc/lvmtab | grep -i c0t0d2".
if it's not there, then you can force pvcreate by adding the option "-f".
Good Luck.
T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:41 AM
06-18-2002 09:41 AM
Re: VG Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:43 AM
06-18-2002 09:43 AM
Re: VG Question
Where did you got stuck ?
You create the group file via mknod once.
What are you trying to do ?
Just to create a simple VG ? (with lvols)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:43 AM
06-18-2002 09:43 AM
Re: VG Question
Check the /dev/vg... dirs for it already being used.
Note that you may have to increase the
maxvgs
kernel parameter is it defaults to 10 IF you already have 10 VGs defined.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:45 AM
06-18-2002 09:45 AM
Re: VG Question
You can create the group file for vg07 thro mknod command.
# mknod /dev/vg07/group c 64 0x070000
It creates a group file with Major No. 64 - That is for the volume group and Minor no. 7 - for vg07
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:46 AM
06-18-2002 09:46 AM
Re: VG Question
strings /etc/lvmtab | more
and/or
# pvdisplay -v /dev/dsk/c0t0d2 | grep VG
VG Name /dev/vg00
VGDA 2
# pvdisplay -v /dev/dsk/c0t0d2 | grep current | grep 00000
00000 current /dev/vg00/lvol1 00000
00064 current /dev/vg00/lvol2 00000
00320 current /dev/vg00/lvol3 00000
00384 current /dev/vg00/lvol4 00000
00512 current /dev/vg00/lvol5 00000
00602 current /dev/vg00/lvol6 00000
00858 current /dev/vg00/lvol7 00000
01114 current /dev/vg00/lvol8 00000
#
Then, if the disk is NOT in any volume group use:
pvcreate -f /dev/rdsk/c0t0d2
to initialize the disk for lvm.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:46 AM
06-18-2002 09:46 AM
Re: VG Question
Stuck on 'mknod'? Make sure that your minor number is unique. Do:
ls -l /dev/vg*/group
In your case, make sure that vg07 (minor=07) doesn't already exist. Then:
# mknod /dev/vg07/group c64 0x070000
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:48 AM
06-18-2002 09:48 AM
Re: VG Question
Here's the procedure for creating the VG.
1. pvcreate /dev/rdsk/c0t0d2
2. mkdir /dev/vg07
3. mknod /dev/vg07/group c 64 0x070000
4. vgcreate /dev/vg07 /dev/dsk/c0t0d2
5. lvcreate -L size /dev/vg07
6. newfs -F vxfs /dev/vg07/rlvol?
7. mount /dev/vg07/lvol? /mount_point
if you got stuck on the mknod command, what is the exact error message ?
try checking if the inode is available (0x070000) by: 'll /dev/*/group" and see if the 0x070000 inode is note
taken.
T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2002 09:48 AM
06-18-2002 09:48 AM
Re: VG Question
# mkdir /dev/vg07
# mknod /dev/vg07/group c 64 0x070000
==> Yes this is the correct syntax. If you have problem at this stage, it's probably due to the minor number "0x070000" already being used in an existing VG. Check it with ..
# ls /dev/vg*/group
..assuming all your VG names start with "vg". Use another minor number in you mknod if 0x070000 is used already.
The rest of your steps looks good. You want to also edit /etc/fstab file to make the mount points permanent (ie mounts everytime the system boots up).