LNEXT
ONELCLEAN
UTERMINAL
TERMINAL
NEXT
$V1$
HILINE
PAUSE
<CR> - to continue, q - to quit
DISKPART
Partition 1
Partition 2
Partition 3
Unpartitioned Partitioned
Disk Disk
DISK2PART
Partition 1
------->
-------> Partition 2
Partition 3
Unpartitioned Partitioned
Disk Disk
BIG1DISK
120
Mbytes
Unpartitioned
Disk
BIG2DISK
/dev/hp0d
30 Mbytes
120 /dev/hp0e
Mbytes 50 Mbytes
/dev/hp0f
40 Mbytes
Unpartitioned Partitioned
Disk Disk
BIG3DISK
/dev/hp0d
30 Mbytes
/dev/hp0e - 20Mb
120
Mbytes
/dev/hp0h
30 Mbytes
/dev/hp0f
40 Mbytes
GO
The process of dividing the disk into partitions, or as
referred to under UNIX, file systems, is a powerful
feature offered by the UNIX Operating System.
Essentially, the partitioning process involves dividing
the hard disk(s) into two or more partitions for the most
efficient and most logical usage of storage space by various
users with various projects.
The process of creating a new partition may be a built-in shell
script, but in essence it is composed of the following steps:
1 - Select the partition to be further partitioned.
2 - Create a special file for the new partition. /dev/MAKEDEV
uses mknod to do this.
3 - Create a new file system of desirable and legal size
using either the newfs or the mkfs command!
4 - Remake the partition with the original name to the desirable size.
You must know the consequences when creating a new file system
because this process will destroy all the information on the old
file system. This tells you that you should never create a new
file system on the root file system!
To determine which existing file systems are mounted and how much
free space there is on the mounted file systems, use the command
df for disk free! Keep in mind that there may be other file
systems on the disk which are not mounted! Often these are the
file systems which can be partitioned without destroying any
useful information.
Let us then assume that the disk which is to be partitioned
can hold 120 Mbytes of data.
This disk already has three file systems on it:
1 - /dev/hp0d - 30 Mbytes
2 - /dev/hp0e - 50 Mbytes
3 - /dev/hp0f - 40 Mbytes
The intention then is to create another file system /dev/hp0h
which is to use the second 30 Megabytes of the /dev/hp0e file
system, while the 1st 20 Megabytes will still belong to the
/dev/hp0e file system. Recall that the command for making a
device special file is: mknod.
Please enter the command to make a
special file /dev/hp0h which
is block-type with a major device
number of 2 and a minor device number
of 42.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type mknod for /dev/hp0h
Please type mknod /dev/hp0h b 2 42
You will be helped this time!
$PROMPT$
FORGET1
mknod /dev/hp0h b 2 42
Please observe the result.
$PROMPT$
Before you make a new partition,
make sure that the system knows
about the starting block of the
new partition, otherwise you may
destroy more than you have intended.
Now let us make the /dev/hp0h
file system of 30 Mbytes or 30000
blocks and 15000 inodes with default
interleaving factors and gaps. The
command to do this, if you recall is:
mkfs /dev/hp0h 30000 15000.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
mkfs /dev/hp0h 30000 15000
Please type
mkfs /dev/hp0h 30000 15000
You will be helped this time!
$PROMPT$
FORGET2
mkfs /dev/hp0h 30000 15000
$PROMPT$
Note the figure above is not
to scale.
Now let us remake the /dev/hp0e
file system to 20 Mbytes or 20000
blocks and 11000 inodes with default
interleaving factors and gaps. The
command to do this, if you recall is:
mkfs /dev/hp0e 20000 11000.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
mkfs /dev/hp0e 20000 11000
Please type
mkfs /dev/hp0e 20000 11000
You will be helped this time!
$PROMPT$
FORGET3
mkfs /dev/hp0e 20000 11000
$PROMPT$
Remember, making a file system on
the special device, when that device
already contains a file system, will
destroy all the data on the existing
file system!