Operating System - HP-UX
1834495 Members
3041 Online
110067 Solutions
New Discussion

create a file in a specific disk

 
SOLVED
Go to solution
Angelo Collazo
Advisor

create a file in a specific disk

Solaris has a command:
mkfile 200m /dev/dsk/c6t6d0/sawp_200m

How can I accomplish this in hpux 11.00

TIA,:-)
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: create a file in a specific disk

Hi,

You can use the prealloc command.

# prealloc file 10000000 ( size 10 mb )

Regards,
Robert-Jan
Thayanidhi
Honored Contributor

Re: create a file in a specific disk

Hi,

May be the follwoing is equivalent.

#prealloc

TT
Attitude (not aptitude) determines altitude.
Patrick Wallek
Honored Contributor

Re: create a file in a specific disk

You can't create a file on a disk slice like in solaris.

You can just create a file in a directory.

# prealloc /dir/file 10000

or

# cd /dir
# prealloc file 10000
Angelo Collazo
Advisor

Re: create a file in a specific disk

I don't see how to specify the disk on
prealloc

Even If I do a cd/dir, there are 4 disks on the directory.
Kenneth Tipper
Occasional Advisor
Solution

Re: create a file in a specific disk

HP-UX does not put files and directories on disks but on volumes (with eithr LVM or VxVM). Volumes are logical constructions made up of space allocated from disks.
To guarantee a particular disk is used, you must create a volume group (in LVM) or disk group (in VxVM) containing only that disk, then create one or more volumes in that group. Then create a file system in that volume, and mount it.
Only root can do this.

Or just use a raw disk device, but that is not a file, so not really what you want.
An ounce of pretention is worth a pound of manure.