Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cloudron `/system/filesystems` fails with LUKS device alias

Cloudron `/system/filesystems` fails with LUKS device alias

Scheduled Pinned Locked Moved Unsolved Support
filesystemdf
2 Posts 2 Posters 92 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nostrdevN
    nostrdevN
    nostrdev
    wrote last edited by joseph
    #1

    The Cloudron dashboard does not show disk usage (not in v10.0.2 nor earlier versions for at least a year). The request to:

    /api/v1/system/filesystems
    

    returns:

    {
      "status": "Internal Server Error",
      "message": "Cannot read properties of undefined (reading 'contents')"
    }
    

    Environment

    • Cloudron: 10.0.2
    • Ubuntu: 24.04.2 LTS
    • Kernel: 6.8.0-111-generic
    • Hosting: Hetzner
    • Storage layout: NVMe → mdadm RAID1 → LUKS → ext4

    The root filesystem itself is healthy and reports usage correctly:

    Filesystem                                            Type     1B-blocks          Used        Avail Use% Mounted on
    /dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac ext4 1883388502016 1367907303424 419734818816  77% /
    

    Box error

    The Box log contains:

    shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target
    shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target /home/yellowtent/platformdata
    
    {
      path: '/api/v1/system/filesystems',
      status: 500,
      error: HttpError: Cannot read properties of undefined (reading 'contents')
          at getFilesystems (file:///home/yellowtent/box/src/routes/system.js:153:28) {
        status: 500,
        internalError: TypeError: Cannot read properties of undefined (reading 'contents')
            at Object.getFilesystems (file:///home/yellowtent/box/src/system.js:112:42),
        details: null
      }
    }
    

    The relevant code in /home/yellowtent/box/src/system.js is:

    for (const stdPath of standardPaths) {
        const [dfPathError, diskInfo] = await safe(df.file(stdPath.path));
        if (dfPathError) throw new BoxError(BoxError.FS_ERROR, `Error getting std path: ${dfPathError.message}`);
        filesystems[diskInfo.filesystem].contents.push(stdPath);
    }
    

    Apparent cause

    The two df invocations identify the same root device using different names.

    An unqualified df reports:

    /dev/dm-0  ext4  ...  /
    

    A path-specific df reports:

    /dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac  ext4  ...  /
    

    These are aliases for the same device:

    /dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac → /dev/dm-0
    

    It appears that Cloudron initially indexes filesystems using the literal source returned by the unqualified df:

    filesystems[dfEntry.filesystem] = ...
    

    It then looks up the path-specific result using the other device alias:

    filesystems[diskInfo.filesystem].contents.push(stdPath);
    

    As a result, filesystems[diskInfo.filesystem] is undefined and the API throws while accessing .contents.

    It may be necessary to normalize device paths before using them as keys, or fall back to matching by mountpoint/device identity.

    Has anyone else encountered this with an mdadm + LUKS root filesystem? Is a fix planned for an upcoming Cloudron release?

    1 Reply Last reply
    3
    • girishG
      girishG
      girish
      Staff
      wrote last edited by girish
      #2

      Seems like a valid bug, we can take a look after Cloudron 10.0 . Logged it at https://git.cloudron.io/platform/box/-/work_items/906

      1 Reply Last reply
      3

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search