0% found this document useful (0 votes)
20 views3 pages

Add New Mount in Linux

1. A new partition, /dev/sda12, was created on /dev/sda of size 10GB using fdisk. 2. The /dev/sda12 partition was formatted using XFS filesystem. 3. The formatted /dev/sda12 partition was mounted on the newly created directory /u009.

Uploaded by

Rahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Add New Mount in Linux

1. A new partition, /dev/sda12, was created on /dev/sda of size 10GB using fdisk. 2. The /dev/sda12 partition was formatted using XFS filesystem. 3. The formatted /dev/sda12 partition was mounted on the newly created directory /u009.

Uploaded by

Rahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

---------------------------------------

1. Create one sub partition of /dev/sda


---------------------------------------

We can also add new disk in virtul box if needed


If its new disk it will be displayed as /dev/sdb
we need to create one partition like /dev/sdb1 in that case and use /dev/sdb1

[root@rac3 ~]# fdisk /dev/sda


Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p p <================================================= Press


p to print

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors


Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000aa65b

Device Boot Start End Blocks Id System


/dev/sda1 2048 61442047 30720000 83 Linux
/dev/sda2 61442048 122882047 30720000 83 Linux
/dev/sda3 * 122882048 163842047 20480000 83 Linux
/dev/sda4 163842048 419430399 127794176 5 Extended
/dev/sda5 163844096 204804095 20480000 83 Linux
/dev/sda6 204806144 217094143 6144000 82 Linux swap / Solaris
/dev/sda7 217096192 229384191 6144000 83 Linux
/dev/sda8 229386240 249866239 10240000 83 Linux
/dev/sda9 249868288 270839807 10485760 83 Linux
/dev/sda10 270841856 291813375 10485760 83 Linux
/dev/sda11 291815424 312786943 10485760 83 Linux

Command (m for help): n <================================================= Press n


for new partition
All primary partitions are in use
Adding logical partition 12
First sector (312788992-419430399, default 312788992): p <===============Enter
default
Using default value 312788992
Last sector, +sectors or +size{K,M,G} (312788992-419430399, default 419430399):
+10G <======= Select size for partittion
Partition 12 of type Linux and of size 10 GiB is set

Command (m for help): p <================================================= Press p


to print

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors


Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000aa65b
Device Boot Start End Blocks Id System
/dev/sda1 2048 61442047 30720000 83 Linux
/dev/sda2 61442048 122882047 30720000 83 Linux
/dev/sda3 * 122882048 163842047 20480000 83 Linux
/dev/sda4 163842048 419430399 127794176 5 Extended
/dev/sda5 163844096 204804095 20480000 83 Linux
/dev/sda6 204806144 217094143 6144000 82 Linux swap / Solaris
/dev/sda7 217096192 229384191 6144000 83 Linux
/dev/sda8 229386240 249866239 10240000 83 Linux
/dev/sda9 249868288 270839807 10485760 83 Linux
/dev/sda10 270841856 291813375 10485760 83 Linux
/dev/sda11 291815424 312786943 10485760 83 Linux
/dev/sda12 312788992 333760511 10485760 83 Linux

Command (m for help): wq <=========================== Save it


The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource
busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@rac3 ~]# partprobe <======================== make kernel aware about
newly created partition
[root@rac3 ~]#

-------------
2. Format it
-------------

[root@rac3 ~]# partprobe


[root@rac3 ~]# mkfs.xfs /dev/sda12
meta-data=/dev/sda12 isize=256 agcount=4, agsize=655360 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0, sparse=0
data = bsize=4096 blocks=2621440, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@rac3 ~]# echo $?
0
[root@rac3 ~]#

------------
3. Mount it
------------

Create directory for new mount point under /

mkdir /u009

mount /dev/sda12 /u009

-----------
4. Verify
-----------

[root@rac3 ~]# df -h /u009


Filesystem Size Used Avail Use% Mounted on
/dev/sda12 10G 33M 10G 1% /u009
[root@rac3 ~]#

-------------------------------------------------------
5. Make persistant after reboot by adding in /etc/fstab
--------------------------------------------------------

vi /etc/fstab

/dev/sda12 /u009 xfs defaults


0 0

---------------------------------------------
6. change ownership and permissions as needed
---------------------------------------------

chown -R oracle:oinstall /u009


chmod -R 775 /u009

[root@rac3 ~]# ls -ld /u009


drwxrwxr-x. 2 oracle oinstall 6 Jul 4 14:02 /u009
[root@rac3 ~]#

You might also like