LinuxQuestions.org
Review your favorite Linux distribution.
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 07-16-2010, 05:38 AM   #1
shibu_sp
Member
 
Registered: Aug 2007
Posts: 57

Rep: Reputation: 15
rename filesystem


Hi

We are using RHEL 4 with following mount points.

Quote:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdd3 4.9G 183M 4.4G 4% /
/dev/hdd1 289M 14M 261M 5% /boot
none 502M 0 502M 0% /dev/shm
/dev/hda2 7.7G 5.5G 1.9G 75% /home
/dev/hdd5 4.7G 43M 4.4G 1% /opt
/dev/hda1 20G 8.9G 9.5G 49% /oracle
/dev/hda3 4.9G 523M 4.1G 12% /tmp
/dev/hdd2 8.7G 6.2G 2.1G 75% /usr
/dev/hda6 1.2G 258M 864M 23% /var
[root@localhost ~]#

I want to change /oracle to /data.


Is it possible

Thanks in Advance

Shibu
 
Old 07-16-2010, 05:54 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

Check your /etc/fstab file for an entry that mounts /dev/hda1 on /oracle.

If it is there, do the following (as root):

1) stop any application(s) that uses /oracle
2) unmount /dev/hda1 (umount /dev/hda1)
3) rename your mountpoint to data (cd / ; mv oracle data
4) change the entry in the /etc/fstab file (change /oracle to /data)
5) mount the entry again (mount /dev/hda1)
- change hardcoded entries that point to /oracle to the new situation (/data)
6) start the stopped application(s) and check the logfiles.

If all went well hda1 is mounted on /data. Check with df -h

BTW: Are you sure there aren't any hardcoded entries that still point to /oracle?? You do need to make sure those are changed too!! If these changes need to be made do that between steps 5 and 6. Do check all the relevant logfiles after restarting the application(s) that use /data.

Make sure you have a working backup before you start doing this.

Hope this helps.

Last edited by druuna; 07-16-2010 at 05:57 AM. Reason: fixed typo
 
Old 07-16-2010, 06:35 AM   #3
shibu_sp
Member
 
Registered: Aug 2007
Posts: 57

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

Check your /etc/fstab file for an entry that mounts /dev/hda1 on /oracle.

If it is there, do the following (as root):

1) stop any application(s) that uses /oracle
2) unmount /dev/hda1 (umount /dev/hda1)
3) rename your mountpoint to data (cd / ; mv oracle data
4) change the entry in the /etc/fstab file (change /oracle to /data)
5) mount the entry again (mount /dev/hda1)
- change hardcoded entries that point to /oracle to the new situation (/data)
6) start the stopped application(s) and check the logfiles.

If all went well hda1 is mounted on /data. Check with df -h

BTW: Are you sure there aren't any hardcoded entries that still point to /oracle?? You do need to make sure those are changed too!! If these changes need to be made do that between steps 5 and 6. Do check all the relevant logfiles after restarting the application(s) that use /data.

Make sure you have a working backup before you start doing this.

Hope this helps.

Hi

Thanks for UR reply


i can't mount the same point because the /dev/hda1 is missing. The error as follows...

1) stop any application(s) that uses /oracle


2) unmount /dev/hda1 (umount /dev/hda1)

[root@localhost /]# umount /dev/hda1


3) rename your mountpoint to data (cd / ; mv oracle data

[root@localhost /]# mv oracle data


4) change the entry in the /etc/fstab file (change /oracle to /data)

[root@localhost /]# vi /etc/fstab

Quote:
5) mount the entry again (mount /dev/hda1)

mount: can't find /dev/hda1 in /etc/fstab or /etc/mtab

[root@localhost /]# ls
bin dev initrd media opt sbin sys u01
boot etc lib misc proc selinux tftpboot usr
data home lost+found mnt root srv tmp var

[root@localhost data]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdd3 4.9G 183M 4.4G 4% /
/dev/hdd1 289M 14M 261M 5% /boot
none 502M 0 502M 0% /dev/shm
/dev/hda2 7.7G 5.5G 1.9G 75% /home
/dev/hdd5 4.7G 43M 4.4G 1% /opt
/dev/hda3 4.9G 523M 4.1G 12% /tmp
/dev/hdd2 8.7G 6.2G 2.1G 75% /usr
/dev/hda6 1.2G 258M 864M 23% /var
[root@localhost data]#


--

Shibu
 
Old 07-16-2010, 06:40 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

Can you post the output of the following commands:

ls -l /dev/hda1
and
grep hda1 /etc/fstab
 
Old 07-16-2010, 06:42 AM   #5
shibu_sp
Member
 
Registered: Aug 2007
Posts: 57

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

Can you post the output of the following commands:

ls -l /dev/hda1
and
grep hda1 /etc/fstab

hi

Quote:
[root@localhost oracle]# ls -l /dev/hda1
brw-rw---- 1 root disk 3, 1 Jul 16 2010 /dev/hda1
[root@localhost oracle]# grep hda1 /etc/fstab
[root@localhost oracle]#

Shibu
 
Old 07-16-2010, 06:52 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Hi,

You probably changed the fstab line wrongly (the grep command should have returned 1 line containing /dev/hda1). The ls command gives the correct/expected output.

Check the line you edited it should look like this (roughly): /dev/hda1 /data <more options> (the first 2 being relevant).

If that doesn't help: Please post your /etc/fstab file so we can have a look.

PS: I'm about to go home, so my next answer could take a while.

Hope this helps.
 
Old 07-16-2010, 06:59 AM   #7
shibu_sp
Member
 
Registered: Aug 2007
Posts: 57

Original Poster
Rep: Reputation: 15
Hi


Now Its Working


Used command

Quote:
mount -a
Thanks a Lot

Shibu
 
Old 07-16-2010, 09:37 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
You're welcome
 
  


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
rename errorsunknownp Linux - Newbie 2 12-28-2008 06:06 AM
Confusing USB Filesystem Problem (Can't Wipe Ext3 Filesystem) dkaplowitz Linux - Hardware 3 04-14-2007 07:30 PM
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 11:35 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 04:58 PM
Rename my pc ? Tanc Linux - Newbie 6 09-13-2003 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:15 PM.

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