Mount external hard drive's folder as partition visible in df
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mount external hard drive's folder as partition visible in df
Hello there,
I have an external drive which I mounted on /drive
in /drive I have 2 folders: Folder1 and Folder2
I'd like to somehow mount those 2 folders in root so they both can be accessed by /Folder1 and /Folder2 instead of the current /drive/Folder1
But the special thing in that request, is that both /Folder1 and /Folder2 would need to appear when I do the df command, a simple symbolic link is not enough for my needs (Amanda DLE's)
Are Folder1 and Folder2 the mountpoints of 2 separate partitions, or are they subdirectories of a filesystem mounted at /drive?
If the former, just put appropriate entries in your fstab. If the latter, df can't look at them separately - it can only report free space on a filesystem as a whole.
PS hardlinks can't be made across different filesystems
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Why don't we take a step back and ask what exactly you are trying to achieve and why. In other words, rather than asking a question about how you are trying to do something, let's get back to asking a question about what your purpose and reasoning is.
Since you are on Linux, using Amanda, I presume you are using gnutar for your backups. DLE's using gnutar don't need to be partitions. If you are using dump on Linux, don't.
From the Amanda FAQ: "A DLE refers to one entry in the disklist of an Amanda-configuration. General usage was to describe them as partitions, or file systems. But in fact they do not have to be either. They can be directory trees, or multiple trees, or trees with some branches cut off. So the more generic term DLE was coined."
You could create symbolic links to the subdirectories:
E.G.:
sudo ln -s /mnt/hpmedia/Documents/pdfdoc /pdfdoc
sudo ln -s /mnt/hpmedia/Documents/webarchives /webarchives
The links will be broken when /mnt/hpmedia/Documents is not mounted, but will be OK when it is mounted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.