Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

/Home on RHEL 5

Posted on 2011-05-11
12
Medium Priority
?
349 Views
Last Modified: 2013-12-16
I have a linux server running RHEL 5, My "df -k" shows this

 df -k /home
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-home
                       1015704     34228    929048   4% /apps/home

and in / directory I should
# ls -l /home
lrwxrwxrwx 1 root root 10 Jan  4 10:55 /home -> /apps/home

How do I delete /apps/home and only have /home.

In my /etc/fstab I have
# cat /etc/fstab |grep home
/dev/VolGroup00/home    /home                   ext3    nodev,noexec,nosuid        1 2
#/dev/VolGroup00/apphome                /apps/home              ext3    nodev,noexec,nosuid     1 2

Is it that I need to create a new LV and mount /home or remove the softlink. Please help
0
Comment
Question by:mnis2008
  • 6
  • 6
12 Comments
 
LVL 12

Expert Comment

by:upanwar
ID: 35739006
Just create a /home directory, it it is not created already.

# mkdir /home

# umount /apps/home

# mount /dev/VolGroup00/home /home

0
 

Author Comment

by:mnis2008
ID: 35739085
I already have /home created as I indicated
lrwxrwxrwx 1 root root 10 Jan  4 10:55 /home -> /apps/home

and when I try to umount /apps/home its saying
umount: /apps/home: device is busy
umount: /apps/home: device is busy
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35739129
It seems somebody is using /apps/home.

You can check which user or process are using the /apps/home and kill them.

# fuser /apps/home (to view who all are accessing it)

# fuser -km /apps/home (to kill)

or you can use

# umount -f /apps/home (to forced unmount the filesystem)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mnis2008
ID: 35739166
When I run a LVSCAN for /home here is what I get
ACTIVE            '/dev/VolGroup00/home' [1.00 GB] inherit

I have run the fuser, It kicked me out :) looks like i was accessing it


0
 
LVL 12

Accepted Solution

by:
upanwar earned 2000 total points
ID: 35739200
:)

No problem, Login again and check whether it is mounted or not.

If it is mounted then unmount it and then remove the symbolic link on /home and create /home directory.

# umount /apps/home

# rm /home

# mkdir /home

# mount /dev/VolGroup00/home /home
0
 

Author Comment

by:mnis2008
ID: 35739215
Should I change anything in fstab ..???
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35739230
Yes sir,

You have to just modify the fstab and remove make /home instead of /apps/home

Currently you have entry for /apps/home now it should be /home.



0
 

Author Comment

by:mnis2008
ID: 35739253
I have 2 entries in my fstab

/dev/VolGroup00/home    /home                   ext3    nodev,noexec,nosuid        1 2
/dev/VolGroup00/apphome                /apps/home              ext3    nodev,noexec,nosuid     1 2

How about uncommenting /dev/VolGroup00/apphome and rebooting ..???
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35739290
You are having the correct entry in the fstab file.

If you will uncomment the /dev/VolGroup00/apphome in fstab then after reboot.

/dev/VolGroup00/apphome would be mounted as /apps/home and /dev/VolGroup00/home would be mounted as /home
0
 

Author Comment

by:mnis2008
ID: 35739323
Sorry Upanwar,

I didnot quite get you, So if I uncomment  /dev/VolGroup00/apphome, Why will it mount as /apps/home..?? only /home should be mounted right, Please correct me
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35739382
As per the fstab file given by you.

Device                             Mount Point
/dev/VolGroup00/home    /home                   ext3    nodev,noexec,nosuid        1 2
/dev/VolGroup00/apphome                /apps/home              ext3    nodev,noexec,nosuid     1 2


so as per your fstab file /home is a mount point for /dev/VolGroup00/home and  /apps/home is a mount point for /dev/VolGroup00/apphome
0
 

Author Comment

by:mnis2008
ID: 35739445
Thanks All good
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month21 days, left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question