bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with 'df' on RedHat Linux with multiple "namespaces"


From: Pádraig Brady
Subject: Re: Problem with 'df' on RedHat Linux with multiple "namespaces"
Date: Fri, 01 Jan 2010 01:10:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 31/12/09 18:00, Lenga, Yair wrote:
Hi

I have an application that is using the Linux "unshare" system calls
> (on RedHat 5, or "clone" with CLONE_NEWNS), to allocate different volumes
> for different processes on the same mount point. This setup is used to
> allow multiple processes to run against different data sets, without
> having to change the code.

The 'df' command will report ALL the mount points of the system.
> I believe the order is based on the order of the mounts (first mounts
> listed first). For example, the system has '/home/ mounted from a file
> server, then few processes establish a local '/home/data' tree. For example:

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              8064304   1835928   5818720  24% /
/dev/sda1               101086     12178     83689  13% /boot
none                   4155280         0   4155280   0% /dev/shm
/dev/sda5             57874464  13076584  41857988  24% /home2
appnfs1:/home/dev    258144000  98499552 159644448  39% /home
/dist/2a             258144000  98499552 159644448  39% /home/data
/dist/5a             258144000  98499552 159644448  39% /home/data
/dist/7a             258144000  98499552 159644448  39% /home/data

The problem occur when typing 'df /home/data'. The output is:

$ df /home/data
Filesystem           1K-blocks      Used Available Use% Mounted on
/dist/2a             258144000  98499552 159644448  39% /home/data

This is very misleading (and probably wrong), as the /dist/data
> for the current process is on the "appnfs1" volume. It looks as
> the translation code that move from a path (e.g. /home/data),
> find the first match, regardless of the namespace associated for
> the current process. This logic cause few scripts to fail (e.g.,
> we have a script that checked for free space, before attempting
> to upload large number of files).

Please let me know if you need additional information.

I'm not sure it's related but could you give the output from
df -P as the -P option should always be used from scripts.

cheers,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]