homepage Welcome to WebmasterWorld Guest from 54.146.175.204
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Could not find the disk location of a directory
newbies

10+ Year Member



 
Msg#: 4662739 posted 4:57 pm on Apr 13, 2014 (gmt 0)

I have a backup directory as /backup, however, df command does not show this directory, as a result, I could not know where it is mounted. How can I find the disk where /backup is mounted?

I checked /etc/mtab and /proc/mounts, /backup is not there.

Thank you!

 

lammert

WebmasterWorld Senior Member lammert us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4662739 posted 1:42 am on Apr 14, 2014 (gmt 0)

The 'df' command gives you the list of currently mounted partitions and to which subdirectory they are mounted.

If /backup is not in that list but you can go to that directory and view the files in it, then /backup is not a separate partition but a subdirectory of the partition mounted on /

Another option is that /backup is a soft link to another directory where the real backup partition is mounted on. You can check this with the 'ls -l /backup' command. This command may show something like

lrwxrwxrwx 1 root root 25 Mar 13 2008 /backup -> /var/mnt/backuppart

In this example, the real mount point of the backup partition is /var/mnt/backuppart

newbies

10+ Year Member



 
Msg#: 4662739 posted 4:45 am on Apr 14, 2014 (gmt 0)

Thank you for your reply. I tried "li -l", but no help.

root@pxl [~]# ls -l /backup
total 12
drwx--x--x 3 root root 4096 Apr 13 09:47 ./
drwxr-xr-x. 23 root root 4096 Apr 9 00:07 ../
drwx--x--x 5 root root 4096 Dec 16 2012 cpbackup/

root@pxl [/]# ls -l
drwx--x--x 3 root root 4096 Apr 13 09:47 backup/

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4662739 posted 9:53 am on Apr 14, 2014 (gmt 0)

where is the root directory mounted?

as lammert described, if /backup is not mounted on a separate partition, it's mounted on the root directory ('df /').

newbies

10+ Year Member



 
Msg#: 4662739 posted 3:13 pm on Apr 14, 2014 (gmt 0)


root@pxl [~]# df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 10321208 827228 8969692 9% /

So, root is mounted on sda2. Nowhere to find /backup


root@pxl [~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 10321208 827228 8969692 9% /
tmpfs 1993612 0 1993612 0% /dev/shm
/dev/sda1 101133 50292 45619 53% /boot
/dev/sda8 446554024 33749756 390120572 8% /home
/dev/sda7 1032088 68548 911112 7% /tmp
/dev/sda3 10321208 5527784 4269136 57% /usr
/dev/sda5 10321208 3280288 6516632 34% /var


phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4662739 posted 9:26 pm on Apr 14, 2014 (gmt 0)

have you tried 'df /backup'?

i'm guessing it will say:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 10321208 827228 8969692 9% /
(or whatever the latest numbers are)

newbies

10+ Year Member



 
Msg#: 4662739 posted 3:52 am on Apr 15, 2014 (gmt 0)

thanks! df /backup works!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved