Mount Alist on Linux
# install davfs2
sudo apt install davfs2
sudo vim /etc/davfs2/davfs2.conf
# ignore_dav_header 1
# read_timeout 7200
# cache_size 128000 # MiByte
sudo mkdir /mnt/webdav
# test run
sudo mount -t davfs https://alist.example.com/dav /mnt/webdav
ls -al /mnt/webdav/
# prepare for non-root access
sudo vim /etc/fstab
# https://alist.example.com/dav /mnt/webdav davfs _netdev,noauto,user 0 0
sudo usermod -a -G davfs2 evlos
# re-login
groups
mount /mnt/webdav
rsync -avP /mnt/u/Fonts /mnt/webdav/Fonts --exclude=Thumbs.db --inplace --append --append-verify --size-only --delete --timeout 7200
The issue encountered during the process
An error occurs when transferring a large number of files:
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(644) [sender=3.1.2]
rsync: write failed on "/mnt/webdav/Fonts/DFMrm7.ttc": No space left on device (28)
There are no error logs on kubectl exec -it deployments/alist -- tail -f -n 100 /opt/alist/data/log/log.log
.
It was observed that Alist stopped transferring after a while, finishing earlier than Rsync, with half of the files successfully transferred.
> journalctl -xe
Dec 23 01:58:26 console mount.davfs[16680]: davfs2 1.5.4
Dec 23 01:58:49 console mount.davfs[16681]: open files exceed max cache size by 13933 MiBytes
Dec 23 01:58:59 console mount.davfs[16681]: open files exceed max cache size by 13933 MiBytes
Dec 23 02:08:04 console mount.davfs[17086]: error writing directory /home/evlos/.davfs2/cache/alist.example.com-dav+mnt-webdav+evlos/dir-Fonts-YvAmnf
evlos@console ~> df -lh
/dev/mapper/console--vg-root 31G 29G 0 100% /
It seems I complicated a simple issue :)
Extend /dev/sda
First, expand the disk size in Proxmox, and then:
evlos@console ~> sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 172GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 34.4GB 34.4GB primary boot, lvm
(parted) resizepart 1 100%
(parted) quit
Information: You may need to update /etc/fstab.
evlos@console ~> sudo partprobe /dev/sda
evlos@console ~> sudo pvresize /dev/sda1
Physical volume "/dev/sda1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
evlos@console ~> sudo vgdisplay
--- Volume group ---
VG Name console-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <160.00 GiB
PE Size 4.00 MiB
Total PE 40959
Alloc PE / Size 8191 / <32.00 GiB
Free PE / Size 32768 / 128.00 GiB
VG UUID 3vPnjM-HCw0-tzPN-6Cwi-xHsH-vCL7-I40UM6
evlos@console ~> sudo lvextend -l +100%FREE /dev/mapper/console--vg-root
Size of logical volume console-vg/root changed from <31.04 GiB (7946 extents) to <159.04 GiB (40714 extents).
Logical volume console-vg/root successfully resized.
evlos@console ~> sudo resize2fs /dev/mapper/console--vg-root
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/console--vg-root is mounted on /; on-line resizing required
old_desc_blocks = 4, new_desc_blocks = 20
The filesystem on /dev/mapper/console--vg-root is now 41691136 (4k) blocks long.
evlos@console ~> df -lh
Filesystem Size Used Avail Use% Mounted on
udev 7.9G 0 7.9G 0% /dev
tmpfs 1.4G 736K 1.4G 1% /run
/dev/mapper/console--vg-root 157G 29G 121G 20% /
tmpfs 4.0G 0 4.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
tmpfs 825M 0 825M 0% /run/user/1000