LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot create directories as root under /home (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-create-directories-as-root-under-home-4175482824/)

sam.m 10-30-2013 03:02 PM

Cannot create directories as root under /home
 
Hi,
I have recently ran in to SUSE server which has LVM filesystems. I tried to create a directory under /home but got Permission Denied error. Listed below is a sample output. Is this due to a special configuration in linux or something needs to be fixed.

Note: var, opt, home are currently directories under / NOT fs, yet I still get the issue.

root@######:df -lk /var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
4194172 2262780 1931392 54% /
root@######:df -lk /opt
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
4194172 2262780 1931392 54% /
root@######:df -lk /home
Filesystem 1K-blocks Used Available Use% Mounted
- 0 0 0 - /home

bigrigdriver 10-30-2013 03:31 PM

Showing the output of the disk free command doesn't give much information to work with.

Far better would be to show us the commands you use and the output you get when you try to create the directory in /home.

suicidaleggroll 10-30-2013 03:50 PM

Also the output of df (without options) and mount

sam.m 10-30-2013 03:51 PM

Sure, when I run

root@######:mkdir /home/testdir
mkdir: cannot create directory `/home/testdir`: No such file or directory

bigrigdriver 10-30-2013 04:45 PM

So, that begs the question. Does /home exist?

Madhu Desai 10-30-2013 04:59 PM

Quote:

Originally Posted by sam.m (Post 5055423)
Note: var, opt, home are currently directories under / NOT fs, yet I still get the issue.

I dont understand this, all filesystems needs to be mounted under root(/), in some directory. So eventually, when listed, they all show under root(/).

Code:

root@######:df -lk /var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
4194172 2262780 1931392 54% /
root@######:df -lk /opt
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
4194172 2262780 1931392 54% /
root@######:df -lk /home
Filesystem 1K-blocks Used Available Use% Mounted
- 0 0 0 - /home

From the output, /var and /opt have no seperate logical volume, and are mounted under root(/). However, there is some problem in /home FS. Cause, had it been seperate LV, it would have shown as /dev/mapper/rootvg-<home lv>. Or atleast, if its not under LV, it would have shown as some /dev/sdX. But since its showing as -, you probably removed /home LV or partition.

sam.m 10-30-2013 05:29 PM

Exactly, when I do a df on /home it should show under "/" but thats not the case here and also home exists as a directory under "/".

sam.m 10-30-2013 05:31 PM

Also home does not have a separate logical volume in this case. Its supposed to be under "/".


All times are GMT -5. The time now is 11:38 AM.