- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Messed up volume groups!
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-11-2001 06:46 AM
06-11-2001 06:46 AM
Messed up volume groups!
# pvcreate /dev/rdsk/c4t0d1
# mkdir /dev/vgraid
# mknod /dev/vgraid/group c 64 0x040100
# vgcreate /dev/vgraid /dev/dsk/c4t0d1
# lvcreate /dev/vgraid -L 68361
That threw back an lvol1 at me. Let me tell you right now that this is pretty much my first experience with anything unix. At that point I wanted to redo it and rename it, and for some reason felt inclined to rm the vgraid directory (but later learned about vgremove, etc). I just kept digging myself deeper tweaking with the nodes, I guess and now it's just a mess.
This is what I get now whenever I try to do anything:
# pvcreate /dev/rdsk/c4t0d1
Physical volume "/dev/rdsk/c4t0d1" has been successfully created.
# mkdir /dev/vgraid
# mknod /dev/vgraid/group c 64 0x040100
# vgcreate /dev/vgraid /dev/dsk/c4t0d1
Increased the number of physical extents per physical volume to 17346.
vgcreate: Volume group "/dev/vgraid" could not be created:
A volume group is already using this major and minor number.
Please check the minor number of the "group" device file.
#
I'm assuming by not removing my volume group properly that I most likely left some remnant of the group somewhere that I can't find. I've been reading through man pages and the forums here, but I'm having trouble finding how I can clean this up when I don't even know the path of the volume group that is using the minor number. Is there a way to clean this up, or will I end up having to wipe the disk and start fresh?
Please help!
Thanks in advance,
Melissa Murphy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 06:49 AM
06-11-2001 06:49 AM
Re: Messed up volume groups!
is your problem
use 0x040000
once ll /dev/*/group allows you.
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:01 AM
06-11-2001 07:01 AM
Re: Messed up volume groups!
# ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Apr 18 09:44 /dev/vg00/group
crw-r----- 1 root sys 64 0x040000 Jun 11 08:54 /dev/vgraid/group
What am I doing wrong now?
Thanks,
Melissa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:04 AM
06-11-2001 07:04 AM
Re: Messed up volume groups!
The volume group must be unique. When you do a 'mknod', for example, to make vg01, you would specify:
# mknod /dev/vg01/group c 64 0xXY0000
...where XY=01 for volume group 01. That is, the first two digits of the group file denote the volume group number.
To unravel what you have done, do this:
# lvremove /dev/vgXX/lvolX #...for all...
# vgreduce /dev/vgXX /dev/dsk/cXtYdZ #...all but the *last* physical disk!
# vgremove /dev/vgXX #...now remove the last...
# rm /dev/vgXX/group
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:09 AM
06-11-2001 07:09 AM
Re: Messed up volume groups!
you are looking for a unique index number for the vg... yours are unique.. you have a zero and a 4. (you could have chosen 1, 2, 3 ..., but not 0)
I assume you are getting the device file for the disk from ioscan -fnkCdisk
Make sure the disk/lun is the one you want:
dd if=/dev/dsk/c4t0d1 of=/dev/null
then you will have to
# pvcreate /dev/rdsk/c4t0d1
(or -f to save typing (force overwrite))
Physical volume "/dev/rdsk/c4t0d1" has been successfully created.
good!!
# mkdir /dev/vgraid
already done
# mknod /dev/vgraid/group c 64 0x040000
already done
# vgcreate /dev/vgraid /dev/dsk/c4t0d1
Should create a volume group
strings /etc/lvmtab to verify
vgdisplay /dev/vgraid
also
Then
create your lvols.
lvcreate -L 1000 vgraid
(lvol size 1000MB in vgraid)
Lvol created message
newfs -F vxfs /dev/vgraid/rlvol1
mkdir /mount
mount /dev/vgraid/lvol1 /mount
bdf
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:13 AM
06-11-2001 07:13 AM
Re: Messed up volume groups!
Melissa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:17 AM
06-11-2001 07:17 AM
Re: Messed up volume groups!
vgexport vgname
If you don't want your vgraid any more,
vgimport /dev/vgraid /dev/rdsk/c4t0d1
vgexport vgraid
cd /etc/lvmconf/
rm the vgraid.conf
files
sam can do all this for you!
/usr/sbin/sam
Don't jump into the deep end just yet!
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:25 AM
06-11-2001 07:25 AM
Re: Messed up volume groups!
Thanks -- I think I'm starting to get it. Yes, I found the c4t0d1 through ioscan. I'm writing down mostly everything I've been doing and random notes, and I have here that 0x040000 is associated with c4t0d0 and 0x040100 was with c4t0d1 before I changed anything. I'm not really sure what these are (still have a lot to learn), but will I mess anything up by choosing 0x040000 like you suggested?
Also, everything is okay through pvcreate, mkdir and mknod, but when it gets to vgcreate, I still get that another group is using the minor number. If I were to choose a number other than 4 would this work now?
I was having problems with sam doing this. I have a 100GB array with hardware path 10/8.8.0.255.0.0.0 and a 67GB on 10/8.8.0.255.0.0.1 and sam would only see the large one when I wanted it on the smaller. I tried playing with the alternate path and everything, but could only create a volume group on the 100GB disk. That could have been just me not really knowing how to use sam, but I could never make it see the smaller one.
I'll keep at it ... :)
Thanks,
Melissa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:38 AM
06-11-2001 07:38 AM
Re: Messed up volume groups!
I was going through what is happenning , just a thought infact if you would have used SAM to create the voulme group inplace of doing it through the command line may be you woul have avoided the total issue since SAM wou;ld not have let you create using the same minor no as used by the disk drives and may be would not have got into this at all. Though creating volume groups through SAM has its own shortcomings.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:41 AM
06-11-2001 07:41 AM
Re: Messed up volume groups!
A common standard for volume group names is to name them "vgXX" where XX is a 2-digit number. This number is the same one that is applied to 'mknod' as I noted above, and must be unique.
You can name your volume group anything you want, however. To find out what volume group numbers are used, do:
# ls -l /dev/*/group
and look at the first two digits after "0x". Thus, if you see "0x040000" you know that this is volume group "04".
To quickly see what physical disks are associated with what volume groups you can do:
# strings /etc/lvmtab
A very good overview of LVM tasks, and standards, can be found in "HP-UX System Administration Tasks":
http://docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 07:48 AM
06-11-2001 07:48 AM
Re: Messed up volume groups!
Well, it's working out now. I used 0x010000 instead of 0x040000 and now it's okay. Why would this be? I understand why it is nice and neat to use 01 because it's the first volume group, but is there an obvious reason as to why 04 wouldn't even work out?
Anyhow, thanks a ton, guys! Getting to learn this sort of stuff is something I'd really like to pursue, and I guess if I have any questions, I know where to come! :)
Thanks again,
Melissa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2001 08:08 AM
06-11-2001 08:08 AM
Re: Messed up volume groups!
In answer to your last question...any number "would" work as long as the minor number for the group file is *unique*. In your case, you had a left-over group file "0x040000" [minor number = 04].
It's simply good practice [standard], and ***it makes scripting LVM building (and destruction) easier***, if you define your volume groups as "vgNN" where NN = 00, 01, etc. and maintain the same numerical relationship between your volume groups and your group files (as built with 'mknod'. Similare principals apply for logical volume nomenclature.
Regards!
...JRF...