Installed the server version of Fedora in a lvm physical volume.
~]# df Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 4096 0 4096 0% /dev tmpfs 8147016 0 8147016 0% /dev/shm tmpfs 3258808 1992 3256816 1% /run /dev/mapper/fedora_hpz440-root 15718400 12344216 3374184 79% / tmpfs 8147020 36 8146984 1% /tmp /dev/nvme0n1p4 1038336 475108 563228 46% /boot /dev/nvme0n1p3 613184 6320 606864 2% /boot/efi tmpfs 1629400 3788 1625612 1% /run/user/1000
Quickly started running out of space. Created a second physical volume and used vgextend to add it to the volume group.
~]# vgextend fedora_hpz440 /dev/nvme0n1p6
Increased the size of the logical volume with some of the space of the second physical volume.
~]# lvextend -L +150G /dev/mapper/fedora_hpz440/root
~]# vgdisplay fedora_hpz440 File descriptor 53 (anon_inode:inotify) leaked on vgdisplay invocation. Parent PID 3867: -bash File descriptor 58 (/memfd:pulseaudio (deleted)) leaked on vgdisplay invocation. Parent PID 3867: -bash --- Volume group --- VG Name fedora_hpz440 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 12 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size <416.17 GiB PE Size 4.00 MiB Total PE 106539 Alloc PE / Size 90893 / 355.05 GiB Free PE / Size 15646 / <61.12 GiB VG UUID XbAT6W-lu9n-hnUQ-fzQT-ndfw-DiaQ-KZq75s
Still running out of space. df doesn't show any increase.
]# df Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 4096 0 4096 0% /dev tmpfs 8147008 0 8147008 0% /dev/shm tmpfs 3258804 2040 3256764 1% /run /dev/mapper/fedora_hpz440-root 15718400 13444136 2274264 86% / tmpfs 8147012 16 8146996 1% /tmp /dev/nvme0n1p4 1038336 573872 464464 56% /boot /dev/nvme0n1p3 613184 6316 606868 2% /boot/efi tmpfs 1629400 164 1629236 1% /run/user/1000
Can't find a command to actually resize the file system.
Robert McBroom via users wrote:
Installed the server version of Fedora in a lvm physical volume.
[...]
Quickly started running out of space. Created a second physical volume and used vgextend to add it to the volume group.
~]# vgextend fedora_hpz440 /dev/nvme0n1p6
Increased the size of the logical volume with some of the space of the second physical volume.
~]# lvextend -L +150G /dev/mapper/fedora_hpz440/root
Adding --resizefs to the lvextend command would do the trick. That calls fsadm to do the resizing, so you could just run fsadm now to finish resizing the underlying filesystem. Something like:
fsadm resize /dev/mapper/fedora_hpz440/root
Though it's worth reading fsadm(8) to check the options. It has a check command as well as --dry-run (-n) for use with the resize command.
The fsadm command is a convenient tool to resize various types of filesystems. You could also use one of the tools for your specific filesystem. Fedora Server uses xfs, IIRC, so xfs_growfs would be that tool. For ext{2,3,4}, you can use the resize2fs tool.
I'd use fsadm for its simplicity here. And even better is letting lvextend call it in the future. ;)
On 10/6/22 00:34, Todd Zullinger wrote:
Robert McBroom via users wrote:
Installed the server version of Fedora in a lvm physical volume.
[...]
Quickly started running out of space. Created a second physical volume and used vgextend to add it to the volume group.
~]# vgextend fedora_hpz440 /dev/nvme0n1p6
Increased the size of the logical volume with some of the space of the second physical volume.
~]# lvextend -L +150G /dev/mapper/fedora_hpz440/root
Adding --resizefs to the lvextend command would do the trick. That calls fsadm to do the resizing, so you could just run fsadm now to finish resizing the underlying filesystem. Something like:
fsadm resize /dev/mapper/fedora_hpz440/root
Though it's worth reading fsadm(8) to check the options. It has a check command as well as --dry-run (-n) for use with the resize command.
The fsadm command is a convenient tool to resize various types of filesystems. You could also use one of the tools for your specific filesystem. Fedora Server uses xfs, IIRC, so xfs_growfs would be that tool. For ext{2,3,4}, you can use the resize2fs tool.
I'd use fsadm for its simplicity here. And even better is letting lvextend call it in the future. ;)
fsadm resize /dev/mapper/fedora_hpz440/root
did nothing.
Had some space so tried
lvextend -L +10G --resize /dev/mapper/fedora_hpz440/root
which worked.
Looking at the fsadm man page and on the web there seems to be some ambiguity on the proper format of the device name.
/dev/fedora_hpz440: total used in directory 0 available 4 MiB drwxr-xr-x. 2 root root 60 Oct 7 16:21 . drwxr-xr-x. 21 root root 4800 Oct 5 21:40 .. lrwxrwxrwx. 1 root root 7 Oct 7 16:21 root -> ../dm-0
different from
/dev//vg///lv// in documentation.
Also /dev/mapper: total used in directory 0 available 4 MiB drwxr-xr-x. 2 root root 80 Oct 7 16:21 . drwxr-xr-x. 21 root root 4800 Oct 5 21:40 .. crw-------. 1 root root 10, 236 Oct 5 21:39 control lrwxrwxrwx. 1 root root 7 Oct 7 16:21 fedora_hpz440-root -> ../dm-0
Am 07.10.2022 um 23:21 schrieb Robert McBroom via users users@lists.fedoraproject.org:
On 10/6/22 00:34, Todd Zullinger wrote:
Robert McBroom via users wrote:
Installed the server version of Fedora in a lvm physical volume.
[...]
Quickly started running out of space. Created a second physical volume and used vgextend to add it to the volume group.
~]# vgextend fedora_hpz440 /dev/nvme0n1p6
Increased the size of the logical volume with some of the space of the second physical volume.
~]# lvextend -L +150G /dev/mapper/fedora_hpz440/root
Adding --resizefs to the lvextend command would do the trick. That calls fsadm to do the resizing, so you could just run fsadm now to finish resizing the underlying filesystem. Something like:
fsadm resize /dev/mapper/fedora_hpz440/root
Though it's worth reading fsadm(8) to check the options. It has a check command as well as --dry-run (-n) for use with the resize command.
The fsadm command is a convenient tool to resize various types of filesystems. You could also use one of the tools for your specific filesystem. Fedora Server uses xfs, IIRC, so xfs_growfs would be that tool. For ext{2,3,4}, you can use the resize2fs tool.
I'd use fsadm for its simplicity here. And even better is letting lvextend call it in the future. ;)
fsadm resize /dev/mapper/fedora_hpz440/root
did nothing.
Had some space so tried
lvextend -L +10G --resize /dev/mapper/fedora_hpz440/root
which worked.
[...]
Yes, "lvextend -L +10G --resize /dev/map…“ is the correct version.
Sometimes it is helpful to have a look into the Fedora Server Edition documentation, https://docs.fedoraproject.org/en-US/fedora-server/
e.g. Virtualization -> Managing virtual machines with Cockpit
I would like to recommend to use Cockpit for such common administration tasks as recommended. It makes live really much easier. And Cockpit is installed anyway.
-- Peter Boy https://fedoraproject.org/wiki/User:Pboy pboy@fedoraproject.org
Timezone: CET (UTC+1) / CEST (UTC+2)
Fedora Server Edition Working Group member Fedora docs team contributor Java developer and enthusiast