Disk Partition - SS67/project-docs GitHub Wiki

Good — and the diagnostics changed two things worth noting before the commands.

Reading your output

fuser -vm /var/log was misleading. -m resolves to the filesystem containing the path, and /var/log isn't its own mount yet — so it listed every process on /, including kernel threads. Ignore it. Your lsof +D output is the real answer.

The real writers, and what to do with each:

Process What it is Handling
systemd-j journald Stop before swap
rsyslogd syslog Stop before swap
java Burp agent Stop before swap
wdavdaemon MS Defender for Endpoint Restart after — don't stop
winbindd AD/Samba Restart after — don't stop
vmtoolsd VMware Tools Restart after
unattende unattended-upgrades Restart after
bash your shell cd out of /var/log first

The bottom group only needs to reopen its file handles. Stopping winbindd on an AD-joined box (your /run/user/2113802 UIDs confirm domain accounts) risks breaking authentication mid-procedure — restarting it after the mount is both safer and sufficient. Same logic for Defender, which may have tamper protection on the unit anyway.

auditd inactive → skip that step entirely.

572M → the rsync is seconds, not minutes. Total logging gap will be well under a minute.

Before you start: run this in tmux/screen, and have a second root session open. If winbind hiccups you don't want to be locked out mid-swap.


Pre-flight

cd /            # ensure no shell has cwd inside /var/log
vgs; lvs -a     # confirm 141.4G free, no LVs

1. Create the volume

lvcreate -L 40G -n lv_varlog vg00
mkfs.ext4 -m 1 -L varlog /dev/vg00/lv_varlog
lvs

2. First copy (everything still running)

mkdir -p /mnt/newlog
mount /dev/vg00/lv_varlog /mnt/newlog
rsync -aHAXx --info=progress2 /var/log/ /mnt/newlog/

Trailing slashes matter.

3. Stop the primary writers

systemctl stop burpsuiteenterpriseedition_agent.service
systemctl stop rsyslog.service rsyslog.socket

journalctl --sync
journalctl --flush
systemctl stop systemd-journald.service systemd-journald.socket \
               systemd-journald-dev-log.socket systemd-journald-audit.socket

4. Delta sync and swap

rsync -aHAXx --delete /var/log/ /mnt/newlog/
umount /mnt/newlog

mv /var/log /var/log.old
mkdir /var/log
mount /dev/vg00/lv_varlog /var/log

chown root:syslog /var/log
chmod 775 /var/log
stat -c '%a %U %G' /var/log     # must read: 775 root syslog

5. Restart everything

systemctl start systemd-journald.socket systemd-journald.service
systemctl start rsyslog.service
systemctl start burpsuiteenterpriseedition_agent.service

# reopen handles on the new filesystem
systemctl restart vmtoolsd.service
systemctl restart winbind.service
systemctl restart mdatp.service          # Defender; verify name first

Check the Defender unit name — systemctl list-units --all | grep -i mdatp. If it refuses to restart due to tamper protection, leave it; it'll reopen on next log rotation or reboot. Harmless.

6. Persist in fstab

blkid /dev/vg00/lv_varlog

Add, substituting your UUID:

UUID=<uuid>  /var/log  ext4  defaults,nofail  0 2

nofail is deliberate — if the VG ever fails to activate at boot you get a running VM with /var/log on root, rather than an emergency shell.

Test before any reboot:

findmnt /var/log
mount -a && echo "fstab OK"

7. Verify

df -h /var/log /
findmnt /var/log

logger "LV migration test $(date)"
tail -3 /var/log/syslog
journalctl -n 5 --no-pager

systemctl status burpsuiteenterpriseedition_agent --no-pager
ls -la /var/log/BurpSuiteEnterpriseEdition/

# nothing still writing to the old tree
lsof +D /var/log.old 2>/dev/null
id <a-domain-user>      # confirm winbind healthy

That lsof +D /var/log.old should come back empty. If a process still shows up, restart it — otherwise it's writing into a hidden directory and you'll lose those logs.

8. Reclaim after 24–48h

du -sh /var/log.old
rm -rf /var/log.old

Rollback

systemctl stop burpsuiteenterpriseedition_agent rsyslog systemd-journald
umount /var/log && rmdir /var/log
mv /var/log.old /var/log
# remove the fstab line
systemctl start systemd-journald rsyslog burpsuiteenterpriseedition_agent

Root filesystem is never touched, so this is clean at any point.


Close the loop

sed -i 's/^#\?SystemMaxUse=.*/SystemMaxUse=2G/' /etc/systemd/journald.conf
systemctl restart systemd-journald

The 40G LV bounds the blast radius, but the agent that wrote 36G is still capable of writing 40G. Two remaining items:

  1. Configure the agent's own rolling appender (logback/log4j under the Burp install) — size-based, e.g. 100MB × 10. For a JVM this is the correct fix; logrotate copytruncate misbehaves because the process keeps its file offset and produces a sparse file that silently refills.
  2. Find out why it emitted 36G. That's an error loop, not normal volume — typically the agent failing to reach the Enterprise server, a DB connection failure, or a cert problem. Rotation without fixing this just means you overwrite the evidence hourly.

And 101G still free in vg00 if Burp's scan data turns out to want its own volume later.

⚠️ **GitHub.com Fallback** ⚠️