Operating System - HP-UX
1832935 Members
2881 Online
110048 Solutions
New Discussion

Basic question about partitioning and creating device files

 
Bakos György
Super Advisor

Basic question about partitioning and creating device files

A have a winchester I have made a partition on it with sam and have mounted with sam.easy.
But I have put this winchester in another machine, but on this machine aren't any device files(/dev/vg00/rlvol...)

Another question when I doesn't want to use sam, how can i create partitions, and format it after(fdisk isn't in hp-ux)
10 REPLIES 10
G. Vrijhoeven
Honored Contributor

Re: Basic question about partitioning and creating device files

Hi,

To import volume groups in an other server you can user the vgscan ( man vgscan )command.

# mv /etc/lvmtab /etc/lvmtab.org
# vgscan -apv

If it looks ok
# vgscan -av


And if you know the device files you can use

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport /dev/vg01 /dev/dsk/c?t?d?

Second question
For partitions LVM is used and the partitions are called logical volumes (lvols). You can create them using the lvcreate ( man lvcreate) command. Afther the creation you need to put a filesystemen on the lvol (newfs/mkfs) and create an mount point ( mkdir /dirname) and mount it (mount disk dir)

Gideon
Elmar P. Kolkman
Honored Contributor

Re: Basic question about partitioning and creating device files

What you did with sam was not partitioning, but creating/editting volumegroups and lvols.

To get the info from the disk on the other machine, you have to import the volumegroup information. vgimport is the command for that (man vgimport).

Doing LVM maintenance outside SAM can be done with commands like pvcreate, vgcreate, vgextend, lvcreate, etc. But since you don't know them, I would stick with SAM until you have at least read some LVM documentation or followed an HP-UX administration course.
Every problem has at least one solution. Only some solutions are harder to find.
Bakos György
Super Advisor

Re: Basic question about partitioning and creating device files

Thanks
I have tryed
but with them is something wrong, the answer is the same as for mknod.
mknod /dev/vg01/group c 64 0x010000
all other seens to be ok


When I have good understand, there is no format, only newfs or makefs
Bakos György
Super Advisor

Re: Basic question about partitioning and creating device files

sorry the last reply was wrong, I have made vgscan -avp only....

but
mknod created the group file OK
vgimport /dev/vg01 /dev/dsk/c4t4d0
vgimport: Volume group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
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.


Aha
so I must activate it with vgchange!

Can somebody short explain me what I have made yet, and what I have to do with vgchange. Why is this all so dificult????
Bakos György
Super Advisor

Re: Basic question about partitioning and creating device files

I have forgotten:
mount /dev/vg01/lvol1 /mnt2
/dev/vg01/lvol1: No such device or address

In vg01/is only group rlvol1 lvol1, that seen already ok, because on the another machine is 1 partition too.


Another question:
in /dev/dsk is the physicaly device, then what is rlvol?? Why do I need lvol... what is group?
G. Vrijhoeven
Honored Contributor

Re: Basic question about partitioning and creating device files

Hi again,

You seem to support yourself just fine.
1. yes you do not have fdisk.
2. The lvol/rlvol difference is the character and block device related. The group file is needed for lvm to import the disk.

Gideon

Bakos György
Super Advisor

Re: Basic question about partitioning and creating device files

I must now activate it, with vgchange, if i had good understand it.
G. Vrijhoeven
Honored Contributor

Re: Basic question about partitioning and creating device files

Hi,

You need to activate the volume group before you can start mounting. (vgchange -a y)

Gideon
G. Vrijhoeven
Honored Contributor

Re: Basic question about partitioning and creating device files

Bakos,

Specify the volumegroup name, otherwise it will start activating all known volumegroups.

Gideon
Bakos György
Super Advisor

Re: Basic question about partitioning and creating device files

Thanks it works

Yuppie,
I gived you some points..

Thanks