Skip to content

OSFileStore duplicates volumes when docker is installed #438

Closed

Description

@sify21

I referenced #425 to get usable disk space. However, I found an interesting problem with following code:
new SystemInfo().getOperatingSystem().getFileSystem().getFileStores()
Following pictures are the results when I run in debug mode in intellij, Please reference #436 for my actual disk info:
1
2
3
4
5

As you can see, OSFileStore doesn't count in my sda2,3,4 and8. That makes sense because I didn't mount sda2,3,4, and sda8 is a swap partition. The problem is that sda7 is counted three times! (see item 0,7,8 in above pictures)

Activity

  1. sify21 commented on Jan 5, 2018

    @sify21
    Author

    Right now I manually filter out OSFileStores with the same volume value, and then sum up the usable space of the rest. Is that the right path?

  2. dbwiddis commented on Jan 5, 2018

    @dbwiddis
    Member

    What is the result of a directory listing of /proc/self/mounts and/or any of the related CentOS mount commands?

  3. added
    bug?
    on Jan 5, 2018
  4. changed the title [-]problem with OSFileStore when docker is installed[/-] [+]OSFileStore duplicates volumes when docker is installed[/+] on Jan 5, 2018
  5. sify21 commented on Jan 5, 2018

    @sify21
    Author

    /proc/self/mounts file contains three sda7 items, mount -l shows the same info. See picture below:
    untitled

  6. dbwiddis commented on Jan 5, 2018

    @dbwiddis
    Member

    Well, the mount info is where OSHI gets its list and the duplicates there explain what happened. The question is what to do about it... should OSHI ignore volumes that it has seen before? Ignore anything in /var?

    I don't quite understand what's going on here; is docker overlaying its own drives on top of the existing drive?

  7. dbwiddis commented on Apr 13, 2018

    @dbwiddis
    Member

    Circling back to see what to do about this. Are you fine with OSHI reporting what's in mount even if there are duplicates? Or should OSHI filter out duplicates after seeing them the first time? Or should OSHI ignore /var/lib/docker paths?

  8. sify21 commented on Apr 13, 2018

    @sify21
    Author

    Well I think it's ok to include the duplicates, after all system info also includes them. Right now I'm filtering out them manually

  9. dbwiddis commented on Apr 13, 2018

    @dbwiddis
    Member

    OK, I"ll go ahead and close this issue!

  10. added
    containers
    on Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug?containers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions