cancel
Showing results for 
Search instead for 
Did you mean: 

Parse a disk on Linux

SOLVED
Go to solution
scott_417
Frequent Advisor

Parse a disk on Linux

Usually on Windows operating system, the same hard drive/disk can be logically parsed into C: drive, D: drive. But on Linux, the file system all starts from the root.

How should I parse a disk? --so that I can place the OS on a path, the DBMS on another path, the log file on another et.


Thanks

Scott
11 REPLIES
GGA
Trusted Contributor

Re: Parse a disk on Linux

hello

ur right, linux starts from root /.
if u are installing a system u should have following partitions

/
/var
/usr
/tmp
/home
/what u like = here u can put into ur appl. or anything.

create the partitions based on what ur server works for.
if u are logging many the /var should greater

if u have this strukure root is enough with 1 gb

regards gga
GGA
Trusted Contributor

Re: Parse a disk on Linux

hello

sorry i forgot /swap ....
Ivan Ferreira
Honored Contributor
Solution

Re: Parse a disk on Linux

Let me explain further. When you have a disk in linux, the disk have a name. Suppose a SCSI disk, the name will be sda, if you have two, will be sda and sdb.

Every partition in the disk will be named 1,2,3,4,etc. So, one disk wich haves 4 partitions will look like sda1, sda2, sda3, sda4.

Every partition can mi "placed" in a directory, that's what is called "mounted".

The linux operating system normally uses at least two partitions for the OS, one for the files an other for the "swap".

So, for 3 disks:

1 Disk, operating system, two partitions

sda1 and sda2

sda1 will be the root filesystem.
sda2 will be the swap partition.

2 Disk, database, two partitions

sdb1 will be mounted in /oracle
sdb2 will be mounted in /oradata

3 disk, one partition

sdc1 will be mounted in /oralogs

When you save data to these directories, as the device is "mounted" there, you will be accessing the corresponding disk.

If the disks are hardware raid, there is no difference. Every hardware raid will be seen as a normal disk (sda, sdb, sdc, etc).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
scott_417
Frequent Advisor

Re: Parse a disk on Linux

Thanks for the response. Then what should be the capacity (in GB) for each of the partisions?


Thanks.
Mark Ellzey
Valued Contributor

Re: Parse a disk on Linux

Scott,


>Then what should be the capacity (in GB) for >each of the partisions?

Like most everything in UNIX, the answer is:

"It depends..."

As an example, my default installation of Red Hat 9 has the following partitions:

Filesystem Size Used Avail Use% Mounted on
/dev/hda2 8.5G 3.9G 4.2G 49% /
/dev/hda1 99M 9.3M 85M 10% /boot
none 220M 0 220M 0% /dev/shm

This is a 10GB IDE disk (hence the /dev/hda specification). Red Hat used 100MB for the /boot partition, 220MB for swap & the rest of the disk for the / partition.

Now, I could have changed this layout when I was installing Red Hat, but this is just my desktop PC, not a server. If I were installing on a server, I would create separate partitions (or even disks) for /var and /tmp and make them big. I would also create separate partitions for my application data. The idea is that you want only OS related files in the / partitions, and all other stuff gets mounted onto / at boot time.

Hope this helps,
Mark

Ivan Ferreira
Honored Contributor

Re: Parse a disk on Linux

The size depends, for the operating system, normally you will need at least 6-10 GB, for the swap partition, you need at least a size = RAM (2xRAM is very common to use). So, you may use a whole disk for the operating system, if the disk is 32 GB and the system has 8 GB RAM, you will partition:

sda1 (24 GB) (root filesystem "/")
sda2 (8 GB) (swap partition)

You can also have a more complex configuration:

sda1 150MB /boot
sda2 8GB swap
sda3 10 GB /
sda4 13 GB /var

And you can play with this as you want.

Now for the database, it depends of the size of the database. Distribute the database files and log files among disks instead of partitions, you will have better performance.

There are severals factors that matter when partitioning disk for the operating system and databases, these include, access patterns (secuential, random), quota limit, mount options, backup, etc.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
scott_417
Frequent Advisor

Re: Parse a disk on Linux

Thanks again for the suggestion. Could you provide some more suggestion on partision (in GB) for the database? In this case, it is Oracle Database 10g Standard Edition.

My plan is to put the Linux OS, and Oracle DBMS on Disk 1 (which is mirrored by Disk 2 or RAID 1 implemented);

While the Oracle data files and any log files, are put to Disks 3 and 4, with the parity being automatically put on Disk 5, or whatever the RAID system will organize since Disks 3, 4 and 5 are under RAID 5.


Thanks.

Scott
GGA
Trusted Contributor

Re: Parse a disk on Linux

hello

the size of the partitions depend on the database how great are ur db and how it will grow.

if u have raid 5 there it is important for u where ur partitions are, u are only see one partition ... so i dont understand ur question about the disks.

take lvm for the system then u can extend the filesystem easyer if the space go out.

/ 1024
/var 3072
/usr 4096
/home 4096
/tmp 2048
/oradata 10240
/oralog 10240

hope this help u
regards gga
scott_417
Frequent Advisor

Re: Parse a disk on Linux

Maybe I should not post the following question on this forum, but it seems to me that this threading is more knowledgeable on this issue, So I'll give a try:

Plan to install Oracle Database 10g on the Linux Operating System. The Oracle software will be installed at /opt/oracle directory. But,

1) For the oracle data file I prefer to install it on /var/oradata, and

2) For the oracle log file I prefer to install it on /var/oralog

How can I realize this (I do not see the place where I can specify the above information during the installation. Then how and where can I make a specification to direct the log and data the designated directories)?



Thanks to help and
Happy New Year! to all


Scott

Ivan Ferreira
Honored Contributor

Re: Parse a disk on Linux

I prefer to think in the /var directory as variable data, like log files or spool files, so, I would install the database files at /oradata and /oralogs, or /db/oradata and /db/oralogs.

During installation, you should be able to create the partitions and manually assign to them the mount point. Do not expect that the mount point will be available in the drop down list, manually assign the mount point to the desired partition.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?

Re: Parse a disk on Linux

If you are planning to install Oracle in a production environment you should follow the guidelines for Optimal Flexible Architecture (OFA). OFA is recommended for all Oracle installations and it will make it easier to support your installation.

I personally like the fact that OFA keeps your Oracle installation separate from the filesystens used by the OS installation.

- Alex