{"id":69,"date":"2016-11-30T08:14:00","date_gmt":"2016-11-30T08:14:00","guid":{"rendered":"https:\/\/visworlditsolution.wordpress.com\/?p=69"},"modified":"2016-11-30T08:14:00","modified_gmt":"2016-11-30T08:14:00","slug":"how-to-create-partition-in-linux","status":"publish","type":"post","link":"https:\/\/linux.thingsomething.com\/index.php\/2016\/11\/30\/how-to-create-partition-in-linux\/","title":{"rendered":"How to create partition in linux redhat"},"content":{"rendered":"<p>Hello Guys In this tutorial we are going to learn how to create partition in Redhat linux Server. we can use partition create commands on all type of Linux operating system. in this tutorial i have Rhel5 Linux based operating system.<\/p>\n<p>So let we start just click right and open terminal as a root. if you have ubuntu based linux system just need to login root user.<\/p>\n<p><span style=\"color:#ff0000;\"><strong>below command are show Heard disk status on your linux operating\u00a0 system<\/strong><\/span>.<\/p>\n<p><span style=\"color:#008000;\"><strong>[root@localhost Desktop]# fdisk -l<\/strong><\/span><\/p>\n<p><span style=\"color:#3366ff;\">Disk \/dev\/sda: 21.6 GB, 21613379584 bytes<\/span><br \/>\n<span style=\"color:#3366ff;\"> 255 heads, 63 sectors\/track, 2627 cylinders<\/span><br \/>\n<span style=\"color:#3366ff;\"> Units = cylinders of 16065 * 512 = 8225280 bytes<\/span><\/p>\n<p><span style=\"color:#3366ff;\">Device Boot Start End Blocks Id System<\/span><br \/>\n<span style=\"color:#3366ff;\"> \/dev\/sda1 * 1 382 3068383+ 83 Linux<\/span><br \/>\n<span style=\"color:#3366ff;\"> \/dev\/sda2 383 764 3068415 fd Linux raid autodetect<\/span><br \/>\n<span style=\"color:#3366ff;\"> \/dev\/sda3 765 1083 2562367+ 82 Linux swap \/ Solaris<\/span><\/p>\n<p><span style=\"color:#ff0000;\">now we will select our heard disk which one we need to create partition. here my heard disk name is \/dev\/sda if you have number of heard disk\u00a0 you will see de\/sdb ,\/dev\/sdc ,\/dev\/sdd. After put fdisk with our heard disk name disk partition editor will be open then we can look all kind of help when we put<strong> m<\/strong> and press enter\u00a0\u00a0<\/span><\/p>\n<p><strong><span style=\"color:#008000;\">[root@localhost Desktop]# fdisk \/dev\/sda\u00a0<\/span>\u00a0 \u00a0<\/strong><\/p>\n<p><span style=\"color:#0000ff;\">The number of cylinders for this disk is set to 2627.<\/span><br \/>\n<span style=\"color:#0000ff;\"> There is nothing wrong with that, but this is larger than 1024,<\/span><br \/>\n<span style=\"color:#0000ff;\"> and could in certain setups cause problems with:<\/span><br \/>\n<span style=\"color:#0000ff;\"> 1) software that runs at boot time (e.g., old versions of LILO)<\/span><br \/>\n<span style=\"color:#0000ff;\"> 2) booting and partitioning software from other OSs<\/span><br \/>\n<span style=\"color:#0000ff;\"> (e.g., DOS FDISK, OS\/2 FDISK)<\/span><\/p>\n<p><span style=\"color:#008000;\"><strong>Command (m for help): m<\/strong><\/span><br \/>\n<span style=\"color:#0000ff;\">Command action<\/span><br \/>\n<span style=\"color:#0000ff;\"> a toggle a bootable flag<\/span><br \/>\n<span style=\"color:#0000ff;\"> b edit bsd disklabel<\/span><br \/>\n<span style=\"color:#0000ff;\"> c toggle the dos compatibility flag<\/span><br \/>\n<span style=\"color:#0000ff;\"> d delete a partition<\/span><br \/>\n<span style=\"color:#0000ff;\"> l list known partition types<\/span><br \/>\n<span style=\"color:#0000ff;\"> m print this menu<\/span><br \/>\n<span style=\"color:#0000ff;\"> n add a new partition<\/span><br \/>\n<span style=\"color:#0000ff;\"> o create a new empty DOS partition table<\/span><br \/>\n<span style=\"color:#0000ff;\"> p print the partition table<\/span><br \/>\n<span style=\"color:#0000ff;\"> q quit without saving changes<\/span><br \/>\n<span style=\"color:#0000ff;\"> s create a new empty Sun disklabel<\/span><br \/>\n<span style=\"color:#0000ff;\"> t change a partition&#8217;s system id<\/span><br \/>\n<span style=\"color:#0000ff;\"> u change display\/entry units<\/span><br \/>\n<span style=\"color:#0000ff;\"> v verify the partition table<\/span><br \/>\n<span style=\"color:#0000ff;\"> w write table to disk and exit<\/span><br \/>\n<span style=\"color:#0000ff;\"> x extra functionality (experts only)<\/span><\/p>\n<p><span style=\"color:#008000;\"><strong>Command (m for help): n<\/strong><\/span><br \/>\nCommand action<br \/>\n<span style=\"color:#008000;\"><strong>e extended<br \/>\np primary partition (1-4)<\/strong><\/span><br \/>\ne<br \/>\n<span style=\"color:#3366ff;\">Selected partition 4<\/span><br \/>\n<span style=\"color:#3366ff;\"> First cylinder (1084-2627, default 1084):<\/span><br \/>\n<span style=\"color:#3366ff;\"> Using default value 1084<\/span><br \/>\n<span style=\"color:#3366ff;\"> Last cylinder or +size or +sizeM or +sizeK (1084-2627, default 2627)<\/span>:<span style=\"color:#ff0000;\"> <strong><em>(we press enter becouse extended partation requaird all space we create new partation in extend partation)<br \/>\nUsing default value 2627<\/em><\/strong><\/span><\/p>\n<p><strong>Command (m for help): n<\/strong><br \/>\n<span style=\"color:#0000ff;\">First cylinder (1084-2627, default 1084):<\/span><br \/>\n<span style=\"color:#0000ff;\"> Using default value 1084<\/span><br \/>\n<span style=\"color:#0000ff;\"> Last cylinder or +size or +sizeM or +sizeK (1084-2627, default 2627): +500M<\/span><\/p>\n<p><strong>Command (m for help): n<\/strong><br \/>\n<span style=\"color:#0000ff;\">First cylinder (1146-2627, default 1146):<\/span><br \/>\n<span style=\"color:#0000ff;\"> Using default value 1146<\/span><br \/>\n<span style=\"color:#0000ff;\"> Last cylinder or +size or +sizeM or +sizeK (1146-2627, default 2627): +400M<\/span><\/p>\n<p><strong>Command (m for help): n<\/strong><br \/>\n<span style=\"color:#0000ff;\">First cylinder (1196-2627, default 1196):<\/span><br \/>\n<span style=\"color:#0000ff;\"> Using default value 1196<\/span><br \/>\n<span style=\"color:#0000ff;\"> Last cylinder or +size or +sizeM or +sizeK (1196-2627, default 2627): +500M<\/span><\/p>\n<p><strong>Command (m for help): p<\/strong><\/p>\n<p><span style=\"color:#0000ff;\">Disk \/dev\/sda: 21.6 GB, 21613379584 bytes<\/span><br \/>\n<span style=\"color:#0000ff;\"> 255 heads, 63 sectors\/track, 2627 cylinders<\/span><br \/>\n<span style=\"color:#0000ff;\"> Units = cylinders of 16065 * 512 = 8225280 bytes<\/span><\/p>\n<p><span style=\"color:#0000ff;\">Device Boot Start End Blocks Id System<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda1 * 1 382 3068383+ 83 Linux<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda2 383 764 3068415 fd Linux raid autodetect<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda3 765 1083 2562367+ 82 Linux swap \/ Solaris<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda4 1084 2627 12402180 5 Extended<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda5 1084 1145 497983+ 83 Linux<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda6 1146 1195 401593+ 83 Linux<\/span><br \/>\n<span style=\"color:#0000ff;\"> \/dev\/sda7 1196 1257 497983+ 83 Linux<\/span><\/p>\n<p><strong>Command (m for help): w (save for partition<\/strong><br \/>\nThe partition table has been altered!<\/p>\n<p><span style=\"color:#0000ff;\">Calling ioctl() to re-read partition table.<\/span><\/p>\n<p><span style=\"color:#0000ff;\">WARNING: Re-reading the partition table failed with error 16: Device or resource busy.<\/span><br \/>\n<span style=\"color:#0000ff;\"> The kernel still uses the old table.<\/span><br \/>\n<span style=\"color:#0000ff;\"> The new table will be used at the next reboot.<\/span><br \/>\n<span style=\"color:#0000ff;\"> Syncing disks.<\/span><\/p>\n<p><span style=\"color:#ff0000;\"><strong>Here we need to reboot our system. but Here we suppose\u00a0 we are work on real server then we can&#8217;t reboot server for this Service. because Many people are connected to server. so Linuc in we have Commands. we can reboot only Heard Disk partition table. Commands is Partprobe and heard disk name which one we was create partition .\u00a0<\/strong><\/span><\/p>\n<p><span style=\"color:#008000;\"> <strong>[root@localhost Desktop]# partprobe \u00a0\/dev\/sda<\/strong><\/span><\/p>\n<p><strong><span style=\"color:#ff0000;\">Then we Formate our partition and mount in any folder which have required .<\/span><\/strong><\/p>\n<p><span style=\"color:#008000;\"><strong>[root@localhost Desktop]# mkdir data<\/strong><\/span><br \/>\n<span style=\"color:#008000;\"> <strong>[root@localhost Desktop]# mkfs.ext3 \u00a0\/dev\/sda5<\/strong><\/span><\/p>\n<p><span style=\"color:#008000;\"><strong>[root@localhost Desktop]# mkfs.ext3 \u00a0\/dev\/sda6<\/strong><\/span><\/p>\n<p><span style=\"color:#008000;\"><strong>[root@localhost Desktop]# \u00a0mount \u00a0 \/dev\/sda7 \u00a0data<\/strong><\/span><\/p>\n<p><span style=\"color:#ff0000;\"><strong>Then we will go to fstab file. this file in have all mounted device information we are also write New partition description<\/strong><\/span><\/p>\n<p><strong>[root@localhost Desktop]# vim\u00a0<\/strong><strong style=\"font-size:1rem;\">\/etc\/fstab\u00a0<\/strong><\/p>\n<p>if you have any problem in this method please comment here i will solve your problem<\/p>\n<p>Thank\u00a0 you<\/p>\n<p>Vishnu Sharma<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Guys In this tutorial we are going to learn how to create partition in Redhat linux Server. we can use partition create commands on &hellip; <span class=\"ml-btn\"><a href=\"https:\/\/linux.thingsomething.com\/index.php\/2016\/11\/30\/how-to-create-partition-in-linux\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[8,16],"tags":[171],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-linux-rhel5","category-storage","tag-linux-partation"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/69"}],"collection":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}