Run this commands and see your partitions should be look like this:- ~]# blkid Now you can check our file system with blkid Linux commands. You can see we have successfully create xfs file system. Log =internal log bsize=4096 blocks=2560, version=2 Naming =version 2 bsize=4096 ascii-ci=0 ftype=1 So let’s start the format this partition with mkfs.xfs Linux commands. Formatting Hard Disk partitionĪfter partition creation we need to format this partition to use this disk. You can see in above output we have successfully /dev/sdb1 partitions created. Now you can check your partitions with this command fdisk /dev/sdb with p option. After that we have selected w option to write this partitions information. Default partitions is 1 and default we have selected all space for partition 1. In above output you can see we have created one primary partitions of 4GB. Partition 1 of type Linux and of size 4 GiB is setĬalling ioctl() to re-read partition table. ~]# fdisk /dev/sdbīuilding a new DOS disklabel with disk identifier 0x08d7b0f1. For new partitions we have to select n option. As per output you can see we don’t have any current partitions of selected disk. You can see in above commands output m option will provide help and p option provide disk partitions information. To create partitions we have to run this commands:- fdisk /dev/sdb ~]# fdisk /dev/sdbĬhanges will remain in memory only, until you decide to write them.īe careful before using the write command.ĭevice does not contain a recognized partition tableīuilding a new DOS disklabel with disk identifier 0x2c6fc8a9. OS is installed in /dev/sda disk and I want to create disk partition on second disk. In above commands output you can see I have 2 hard disk, first is /dev/sda: 16.1 GB and second is /dev/sdb: 4294 MB. I/O size (minimum/optimal): 512 bytes / 512 ~]# I/O size (minimum/optimal): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Here I am going to create hard disk partitions on one additional disk where there is no any partitions created. In this tutorial we are going to cover this steps:. Suppose if you have 6 partitions where 3 disk partitions are used by OS and 3 partitions is created for as a normal use then you can use your last 6 partition to extend one more partitions as like partition number 7.īut first you have to make sure your last 6 partitions have no any data and you have to delete this partition then you can create again with 6 and 7 partitions as per your disk space requirement. Then you can use fdisk command to create a new partitions with your extended last partitions of OS disk. You can also extend your exiting OS disk partitions if you want to create one additional partitions. Make sure you have one additional row disk where you want to create a partitions.
So first of all run this commands on your system to check disk information. We can use fdisk -l to display disk information.
I am going to use fdisk Linux tool to creating hard disk partitions.
#How to run a disk check on a 2nd drive how to
Now I will show you how to create a partition on this disk and mount to use this disk. Here I am using one Virtual machine where I have added one additional disk of 4GB. Dear friends in this tutorial I am going to show you step by steps hard disk partitions creation and mounting hard disk partitions in CentOS7.