Site icon IT Tutorial

Oracle Linux disk format and mount Steps

Hi,

You can format and mount any disk which is attached a new disk to the server.

You can partition /dev/sdb disk with fdisk tool like below.

[root@deveci ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x786292ec.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): 
Using default value 1305

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@deveci ~]#

 

 

You can format partitioned disk  ( ext4 type ) like below

[root@deveci-1 ~]# 
[root@deveci-1 ~]# mkfs -t ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376

Writing inode tables: done 
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@deveci-1 ~]#

 

You can create related directory and mount this volume group with this directory.

[root@deveci-1 /]# mkdir /oracle
[root@deveci-1 /]# mount -t ext4 /dev/sdb1 /oracle
[root@deveci-1 /]# 
[root@deveci-1 /]# 
[root@deveci-1 /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_ora12c-lv_root
                       46G   24G   19G  56% /
tmpfs                 1.7G  779M  940M  46% /dev/shm
/dev/sda1             485M   76M  384M  17% /boot
/dev/sdc             1008M   34M  924M   4% /oracle
[root@deveci-1 /]#

 

 

Do you want to learn Linux System Administration for Beginners, then read the following articles.

https://ittutorial.org/linux-administration-tutorial-for-beginners/

Exit mobile version