Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating filesystem

Status
Not open for further replies.

uadmin

Technical User
Jun 13, 2001
122
GB
Hi
What are the basic steps for creating a new file system.I want to create a filesystem called /stage.
At present it looks as followed :dev/dsk/c0t0d0s0 1905415 60367 1787886 4% /
/dev/dsk/c0t0d0s3 1390891 962126 373130 73% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s5 385463 41875 305042 13% /var
swap 1127504 24 1127480 1% /var/run
/dev/dsk/c0t8d0s7 2467195 21449 2396403 1% /depot
/dev/dsk/c0t0d0s7 96975 51 87227 1% /home
/dev/dsk/c0t8d0s5 2056211 285421 1709104 15% /homepage
/dev/dsk/c0t0d0s4 361903 291131 34582 90% /opt
/dev/dsk/c0t8d0s4 2056211 1031048 963477 52% /iplanet
/dev/dsk/c0t0d0s6 47367 3060 39571 8% /tmp
/dev/dsk/c0t8d0s0 6196234 2474511 3659761 41% /u01
/dev/dsk/c0t8d0s1 2056211 166003 1828522 9% /u02
/dev/dsk/c0t8d0s3 2056211 10 1994515 1% /u03

Could any one advise .

Thanks
Simon

Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
First You have to figure out if you have enough free space on the hard drive to create a new partition.

MAN page df

Raj
 
man format and newfs - sorry, don't have time this morning to explain furthur.
 
Hi
Thanks for getting back to me, i have checked available space with df command before posting this and can see i have sapce but am unaware of how to create filesystem.

On HPUX it is straight forward and would be able to do so wth no problems.

So if anyone can help it would be Appreciated.

Regards
Simon Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
df is no use to you because that will only show you how much space you have on filesystems that have already been created.

You can use this little script to see if you have any unallocated space on your disks:

[tt]cd /dev/rdsk
for d in *2
do
prtvtoc /dev/rdsk/$d
done | nawk '
/\* \/dev/
/Unallocated/,/\*$/
'[/tt]

Then, as Ken said, go into format, create a new partition, and then newfs -m 1 /dev/rdsk/cNtNdNsN to create a new UFS filesystem on it. Take care at this stage that you don't overlap partitions or you could break your existing filesystems!

The -m 1 switch tells it to only reserve 1% of disk space for the root user (i.e. normal users can only fill 99% of the disk). The default is 10%, but with today's disks that's loads of space.

Then mkdir /stage, add another line to /etc/vfstab to have it mounted automatically at boot, and then mount /stage and it's ready to use.
Annihilannic.
 
Simon, basically you need to (carefully) use format to find or create a slice big enough for your needs, then create a mount point for stage (presumably in root), then use newfs to create the filesystem on the slice you have designated, basically newfs /dev/rdsk/cntndnsn

Then mount your filesystem and add it to /etc/vfstab if required. HTH.
 
Thanks for the help

Simon Simon Peter Wickham
Email: s.wickham@zoom.co.uk
 
You used all your slices on c0t0d0 and on c0t8d0!

slice 2 is unusable and c0t0d0s1 is probably your swap space.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top