Operating System - HP-UX
1753840 Members
8375 Online
108806 Solutions
New Discussion

how to partion a disk in HPUX?

 
SOLVED
Go to solution
datbtd
Occasional Advisor

how to partion a disk in HPUX?

In RedHat,  can use fdisk to partion a disk. How to do it in HPUX (11i v3)?

 

# ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk2         /dev/rdsk/c2t1d0
/dev/rdisk/disk2_p1      /dev/rdsk/c2t1d0s1
/dev/rdisk/disk2_p2      /dev/rdsk/c2t1d0s2
/dev/rdisk/disk2_p3      /dev/rdsk/c2t1d0s3

 

I guess /dev/rdisk/disk2_p1/p2/p3 are partitions of /dev/rdisk/disk2. But I don't know how is it realized.

 

Thanks!

14 REPLIES 14
Dennis Handly
Acclaimed Contributor

Re: how to partition a disk in HPUX?

These are only needed for the boot disk on Integrity.

Any reason you want partitions?

g3jza
Esteemed Contributor

Re: how to partition a disk in HPUX?

As Dennis said, it is only needed on boot disks of integrity servers(IA64). You can partition the integrity boot disks with the 'idisk' utilitity. man idisk.
datbtd
Occasional Advisor

Re: how to partition a disk in HPUX?

 

Hi Dennis,

 

 

datbtd
Occasional Advisor

Re: how to partition a disk in HPUX?

hi g3jza

 

Thanks for the "idisk" command. I am trying it as below:

 

# idisk -w -f - /dev/rdsk/c1t2d0
idisk version: 1.44
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

 

After I input "yes" and return, the process is hung, no any feedback .

 

After wait about 30 minutes, I can only press"CTRL+C" to force terminate it.

 

Would you please give an example on how to use this command? Thanks.

g3jza
Esteemed Contributor

Re: how to partition a disk in HPUX?

By using the idisk, you can specify, what will be the size of the EFI partition, HPUX (OS) and optionally the HPSP (hp service partition-for diagnostic purposes) .

Steps to create the partitions:
How to create a new partition table on a new boot disk:
1. create a /tmp/idf file that describes the desired disk layout.

2. vi /tmp/idf

3
EFI 500MB
HPUX 100%
HPSP 400MB

(EFI System partition will be 500MB, HP service partition will be 400MB and the remaining space will be allocated to the HP-UX OS partition.)

3. idisk -wf /tmp/idf /dev/rdsk/c0t1d0 ( -w to write changes to disk, -f specifies the file with layout)
idisk also automatically creates EFI file systems in the system and HPSP partitions

4. 'mkboot -e -l /dev/rdsk/c0t1d0' copies hpux.efi and other EFI executables from /usr/lib/efi to the new system partition (-l if the disk will be configured using a volume manager such as LVM / VxVM ; -e for EFI disk layout)
Dennis Handly
Acclaimed Contributor

Re: how to partition a disk in HPUX?

>Would you please give an example on how to use this command?

 

You can look at your current root disk:

idisk  -p -a  /dev/rdsk/c1t0d0

datbtd
Occasional Advisor

Re: how to partition a disk in HPUX?

Hi g3jza,

Thanks a lot for your quickly reply!

 

Now it seems succeed. However, why through ioscan -m dsf, I can't find the partition? I did't execute the step4 , is it caused by it or need I reboot the server? Thanks again.

 

# idisk -wf /tmp/idf /dev/rdsk/c1t2d0
idisk version: 1.44
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

EFI Primary Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x79634a70
        MyLbaLo                   = 0x1
        MyLbaHi                   = 0x0
        AlternateLbaLo            = 0x1117732f
        AlternateLbaHi            = 0x0
        FirstUsableLbaLo          = 0x40
        FirstUsableLbaHi          = 0x0
        LastUsableLbaLo           = 0x111772ff
        LastUsableLbaHi           = 0x0
        Disk GUID                 = 1037199e-a7b8-11e0-8000-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        PartitionEntryLbaHi       = 0x0
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xde904e50

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 10371bd8-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0x40
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0xf9fff
        Ending Lba Hi              = 0x0
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 10371be2-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0xfa000
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x110af7ff
        Ending Lba Hi              = 0x0
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 10371bf6-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0x110af800
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x111772ff
        Ending Lba Hi              = 0x0

EFI Alternate Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x559e3b04
        MyLbaLo                   = 0x1117732f
        MyLbaHi                   = 0x0
        AlternateLbaLo            = 0x1
        AlternateLbaHi            = 0x0
        FirstUsableLbaLo          = 0x40
        FirstUsableLbaHi          = 0x0
        LastUsableLbaLo           = 0x111772ff
        LastUsableLbaHi           = 0x0
        Disk GUID                 = 1037199e-a7b8-11e0-8000-d6217b60e588
        PartitionEntryLbaLo       = 0x1117730f
        PartitionEntryLbaHi       = 0x0
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0xde904e50

  Alternate Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 10371bd8-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0x40
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0xf9fff
        Ending Lba Hi              = 0x0
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 10371be2-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0xfa000
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x110af7ff
        Ending Lba Hi              = 0x0
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 10371bf6-a7b8-11e0-8000-d6217b60e588
        Starting Lba Lo            = 0x110af800
        Starting Lba Hi            = 0x0
        Ending Lba Lo              = 0x111772ff
        Ending Lba Hi              = 0x0

Legacy MBR (MBR Signatures in little endian):
   MBR Signature = 0x44193710

Protective MBR

 

# ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk2         /dev/rdsk/c2t1d0
/dev/rdisk/disk2_p1      /dev/rdsk/c2t1d0s1
/dev/rdisk/disk2_p2      /dev/rdsk/c2t1d0s2
/dev/rdisk/disk2_p3      /dev/rdsk/c2t1d0s3
/dev/rdisk/disk3         /dev/rdsk/c2t0d0
/dev/rtape/tape2_BEST    /dev/rmt/c0t4d0BEST
/dev/rtape/tape2_BESTn   /dev/rmt/c0t4d0BESTn
/dev/rtape/tape2_BESTb   /dev/rmt/c0t4d0BESTb
/dev/rtape/tape2_BESTnb   /dev/rmt/c0t4d0BESTnb
/dev/rdisk/disk5         /dev/rdsk/c3t0d0
/dev/rdisk/disk10        /dev/rdsk/c1t0d0
/dev/rdisk/disk11        /dev/rdsk/c1t2d0
/dev/rdisk/disk12        /dev/rdsk/c1t6d0
/dev/rdisk/disk13        /dev/rdsk/c1t4d0

I can't see the partition for /dev/rdisk/disk11. I expecte to see /dev/rdisk/disk11_p1/p2/p3 under this disk.

 

g3jza
Esteemed Contributor

Re: how to partition a disk in HPUX?

So the /dev/rdsk/c1t2d0 maps to the agile /dev/rdisk/disk11 right?

To confirm:
#ioscan -m dsf /dev/rdsk/c1t2d0

Try running #ioscan -fnN
to see the new DSF's.

Step 4 should not be a problem since it should just copy some file/executables to the new partition, but your boot disk will not be bootable.
g3jza
Esteemed Contributor

Re: how to partition a disk in HPUX?

To confirm:
#ioscan -m dsf /dev/rdsk/c1t2d0

--> forget about this, I'm just blind :)