cancel
Showing results for 
Search instead for 
Did you mean: 

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
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 :)
datbtd
Occasional Advisor

Re: how to partition a disk in HPUX?

thanks g3jza.

 

Strange, still can't see the partition

 

ioscan -m dsf /dev/rdsk/c1t2d0
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk11        /dev/rdsk/c1t2d0

 

# ioscan -fnN
Class        I  H/W Path       Driver       S/W State   H/W Type     Description
=================================================================================
root         0                 root           CLAIMED     BUS_NEXUS   
ioa          0  0              sba            CLAIMED     BUS_NEXUS    System Bus Adapter (4030)
ba           0  0/0            lba            CLAIMED     BUS_NEXUS    Local PCI-X Bus Adapter (122e)
tty          0  0/0/1/0        rmp3f01        CLAIMED     INTERFACE    PCI class(255,0) (103c1303)
tty          1  0/0/1/1        rmp3f01        CLAIMED     INTERFACE    PCI SimpleComm (103c1302)
tty          2  0/0/1/2        asio0          CLAIMED     INTERFACE    PCI Serial (103c1048)
disk         2  64000/0xfa00/0x0                esdisk         CLAIMED     DEVICE       HP      IR Volume
                              /dev/disk/disk2      /dev/disk/disk2_p3   /dev/rdisk/disk2_p2
                              /dev/disk/disk2_p1   /dev/rdisk/disk2     /dev/rdisk/disk2_p3
                              /dev/disk/disk2_p2   /dev/rdisk/disk2_p1
disk         3  64000/0xfa00/0x1                esdisk         CLAIMED     DEVICE       HP      DG146BB976
                              /dev/disk/disk3   /dev/rdisk/disk3
disk         5  64000/0xfa00/0x2                esdisk         CLAIMED     DEVICE       TEAC    DVD-ROM DW-224EV
                              /dev/disk/disk5   /dev/rdisk/disk5
disk        10  64000/0xfa00/0x6                esdisk         CLAIMED     DEVICE       HP 146 GMBA3147NC
                              /dev/disk/disk10   /dev/rdisk/disk10
disk        11  64000/0xfa00/0x7                esdisk         CLAIMED     DEVICE       HP 146 GMBA3147NC
                              /dev/disk/disk11   /dev/rdisk/disk11
disk        12  64000/0xfa00/0x8                esdisk         CLAIMED     DEVICE       HP 146 GMBA3147NC
                              /dev/disk/disk12   /dev/rdisk/disk12
disk        13  64000/0xfa00/0x9                esdisk         CLAIMED     DEVICE       HP 146 GMBA3147NC
                              /dev/disk/disk13   /dev/rdisk/disk13
tape         2  64000/0xfa00/0xe                estape         CLAIMED     DEVICE       HP      DAT160
                              /dev/rtape/tape2_BEST    /dev/rtape/tape2_BESTn
                              /dev/rtape/tape2_BESTb   /dev/rtape/tape2_BESTnb

 

# ioscan -m dsf /dev/rdsk/c1t2d0
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk11        /dev/rdsk/c1t2d0

 

 

 

g3jza
Esteemed Contributor
Solution

Re: how to partition a disk in HPUX?

Hi,

try creating the DSF manually by issuing:

#insf -v -e

datbtd
Occasional Advisor

Re: how to partition a disk in HPUX?

Oh, It's OK now.

 

# 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/disk11_p1     /dev/rdsk/c1t2d0s1
/dev/rdisk/disk11_p2     /dev/rdsk/c1t2d0s2
/dev/rdisk/disk11_p3     /dev/rdsk/c1t2d0s3

 

You are god:smileyhappy:

g3jza
Esteemed Contributor

Re: how to partition a disk in HPUX?

If you are satisfied with the answers we gave you, you can assign kudos (stars) as acknowledgement.
pyxx90
Frequent Visitor

Re: how to partion a disk in HPUX?

Usually, people partition a disk with command.first,Click Start or open Run from the app screen. Typing the command “disk part” in the search box, clicking Okkey, the command prompt would be opened.

Following the next steps:

 

•Typing the command “list disk”, you will see the disk info

•Select one disk which is available, exp, typing “select disk#” and in the CLI you will see the message of “disk# is now the selected disk”

•Typing “list partition” , you will see the info of available partition

•Typing “select partition#”, you will see the message “partition# is now the selected partition”

•Typing “extend size=x MB/shrink minimum=x MB”. It’s success when you see the message” Disk part successfully extended the volume/Disk part successfully shrunk the volume by: x MB (the size you inputted)   

Just do likewise; you’ll succeed in resizing partition.

That’s it. Not comfortable working with commands? Indeed, it’s complex and time-consuming. Besides, there are limitations for both two types. That is, if there’s not enough free space for disk, you cannot resize partition. On the other hand, you can only shrink a volume by its half size even if there is enough space. Nevertheless, we provide you another easier way in doing so. Partition assistant server edition, which makes disk management an easy work, what performs all the advanced functions well, including create, delete, merge and split partition, etc. once installed the software. it’s a great help for all users. 

 Learn more http://www.disk-partition.com/free-partition-manager.html

I attached a file for u,maybe u could read it,and than u will clearly understand the way.