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

storage: resize function for vfat FS does not work #132

Open
lilinredhat1 opened this issue Jul 21, 2020 · 2 comments
Open

storage: resize function for vfat FS does not work #132

lilinredhat1 opened this issue Jul 21, 2020 · 2 comments

Comments

@lilinredhat1
Copy link

Hi,
I found resize function for vfat FS does not work on rhel7. The size of disk is 20G. The size of VG is 20G. volume size has not changed when do resize from 19g to 25g, but the output by the terminal shows passed and does not report ERROR "exceed the size of disk".

playbook

---
- hosts: all
  become: true
  vars:
    mount_location: '/opt/test1'
    volume_group_size: '20g'
    volume_size_before: '19g'
    volume_size_after: '25g'
    storage_safe_mode: false

  tasks:
    - include_role:
        name: storage

    - include_tasks: get_unused_disk.yml
      vars:
        min_size: "{{ volume_group_size }}"
        max_return: 1

    - name: Create one LVM logical volume with "{{ volume_size_before }}" under one volume group
      include_role:
        name: storage
      vars:
          storage_pools:
            - name: foo
              disks: "{{ unused_disks }}"
              type: lvm
              volumes:
                - name: test1
                  fs_type: 'vfat'
                  size: "{{ volume_size_before }}"
                  mount_point: "{{ mount_location }}"

    - shell: lsblk | grep foo-test1

    - shell: mount | grep foo-test1

    - include_tasks: verify-role-results.yml

    - name: Change volume_size  "{{ volume_size_after }}"
      include_role:
        name: storage
      vars:
          storage_pools:
            - name: foo
              type: lvm
              disks: "{{ unused_disks }}"
              volumes:
                - name: test1
                  fs_type: 'vfat'
                  size: "{{ volume_size_after }}"
                  mount_point: "{{ mount_location }}"

    - shell: lsblk | grep foo-test1

    - shell: mount | grep foo-test1

    - include_tasks: verify-role-results.yml

    - name: Clean up
      include_role:
        name: storage
      vars:
          storage_pools:
            - name: foo
              disks: "{{ unused_disks }}"
              state: absent
              volumes:
                - name: test1
                  size: "{{ volume_size_after }}"
                  mount_point: "{{ mount_location }}"

    - include_tasks: verify-role-results.yml

output log

task path: /root/ansible-test/upstream/storage/tasks/main-blivet.yml:113
ok: [192.168.122.96] => {
    "blivet_output": {
        "actions": [],
        "changed": false,
        "failed": false,
        "leaves": [
            "/dev/vda1",
            "/dev/mapper/rhel_ansible--el7-swap",
            "/dev/mapper/rhel_ansible--el7-root",
            "/dev/mapper/foo-test1",
            "/dev/vdc",
            "/dev/sr0"
        ],
        "mounts": [
            {
                "dump": 0,
                "fstype": "vfat",
                "opts": "defaults",
                                                     "passno": 0,
                "path": "/opt/test1",
                "src": "/dev/mapper/foo-test1",
                "state": "mounted"
            }
        ],
        "packages": [
            "dosfstools",
            "xfsprogs",
            "e2fsprogs",
            "lvm2"
        ],
        "pools": [''' 
            {
                "disks": [
                    "vdb"
                ],
                "name": "foo",
                "state": "present",
                "type": "lvm",
                "volumes": [
                    {
                        "_device": "/dev/mapper/foo-test1",
                        "_mount_id": "/dev/mapper/foo-test1",
                        "fs_create_options": "",
                        "fs_label": "",
                        "fs_overwrite_existing": true,
                        "fs_type": "vfat",
                        "mount_check": 0,
                        "mount_device_identifier": "uuid",
                        "mount_options": "defaults",
                        "mount_passno": 0,
                        "mount_point": "/opt/test1",
                        "name": "test1",
                        "pool": "foo",
                        "size": "25g",
                        "state": "present",
                        "type": "lvm"
                    }
                ]
            }
        ],
        "volumes": []
    }
}


PLAY RECAP **************************************************************************************
192.168.122.96             : ok=173  changed=8    unreachable=0    failed=0    skipped=29   rescued=0    ignored=0

@lilinredhat1 lilinredhat1 changed the title resize function for vfat FS does not work on rhel7.9 Beta resize function for vfat FS does not work on rhel7 Jul 21, 2020
@dwlehman
Copy link
Collaborator

I'm not aware of any tooling in RHEL or fedora that can resize vfat. Am I missing something?

@pcahyna
Copy link
Member

pcahyna commented Jul 22, 2020

@dwlehman it is quite possible that there isn't any. parted used to support it (https://git.savannah.gnu.org/gitweb/?p=parted.git;a=blob;f=doc/parted.texi;h=ecb6574ae75eed9683c7a5287afe8136434a74bf;hb=9fd24d772de1f024a24b7fa039af3e2c6b5f9b9a#l967 ) but this code was removed after version 2.4.
So the problem lies rather in tracking what is expected to work and what is not.

@yizhanglinux yizhanglinux changed the title resize function for vfat FS does not work on rhel7 storage: resize function for vfat FS does not work on rhel7 Jul 31, 2020
@yizhanglinux yizhanglinux changed the title storage: resize function for vfat FS does not work on rhel7 storage: resize function for vfat FS does not work Sep 7, 2020
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

3 participants