LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2009, 08:59 AM   #1
stodge
Member
 
Registered: Jan 2002
Posts: 52

Rep: Reputation: 15
mount --bind with vsftpd, du -h sums multiple copies of the same files


I'm jailing virtual users in vsftpd, but I'm giving them access to project directories using mount --bind. However, when I do du -h to check project disk usage, I'm seeing 28Gb used instead of 350Mb (approx numbers from memory). The disk usage command is summing one copy of the files in one directory for every time the project directory is mounted. Is this a valid side effect of using mount --bind or do I have something mis-configured?

For example, my project root is:

/srv/download/projects

e.g.

/srv/download/projects/one

Users are all stored under:

/srv/download/users

So I am jailed to:

/srv/download/users/mike

A project directory is mounted using --bind for each user on that project:

/srv/download/users/mike/projects/one

So if I upload a 1MB file to

/srv/download/users/mike/projects/one/one_meg_file.dat

and if the 'one' project has 20 members, the following shows 21Mb instead of just 1Mb:

cd /srv/download && du -h

Is this expected?

Thanks
 
Old 12-17-2009, 10:28 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by stodge View Post
Is this expected?
Yes, you're making the same directory structure available in different places and 'du' only sees those directory structures. While not applicable symlinking would be treated differently (as in "-P").
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple program copies with .bash_profile? grndfl Linux - General 4 09-03-2009 03:39 PM
Multiple page copies under cups? Rehumanize Linux - Networking 1 08-09-2008 06:04 AM
vsftpd - multiple configuration files zaoka Linux - Server 1 08-27-2006 08:29 AM
Cups, Samba and multiple copies ARC1450 Linux - Networking 0 03-04-2006 10:35 PM
Printing multiple copies wjn Linux - Networking 4 12-16-2003 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration