Create Filesystem on OEL

Just as a documentation thing...

1.Partition the device

Use fdisk to add/delete/modify partitions.
Start it by specifying the device name after fdisk:
ex. fdisk /dev/hdb
The result of this will be that you allocated the space on the device to a set of partitions (/dev/hdb1, ... )
This you can see when looking in the /dev directory. The partitions you created should be defined in it.

2. Create a filesystem on the partition(s)
This can be done by issueing the mkfs command.
You have to specify the type of filesystem at the -t option.
For example: mkfs -t ext3 /dev/hdb1

3. Mounting the filesystem
Two possible ways to do this:
- on a permanent basis 3.b.
- on a use base : 3.a.

3.a. Mount the filesystem permantently
This is achieved by defining the partition and mount point in the fstab file.
In there you will enter a line per partition to be mounted with the systemboot.
See man fstab for details on what theline should look like.

3.b. Mount the filesystem on a use base
Just launch the command mout to mount the filesystem on the location you want.
The location must be a directory.
ex: mount -t ext3 /dev/hdb1 /MyNewPartition

3.c for completeness ... unmounting the filesystem
You can do this by issueing the umount command followed by the mount point
ex. umount /MyNewPartition

No comments: