{"id":360,"date":"2012-06-19T16:22:56","date_gmt":"2012-06-19T08:22:56","guid":{"rendered":"http:\/\/rmohan.com\/?p=360"},"modified":"2012-06-19T16:22:56","modified_gmt":"2012-06-19T08:22:56","slug":"create-a-logical-partion","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=360","title":{"rendered":"Create a Logical Partion"},"content":{"rendered":"<p><strong>Creation  deletion of   Logical Partition  and extended<br \/>\n<\/strong><\/p>\n<p>1) List the Partition Table<\/p>\n<p>[root@localhost ~]# fdisk -l <\/p>\n<p>2)  Create Extended Partition on the New disk \/dev\/sdb<\/p>\n<p>fdisk \/dev\/sdb <\/p>\n<p>[root@localhost ~]#  fdisk \/dev\/sdb<br \/>\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel<br \/>\nBuilding a new DOS disklabel with disk identifier 0xca3de5fc.<br \/>\nChanges will remain in memory only, until you decide to write them.<br \/>\nAfter that, of course, the previous content won&#8217;t be recoverable.<\/p>\n<p>Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)<\/p>\n<p>WARNING: DOS-compatible mode is deprecated. It&#8217;s strongly recommended to<br \/>\n         switch off the mode (command &#8216;c&#8217;) and change display units to<br \/>\n         sectors (command &#8216;u&#8217;).<\/p>\n<p>Command (m for help): n<br \/>\nCommand action<br \/>\n   e   extended<br \/>\n   p   primary partition (1-4)<br \/>\np<br \/>\nPartition number (1-4): 1<br \/>\nFirst cylinder (1-13054, default 1):<br \/>\nUsing default value 1<br \/>\nLast cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054):<br \/>\nUsing default value 13054<\/p>\n<p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table.<br \/>\nSyncing disks.<\/p>\n<p>4) Delete the extended partition <\/p>\n<p>[root@localhost ~]#  fdisk \/dev\/sdb<\/p>\n<p>WARNING: DOS-compatible mode is deprecated. It&#8217;s strongly recommended to<br \/>\n         switch off the mode (command &#8216;c&#8217;) and change display units to<br \/>\n         sectors (command &#8216;u&#8217;).<\/p>\n<p>Command (m for help): d<br \/>\nSelected partition 1<\/p>\n<p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table.<br \/>\nSyncing disks.<\/p>\n<p>5) Add Logical Partition on the Disk <\/p>\n<p>[root@localhost ~]#  fdisk \/dev\/sdb<\/p>\n<p>WARNING: DOS-compatible mode is deprecated. It&#8217;s strongly recommended to<br \/>\n         switch off the mode (command &#8216;c&#8217;) and change display units to<br \/>\n         sectors (command &#8216;u&#8217;).<\/p>\n<p>Command (m for help): n<br \/>\nCommand action<br \/>\n   e   extended<br \/>\n   p   primary partition (1-4)<br \/>\np<br \/>\nPartition number (1-4): 1<br \/>\nFirst cylinder (1-13054, default 1): 1<br \/>\nLast cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054):<br \/>\nUsing default value 13054<\/p>\n<p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table.<br \/>\nSyncing disks.<\/p>\n<p>6) Format New Logical partition as ext4 <\/p>\n<p>[root@localhost ~]# mkfs.ext4  \/dev\/sdb1<\/p>\n<p> mkdir \/backup<\/p>\n<p>[root@localhost ~]# mount \/dev\/sdb1 \/backup\/<br \/>\n[root@localhost ~]# df -TH<br \/>\nFilesystem    Type     Size   Used  Avail Use% Mounted on<br \/>\n\/dev\/mapper\/VolGroup-lv_root<br \/>\n              ext4      52G   2.6G    47G   6% \/<br \/>\ntmpfs        tmpfs     528M      0   528M   0% \/dev\/shm<br \/>\n\/dev\/sda1     ext4     508M    32M   450M   7% \/boot<br \/>\n\/dev\/mapper\/VolGroup-lv_home<br \/>\n              ext4      54G   189M    51G   1% \/home<br \/>\n\/dev\/sdb1     ext4     106G   197M   101G   1% \/backup<\/p>\n<p>Add in the fstab so after reboot we can make the disk available<\/p>\n<p>\/dev\/sdb1               \/backup                  ext4   defaults        1 2<\/p>\n<p>7) Remove Logical partition  <\/p>\n<p>    umount \/backup\/<\/p>\n<p>   remove form fstab <\/p>\n<p>   root@localhost ~]#  fdisk \/dev\/sdb<\/p>\n<p>WARNING: DOS-compatible mode is deprecated. It&#8217;s strongly recommended to<br \/>\n         switch off the mode (command &#8216;c&#8217;) and change display units to<br \/>\n         sectors (command &#8216;u&#8217;).<\/p>\n<p>Command (m for help): d<br \/>\nSelected partition 1<\/p>\n<p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table.<br \/>\nSyncing disks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creation deletion of Logical Partition and extended <\/p>\n<p>1) List the Partition Table<\/p>\n<p>[root@localhost ~]# fdisk -l <\/p>\n<p>2) Create Extended Partition on the New disk \/dev\/sdb<\/p>\n<p>fdisk \/dev\/sdb <\/p>\n<p>[root@localhost ~]# fdisk \/dev\/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/360"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions\/361"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}