How To Create Disk Partitions in RHEL. Create A New Partition In Linux

In this article, I will explain how can we create partitions in RHEL. Here You will learn the easiest simplest and way to create partitions in RHEL.

Guys here is easiest and the only way to create partitions . You can create partition by two methods. i.e. during installation and after installation. Here Im creating partition after installation. You have to read carefully this article. Keep your eyes with full concentration on every step given below.

Follow the steps given below:-

Step 1. To Check your disk information

 [ root@rdsaini ~]# fdisk -l

Step 2. Now by checking your hard disk detail, you can create hard disk partitions accordingly.

Screenshot (41)

[ root@rdsaini ~]# fdisk /dev/sda
  • command (m for help)= n (type n here)
  • e or p ( type either e for extended partition and p for primary partition )
  • 2,3,4,…… ( type your partition no.)
  • First cylinder (XXXX-XXXX , default XXXX ) = press enter
  • +500M ( write size according to your wish or available size of disk)
  • command (m for help)= w (type w for write disk changes)
  • command (m for help)= p (type p for to whether your disk partition is created or not)

Step 3. Now you have to reboot your system by giving following command (reboot will be done by giving this command, no need to reboot your system )

[ root@rdsaini ~]#partprobe /dev/sda

Step 4. Format your disk partition

[ root@rdsaini ~]#mkfs.ext3 /dev/sda2 [your disk name here either 2,3,4,or 5]

5. Mount it in a folder/directory for that you must have to create a new directory

[ root@rdsaini ~]#mkdir /E
[ root@rdsaini ~]#mount /dev/sda2 /E
  • Note: this is the temporary mount disk. So every time whenever you will reboot your system you will have to give format and mount commands so that it can identify disk partition.

Step 6. To permanent Mount disk drive in the system.

[ root@rdsaini ~]#vim /etc/fstab

After this you will get new vim editor window there we have to make some changes. Watch in the picture given below –

linux+fstab command
linux+fstab command
  • In this window, you will see it has 5 defaults line on your screen.
  • But we have to our new partitions name then the path of storage.
  • In my case it is /(slash) and next to this it will ask about file type through which you had format your drive.
  • At last type same as mentioned above default and 0 0.
  • After done this, just save this file and rerun the partprobe command.

So friends this is all about how to create a new partition in the Redhat Linux system. Here we also learned that how to format a drive and how to mount a drive in the system. Guys if you have a doubt related to this post please ask me. Or if have any better method to do this please mention it in the comment section. And if you any queries with the content of the post then don’t hesitate to contact me. If you like my posts please share it with your friends.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s