How to create a partition in Solaris Operating system?

In RHEL we use “fdisk” command to divide a disk in to individual partitions, likewise in Solaris, we execute “format” command to create the partitions.First, check how many hard disks available by running the following command,

Step:1 Check the Hard-disk details
#echo |format

From the above screenshot it has been confirmed we have one hard disk attached to the server.

Step:2 Check the currently configured partition details

Step:3 Use “partition” from the above list to select partition table

Step:4 Use “print” from the above list to display the current partition table details

As we can see from the above output slice 0,1,2,4,7,8 are already created, we can now only create a partition under slice 5.

Step:5 Select any unassigned slice to create a new partition (Here I have applied slice 5)

Step:6 Enter the partition id tag, if you use”?” then it will display the available tag and use one of those, Here I have used “reserved”

Step:7 Enter the partition permission flags, Same as above if you use “?” it will display the available flags .you can use one of those

Step:8 Enter the new starting cylinder, here I have applied 201 according to my existing partition table

Step:9 Enter the partition size, here I have used 500MB according to the existing partition table

Step:10 Again use the “print” to see the newly created partition table

As you can see from the above output, the newly created partition is shown in the partition table(slice 5)

Step:11 Now save the partition information to the kernel memory by using the “label” followed by yes

Note: If you forget to label the partition details to the kernel memory then it won’t be available for use.
Step:12 check the partition layout once again by using the “print” and exit from the format command by using the quit followed by “q”

Step:13 Create a new filesystem

In Linux we use the command “mkfs” to create a new filesystem, here we use “newfs” to create a new “ufs “file system


#newfs   <physical device name>

#newfs  /dev/rdsk/c0d0s5

Note: To create a new filesystem you must use the raw disk(rdsk)

As you can see from the above output the slice s5 is formatted successfully with the “ufs” filesystem

Step:14 Check  whether the file system is in the clean state
#fsck  /dev/rdsk/c0d0s5

Step:15 Now mount the filesystem to some mount point directory to bring the partition to online
#mkdir   /ORACLE

#mount  /dev/dsk/c0d0s5   /ORACLE

Step:16 Check the currently mounted filesystem information by using the following command
#df  -h

As you can see from the above screenshot the slice /dev/dsk/c0d0s5 has been successfully mounted on the mount point directory /ORACLE

In Our next article, I will show you how to make the partition available permanently even after restarting the server.

If you found this article useful, Kindly Subscribe here 👉🏿👉🏿  Click this link to Subscribe

Never miss an article Do like my official  FB page 👉🏿 Learn Linux in an easier way