LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2008, 09:26 PM   #1
neemoze
LQ Newbie
 
Registered: Apr 2008
Posts: 10

Rep: Reputation: 0
Linux Disk structure


hi all

I installed RHEL4 on machine that has two harddisks (40GB each)

Since Oracle recommends that it is better to have Oracle data files on disk and Oracle backup files on different disk, I want to store the
backup files on the 2nd disk:
for example:
backup_files='/u01/app/oracle/........'

but how to find out the second disk path and assign backup files to it ???


fdisk command:
[root@linux1 ~]# fdisk -l

Disk /dev/hdc: 41.1 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 5005 40098240 8e Linux LVM

Disk /dev/hdd: 41.1 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 5005 40202631 8e Linux LVM


Thank you very much

Last edited by neemoze; 09-11-2008 at 09:52 PM.
 
Old 09-11-2008, 09:47 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: pclinuxos slackware64 tails kali
Posts: 3,372
Blog Entries: 33

Rep: Reputation: 217Reputation: 217Reputation: 217
df -h on my system only shows mounted partitions, and man df gives this info...

Quote:
df displays the amount of
disk space available on the file system containing each file name argument.
If no file name is given, the space available on all currently mounted file
systems
is shown.
Therefore you may need to give the hd a mount point.

I usually do this during the install process, but you should be able to do so by using a partition manager like qtparted.

If the 2 hd's are listed, select the second drive and give it a mount point so the file system can be mounted.

You will need to allow it to write a fstab file. You will need root access to do this.

Cheers, and I hope that helps.

Regards, Glenn
 
Old 09-11-2008, 11:20 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Is the disk you are using for a backup an external drive? From the fdisk list, it appears that you are using both your hard disk for Linux and both disks are used for a single lvm volume. The instructions you are reading seam to assume you are running solaris. Devices are named differently in Linux.
 
Old 09-12-2008, 01:39 PM   #4
neemoze
LQ Newbie
 
Registered: Apr 2008
Posts: 10

Original Poster
Rep: Reputation: 0
thank you guys

both HD are internal.. the OS is Redhat EL 4

Linux look at the 2 HDs as one space....


NOW:
1- the data files destenation is /u01/app/oracle/oradata
(how to know which HD they are on????)

2- the backup files destination is /u01/app/oracle/flashback_recovery_area



since i want to keep the datafile on 1st HD and backup files on the 2nd HD

In Oracle i can use a commend to give other distination to the backup file

i want to give a destination to the back files so that they are kept on the second HD

maybe it related to the mount point and fstab but i'm not sure (i'm lost in this area of linux)

Thanks
 
Old 09-12-2008, 03:30 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Your paths look very strange. I assume that that as an oracle thing. You use lvm. Both disks may be used to create a single volume. Run "vgs -o lv_name,device" to find out which disks are used for which logical volume. The devices mounted are lvm volume devices and not disk devices. You probably won't be able to do what Oracle recommends unless you create another lvm volume using another disk, or use another disk and use it for the backups.

Here is an example:
Code:
lvs -o lv_name,devices
  LV      Devices
  home    /dev/sdc6(0)
  home    /dev/sda1(0)
  rootvol /dev/sdc5(0)
  usr     /dev/sdc6(25805)
  usr     /dev/sdc5(12016)
  usr     /dev/sda1(114099)
There was an episode of TWiT (FLOSS) where a lead programmer for mysql's drizzle was interviewed. He was asked about backups. The response was that backups were handled by the MyIsam engine and not drizzle, but he recommended a flush followed by an lvm or jfs snapshot, using the same standard procedure as would be used to backup the application server. ( I don't remember if he mentioned jfs or another filesystem. ) LVM doesn't give you redundancy unless it's built on redundant components like a raid 5 array.

In Fedora core, there is a Graphical LVM2 manager. I'm sure that RHEL has the same. That can tell you at a glance which disk is used for which volume.

Last edited by jschiwal; 09-12-2008 at 03:40 PM.
 
Old 09-12-2008, 08:28 PM   #6
neemoze
LQ Newbie
 
Registered: Apr 2008
Posts: 10

Original Poster
Rep: Reputation: 0
[root@linux1 oracle]# lvs -o lv_name,devices
LV Devices
LogVol00 /dev/hdc2(0)
LogVol00 /dev/hdd1(0)
LogVol01 /dev/hdd1(1162)
 
Old 09-13-2008, 03:36 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Volume 0 includes both disks. The /etc/fstab file will tell you on which volume directories are mounted.
If hdd1 goes bad you will lose both volumes. You may want to install another disk or disk array for the database backup. I have an eSATA interface on my new laptop and bought an external drive with an eSATA input. I am very impressed with the speed. It also has a usb and firewire input port. You might consider something like that for a backup. Between backups, you can store it off site. If you are using this database server commercially, I would also recommend using raid for redundancy.
 
Old 09-13-2008, 01:51 PM   #8
neemoze
LQ Newbie
 
Registered: Apr 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you jschiwal
actually after getting the OCA i'm preparing for OCP certificate from Oracle (home training),,
since i have 2HDDs on my machine i thought it a good practice to keep datafiles on a HD
and the backups on the other.

as i understood i should've set the HDDs during Redhat installation so that i can do so..right??.

thank you again for your great help>>
 
Old 09-13-2008, 03:32 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Do you perform the backups manually or are you configuring automatic backups? You could use a fireware or eSATA external drive for backups. Then if one of the drives become hosed, you can still recover your oracle data. Plus if you mount it on the same mount point you would another drive, you could follow their recommendation and examples.

Good luck with your certificate training!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 06:46 PM
structure of linux kuldeep singh Linux - Newbie 2 04-25-2008 05:10 AM
the on-disk structure of the ext3 file system SeRGeiSarov Linux - Software 1 06-04-2007 01:00 PM
Directory structure in linux hero Linux - Newbie 1 09-04-2003 03:55 AM
Linux Directory Structure cmfarley19 Linux - General 1 01-03-2003 08:20 AM


All times are GMT -5. The time now is 06:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration