create simple partition

create simple partition:
==========================================================================================================================
1> create partition in free disk space
#fdisk /dev/sda

press n to create new partition
enter first cylinder address { press Enter it will automatically take last cylinder of number from previous partition.}
enter last cylinder number { enter +noM, +noG etc to size . eg. +2G }

press w to temporarily save partition table

OR
#cfdisk /dev/sda

-select free space
-new partition tab
-define partition size eg. 1G
-beginning
-write / save & yes
-quit

==========================================================================================================================
2> permanantly save entry in partition table
# partx -a /dev/sda

Or

#reboot [ above command work 99% if not work reboot is required ]

Note : check the last partition name using “df -hT” command so we can easily create new partition.
==========================================================================================================================
3> format the partition
#mkfs.ext4 /dev/sda12
OR
#mkfs -t ext4 /dev/sda12
==========================================================================================================================
4> create mounting directory and temporay mounting
#mkdir /data1 [ you can create mounting directory at any location eg. #mkdir /home/mydata ]

#mount /dev/sda12 /data1
==========================================================================================================================
5> permanant mounting

#vim /etc/fstab

all the below line

partition_name    mount_point file_system_type  permission  dump  fsck

/dev/sda12  /data1            ext4        defaults          0     0

note : permission => ro, rw, defaults,
dump/fsck => 0 [ disable]. 1 [ enable or fsck value if any number then check file system after that days ]
==========================================================================================================================

6> Remounting partition
#mount -a

==========================================================================================================================

Posted in partitions

Leave a Reply