- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mount disk in new volume group without erasing dat...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО02-19-2008 07:53 AM
тАО02-19-2008 07:53 AM
Mount disk in new volume group without erasing data
Have tried the following:
1. Using SAM ------------------------
Use "Create Volume Group" with options:
Selected disk: XXXXX
Use hardware path: 10/1/3/0.10.0
Volume group name: vg03
Result:
FAILS: "The command used to create volume groups, /sbin/vgcreate has failed. The stderr output is shown below. The volume group has not been created.
vgcreate: Volume group "dev/vg03" could not be created: The path does not specify a valid physical volume"
The following directory was created:
# ll /dev/vg03
total 0
crw-r--r-- 1 root sys 64 0x020000 Feb 19 15:37 group
2.Using command line-------------
(without -f option to avoid erasing)
# pvcreate /dev/dsk/c3t10d0
pvcreate: "/dev/dsk/c3t10d0": not a character device.
regards,
Dag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 07:57 AM
тАО02-19-2008 07:57 AM
Re: Mount disk in new volume group without erasing data
Have a look at the 'vgimport' command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 07:58 AM
тАО02-19-2008 07:58 AM
Re: Mount disk in new volume group without erasing data
This is assuming that there is already LVM info on the disk.
If you use pvcreate then it will erase the LVM header info on the disk.
mkdir /dev/vgnew
mknod /dev/vgnew/group c 64 0x0Y0000 ( y is an unused minor number ( ls -ld /dev/vg*/group to find )
vgimport /dev/vgnew /dev/dsk/c3t10d0
If you exported this from somewhere and created a map file then you can also get your lvnames back. If not everything is called lvol1, lvol2, lvol3 etc.. You can change these names later by simply renaming the block and char names to a name of your choosing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 07:58 AM
тАО02-19-2008 07:58 AM
Re: Mount disk in new volume group without erasing data
How was it used before?
Was it configured as a volume group?
"pvcreate" will delete your data!
If this disk was its own volume group you need to use vgimport.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:01 AM
тАО02-19-2008 08:01 AM
Re: Mount disk in new volume group without erasing data
What do you mean by "without erasing the data on the disk?"
Do you mean that there is a filesystem on it that has been created without LVM ? It is not possible, in a new LVM structure, to keep existing datas that have no LVM structure.
Do you mean that this disk as an LVM structure and comes from an other HP-UX box ? So consider "vgimport" in place of vgcreate : it will keep existing datas
Regards
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:05 AM
тАО02-19-2008 08:05 AM
Re: Mount disk in new volume group without erasing data
# pvcreate /dev/dsk/c3t10d0
pvcreate: "/dev/dsk/c3t10d0": not a character device.
With pvcreate you must use a character device, that is /dev/rdsk/c3t10d0. But if you want to vgimport it, there is no need to issue a pvcreate.
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:11 AM
тАО02-19-2008 08:11 AM
Re: Mount disk in new volume group without erasing data
The man page for pvcreate says that it will not overwrite the data unless the -f option is used:
"If pv_path contains a file system and the -f option is not specified,
pvcreate asks for confirmation. The request for confirmation avoids
accidentally deleting a file system."
The idea was to see if pvcreate did find any file system.
Another thought: Is there a maximum disk size that HP-UX 10.20 can handle (the disk is 73GB)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:17 AM
тАО02-19-2008 08:17 AM
Re: Mount disk in new volume group without erasing data
If you force the action (with -f) your data will be deleted.
Try
vgscan -v -p
and check the results.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2008 08:30 AM
тАО02-19-2008 08:30 AM
Re: Mount disk in new volume group without erasing data
To control wheter or not this disk belongs to a volume group, try pvcreate without -f :
pvcreate /dev/rdsk/c3t10d0
pvcreate: The physical volume already belongs to a volume group
If you want to analyse disk contents you can use dd. For example :
dd if=/dev/rdsk/c3t10d0 of=/var/tmp/DiskDump bs=1024k count=100
It will dump 100 Mo from the disk that you will be able to analyze, for example with od
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2008 01:29 AM
тАО02-20-2008 01:29 AM
Re: Mount disk in new volume group without erasing data
Have looked som more into this:
The machine is a dual boot system.
In configuration A disk 5 (SCSI addr. 5)is used. The other disks appear as "Unused" in SAM.
In configuration B disks 6 and 8 are used, other disks appear as "Unused".
The disk in question is disk 10, I have not been able to find out what it contains
------------
Results of vgscan:
# vgscan -v -p
vgscan: Warning: couldn't query physical volume "/dev/dsk/c3t2d0":
The specified path does not correspond to physical volume attached to
this volume group
--> There is no disk with SCSI address 2 (checked with ioscan)
vgscan: Warning: couldn't query all of the physical volumes.
vgscan: The physical volume "/dev/dsk/c2t5d0" is already recorded in the "/etc/l
vmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t0d0":
Invalid argument
--> This is the CD-ROM
/dev/vg00
/dev/dsk/c2t5d0
--> This is the system disk
Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c2t6d0
--> This is the system disk in Configuration B
Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c3t8d0
--> This disk is used in Configuration B
Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c3t10d0
--> This is the unknown disk
The Volume Group /dev/vg01/group was not matched with any Physical Volumes.
------------------
Results from fstyp: Seems that this does not work? Does not find file system on any of the disks.
# fstyp /dev/dsk/c2t5d0
unknown_fstyp (no matches)
# fstyp /dev/dsk/c2t6d0
unknown_fstyp (no matches)
# fstyp /dev/dsk/c3t8d0
unknown_fstyp (no matches)
# fstyp /dev/dsk/c3t10d0
unknown_fstyp (no matches)
--------------------
# more /etc/lvmtab
^C├Г┬и^B/dev/vg00
w├Г┬╣%^P<├в┬║>/dev/vg01
w├Г┬╣%^PC'├Г j^A/dev/dsk/c3t2d0
==> Seems that there was a disk on SCSI address 2, which was removed without deleting the volume group.
So this is not the volume group for disk 10, although vgscan claims that disk 10 belongs to a volume group.
------------------
>Create new volume group:
# mknod /dev/vg02/group c 64 0x030000
>Test vgimport (-p option to preview actions)
# vgimport -v -p /dev/vg02 /dev/dsk/c3t10d0
Beginning the import process on Volume Group "/dev/vg02".
vgimport: Quorum not present, or some physical volume(s) are missing.
Volume group "/dev/vg02" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
-->Should I run this command without the -p option? And what should be the next step in order to mount the disk without destroying the data (if any) on it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2008 01:39 AM
тАО02-20-2008 01:39 AM
Re: Mount disk in new volume group without erasing data
Looks like the disk was a member of a mirror set.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2008 01:44 AM
тАО02-20-2008 01:44 AM
Re: Mount disk in new volume group without erasing data
-->Should I run this command without the -p option? And what should be the next step in order to mount the disk without destroying the data (if any) on it?
You can vgimport this disk but you clearly miss some other disk(s) : "vgimport: Quorum not present, or some physical volume(s) are missing"
But before may be you should switch to the other environment and control whether or not this disk is recorder in an existing VG ?
Anyway if you decide to import, remember that at least one disk is missing. May be it is only a mirror disk and it should not be a problem, but may be not ... in this case some LVs will miss or be corrupted.
So after importing the VG, activate it in read-only (vgchange -a r) to investigate what is exactly on this disk and mount FS with read-only option.
Once you are sure of what is that disk, what resides on it, you can activate and use it normally.
Regards
Erci
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2008 01:45 AM
тАО02-20-2008 01:45 AM
Re: Mount disk in new volume group without erasing data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2010 06:52 AM
тАО04-14-2010 06:52 AM