Operating System - HP-UX
1834814 Members
2839 Online
110070 Solutions
New Discussion

Re: HP-UX Space allocation for a user.

 
Raj D.
Honored Contributor

HP-UX Space allocation for a user.

Hi Guru's ,

I want to add a user , and allocate 4GB of space for that user in HP-UX 10.20 , L1000 Server.

I can add a user with following :
# useradd -u300 -o -d/user4gb -s/bin/sh -m user4gb what to do next.
But have never used quota command , nor i know that how to do, 4GB space allocation for that user.

Can any one help me out.

Regards,
Raj. D.
----------
" If u think u can , If u think u cannot , - You are always Right . "
4 REPLIES 4
Shaikh Imran
Honored Contributor

Re: HP-UX Space allocation for a user.

Hi,

I think miracle has pointed you towards the right direction.

Regards,
I'll sleep when i am dead.
Dave Olker
Neighborhood Moderator

Re: HP-UX Space allocation for a user.

Hi Raj,

I think it depends on what you mean by "allocate" 4GB for a user.

If you're trying to limit a user to *only* consuming 4GB of space then disk quotas are the way to go. However, establishing a disk quota doesn't mean that the user will automatically get 4GB of disk space when they need it. If the disk space in the filesystem is consumed by other processes and applications then this user is out of luck whether they've reached their disk quota or not.

If you want to "set aside" or "reserve" disk space for a user, you could try using the prealloc(1) command to build a large file, or a series of smaller files, in that user's home directory to consume the disk space you want this user to have. When the user actually needs to use the space, they can delete one of the preallocated files and re-use the space they just freed for whatever purpose they need.

The prealloc(1) man page describes how to use that command, and you've already got a good reference to the process of setting up disk quotas.

Good luck,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Raj D.
Honored Contributor

Re: HP-UX Space allocation for a user.

Thanks , Mirracle , Imran and Dave , all given good information ,
But I think Miracle's answer in good and i am going through it and hope it will help me out .

Though i will look at prealloc , command also . Thanks all ,

Regards ,

Raj.D
-----
" If u think u can , If u think u cannot , - You are always Right . "