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/rhd11
30 Mbytes
120 /dev/rhd12
Mbytes 50 Mbytes
/dev/rhd13
40 Mbytes
Unpartitioned Partitioned
Disk Disk
BIG3DISK
/dev/rhd11
30 Mbytes
/dev/rhd12 - 20Mb
120
Mbytes
/dev/rhd14
30 Mbytes
/dev/rhd13
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 using the mknod command.
3 - Create a new file system of desirable and
legal size using the mkfs command!
4 - Remake the partition with the original name
to the desired 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! On the other hand, 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/rhd11 - 30 Mbytes
2 - /dev/rhd12 - 50 Mbytes
3 - /dev/rhd13 - 40 Mbytes
The intention then is to create another file system /dev/rhd14
which is to use the second 30 Megabytes of the /dev/rhd12 file
system, while the 1st 20 Megabytes will still belong to the
/dev/rhd12 file system. Recall that the command for
mknod.
Recall that the information for the available major and minor
device numbers is in the /etc/master file.
device numbers is in the /usr/sys/conf/master file.
So please enter the command to make a
special file /dev/rhd14 which
is block-type with a major device
number of 2 and a minor device number
of 42, i.e:
mknod /dev/rhd14 b 2 42!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type mknod /dev/rhd14 b 2 42
Please type mknod /dev/rhd14 b 2 42
You will be helped this time!
$PROMPT$
FORGET1
mknod /dev/rhd14 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.
Your utility will give you this
info & the capability to change it.
The utility that provides this
information is divvy.
Now let us make the /dev/rhd14
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/rhd14 30000 15000!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
mkfs /dev/rhd14 30000 15000
Please type
mkfs /dev/rhd14 30000 15000
You will be helped this time!
$PROMPT$
FORGET2
mkfs /dev/rhd14 30000 15000
$PROMPT$
Note the figure above is not
to scale.
Now let us remake the /dev/rhd12
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/rhd12 20000 11000!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
mkfs /dev/rhd12 20000 11000
Please type
mkfs /dev/rhd12 20000 11000
You will be helped this time!
$PROMPT$
FORGET3
mkfs /dev/rhd12 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!