Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount options for xfs partitions #9421

Closed
PMA-Servizi opened this issue Oct 2, 2024 · 4 comments
Closed

mount options for xfs partitions #9421

PMA-Servizi opened this issue Oct 2, 2024 · 4 comments

Comments

@PMA-Servizi
Copy link

Hello,
I'm trying to deploy openebs-localpv/localpv-provisioner using hostpathClass.xfsQuota.enabled = true, every node has a dedicated disk (sdb) with a single xfs partition (sdb1). However provisioning the pv fail because quotas are not enabled.
I have created the partitions manually before attaching the disk and updating the machineconfig (mkfs.xfs /dev/sdb1).
I have not found any info in the docs regarding fstab options, only that some options can be included in machine.kubelet.extraMounts[].options, however if I add prjquota there, the kublet won't start.

These are all the current mounted xfs partitions:

$ talosctl cat /proc/mounts | grep xfs
/dev/sda5 /system/state xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
/dev/sda6 /var xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,prjquota 0 0
/dev/sdb1 /var/mnt/storage xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0

How can I mount xfs partition /dev/sdb1 with flag prjquota instead of noquota? like the EPHEMERAL volume..

More info:
MachineConfig:

machine:
    kubelet:
        extraMounts:
            - destination: /var/mnt/storage
              type: bind
              source: /var/mnt/storage
              options:
                - rbind
                - rshared
                - rw
    disks:
        - device: /dev/sdb
          partitions:
            - mountpoint: /var/mnt/storage

$ talosctl get discoveredvolumes

NODE          NAMESPACE   TYPE               ID      VERSION   TYPE        SIZE     DISCOVERED   LABEL       PARTITIONLABEL
00.000.0.00   runtime     DiscoveredVolume   loop0   1         disk        76 MB    squashfs
00.000.0.00   runtime     DiscoveredVolume   sda     1         disk        11 GB    gpt
00.000.0.00   runtime     DiscoveredVolume   sda1    1         partition   105 MB   vfat                     EFI
00.000.0.00   runtime     DiscoveredVolume   sda2    1         partition   1.0 MB                            BIOS
00.000.0.00   runtime     DiscoveredVolume   sda3    1         partition   982 MB   xfs          BOOT        BOOT
00.000.0.00   runtime     DiscoveredVolume   sda4    1         partition   524 kB   talosmeta                META
00.000.0.00   runtime     DiscoveredVolume   sda5    1         partition   99 MB    xfs          STATE       STATE
00.000.0.00   runtime     DiscoveredVolume   sda6    1         partition   9.4 GB   xfs          EPHEMERAL   EPHEMERAL
00.000.0.00   runtime     DiscoveredVolume   sdb     1         disk        54 GB    gpt
00.000.0.00   runtime     DiscoveredVolume   sdb1    1         partition   54 GB    xfs

$ talosctl get volumeconfigs

NODE          NAMESPACE   TYPE           ID           VERSION
00.000.0.00   runtime     VolumeConfig   /dev/sdb-1   2
00.000.0.00   runtime     VolumeConfig   EPHEMERAL    2
00.000.0.00   runtime     VolumeConfig   META         2
00.000.0.00   runtime     VolumeConfig   STATE        3

$ talosctl get volumeconfig /dev/sdb-1 -o yaml

node: 00.000.0.00
metadata:
    namespace: runtime
    type: VolumeConfigs.block.talos.dev
    id: /dev/sdb-1
    version: 2
    owner: block.UserDiskConfigController
    phase: running
    created: 2024-10-02T11:33:19Z
    updated: 2024-10-02T11:33:19Z
    labels:
        talos.dev/user-disk:
    finalizers:
        - block.VolumeManagerController
spec:
    type: partition
    provisioning:
        diskSelector:
            match: disk.dev_path == "/dev/sdb"
        partitionSpec:
            minSize: 0
            grow: false
            typeUUID: <uuid>
        filesystemSpec:
            type: xfs
    locator:
        match: volume.parent_dev_path == "/dev/sdb" && volume.partition_index == 1u
    mount:
        targetPath: /var/mnt/storage

$ talosctl version

Client:
        Tag:         v1.7.6
        SHA:         ae67123a
        Built:
        Go version:  go1.22.5
        OS/Arch:     linux/amd64
Server:
        NODE:        00.000.0.00
        Tag:         v1.8.0
        SHA:         5cc935f7
        Built:
        Go version:  go1.22.7
        OS/Arch:     linux/amd64
        Enabled:     RBAC
@smira
Copy link
Member
smira commented Oct 2, 2024

Specifying mount options is not supported right now, see #8367 as an umbrella issue for future improvements

@PMA-Servizi
Copy link
Author

alright.. do you think having option prjquota enabled by default on all extra xfs partitions (excluding the STATE volume) could lead to problems?

@smira
Copy link
Member
smira commented Oct 2, 2024

We are not looking towards something like that at the moment, once user volumes are implemented as part of #8367, we can revisit this

@PMA-Servizi
Copy link
Author

Ok then, I hope to see this feature in the future.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants