HP-UX how formating LUN disk

Hello folks,

I have Hp.ux 11.31 and I need know how formating in OS new LUN disk attach to system

e.g. the wwid:

# scsimgr lun_map -D /dev/rdisk/disk4

        LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk4

Total number of LUN paths     = 2
World Wide Identifier(WWID)    = 0x60060e80056541000000654100000000

LUN path : lunpath8
Class                         = lunpath
Instance                      = 8
Hardware path                 = 0/3/0/0/0/0.0x50060e8005654100.0x4003000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

LUN path : lunpath7
Class                         = lunpath
Instance                      = 7
Hardware path                 = 0/3/0/0/0/1.0x50060e8005654110.0x4003000000000000
SCSI transport protocol       = fibre_channel
State                         = ACTIVE
Last Open or Close state      = ACTIVE

like format this LUN 0x60060e80056541000000654100000000 for erase all information,

and later create traditional file system,

thanks you,

It depends what you want to do with it. You can choose to use it as either a simple disk, slice it and use it; or you can add it to a volume group and then use LVM to help manage it, which is far more flexible.

Can you show us the output from:-

bdf
ioscan -fnC disk
vgdisplay -v             # might be quite large

I would generally suggest adding the LUN to a volume group, then creating or extending logical volumes and filesystems to suit your needs. What plans do you have for the space?

Kind regards,
Robin

No need to delete the data.

If you are not using LVM, a simple newfs command will create filesystem, then you mount it and use it as you see fit.

If you are using LVM, simple do a pvcreate on it, and create a new VG or expand existing.
In case the disk has formerly been used as a HPUX LVM volume the pvcreate command will notify you that it belongs to a volume group. If you are sure it is not actually used, you can use pvcreate -f to force the creation.

If you actually require to delete the data, you can use dd and fill it up with zeros (but i fail to see the point in doing so).

1 Like

thanks you explain