Welcome to WebmasterWorld Guest from 107.22.87.205

Forum Moderators: bakedjake

Message Too Old, No Replies

Could not find the disk location of a directory

     
4:57 pm on Apr 13, 2014 (gmt 0)

10+ Year Member



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!
1:42 am on Apr 14, 2014 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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
4:45 am on Apr 14, 2014 (gmt 0)

10+ Year Member



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/
9:53 am on Apr 14, 2014 (gmt 0)

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



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 /').
3:13 pm on Apr 14, 2014 (gmt 0)

10+ Year Member




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

9:26 pm on Apr 14, 2014 (gmt 0)

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



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)
3:52 am on Apr 15, 2014 (gmt 0)

10+ Year Member



thanks! df /backup works!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month