Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
Could not find the disk location of a directory newbies
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!
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
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/
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 /').
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
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
thanks! df /backup works!