[03:15] <lunatiq> is there anyway to limit a folder size?
[03:15] <lunatiq> I'm sorry
[03:15] <lunatiq> Directory
[03:16] <lunatiq> Like if I want to limit a site added in apache2
[03:16] <arrayboltXE> lunatiq: This is somewhat of a hack, but you might be able to make an image file, format it with a filesystem, make a loop device with it, and then mount that device into the desired directory.
[03:16] <arrayboltXE> That would effictively limit the size of the directory's contents to the size of the image file.
[03:17] <lunatiq> That doesn't sound easy
[03:17] <arrayboltXE> Something like "dd if=/dev/zero of=./mysite.img bs=1G count=4 && mkfs.ext4 ./mysite.img" to make the image.
[03:18] <arrayboltXE> Then I *think* "sudo mount ./mysite.img /path/to/size_limited_directory" will mount it.
[03:18] <arrayboltXE> You might need to use some losetup command first though.
[03:19] <arrayboltXE> Lemme test it real quick (it sounds complicated but this should be easy enough)
[03:19] <sdeziel> lunatiq: I /think/ you can achieve that with ext4 quotas, see https://wiki.archlinux.org/title/Disk_quota
[03:20] <arrayboltXE> On Ubuntu 22.10, just making the file, formatting it, and then mounting it directly works for me.
[03:20] <arrayboltXE> Might impact performance though. sdeziel's disk quota stuff might be better.
[03:21] <sdeziel> lunatiq: if the directory in question is on btrfs or zfs, there are better ways to restrict space usage
[03:21] <sdeziel> arrayboltXE: I don't know, I quite like your loop dev idea to be honest :)
[03:22] <arrayboltXE> lol that was just the first thing that came to mind :P It *will* have some overhead, since it will make an ext4 filesystem on top of whatever other FS is already in use, which comes with a (hopefully slight) storage cost and likely a (hopefully slight) performance hit. I would imagine disk quotas would be faster since they only have to deal with one filesystem.
[03:46] <lunatiq> I'm trying to take note from what I learned yesterday about netplan and adding additional IP. I had to add the IP to the YAML and then a label. I made my nic:0 so could I essentially go from nic:0-999 ?
[03:46] <lunatiq> such as 
[03:46] <lunatiq> - 123.1.1.1/32
[03:47] <lunatiq> label: nic:0
[03:47] <lunatiq> - 123.1.1.2/32
[03:47] <lunatiq> label: nic:1
[03:47] <lunatiq> etc
[03:47] <lunatiq> to
[03:47] <lunatiq> label: nic:999
[03:48] <lunatiq> or 256 I mean
[03:48] <lunatiq> 1-256
[03:53] <sdeziel> lunatiq: what do you use the label for?
[03:53] <lunatiq> virtual nic
[03:53] <lunatiq> virtualization
[03:54] <lunatiq> It's what I was told had to bbe done annd it worked
[03:54] <sdeziel> OK, I thought it was just a label tied to an IP address
[03:55] <sdeziel> lunatiq: the man page says you can go up to 15 chars long for the label so that should be enough for your numbering scheme