Hi, I have a server on opensuse 42.1 and my root partition keeps getting full. The first time I just deleted everything in /tmp /var/log and also all the snapper snapshots which cleared it up (11% use), but this time I am still 55% full! My set up is 2 128GB ssds in a raid mirror there is a logical volume group here vg0 then there is a 24GiB lv for swap, 20GiB lv for / and 67.77GiB for /home I notice the recommended / partition on 42.1 is 40gb not 20 like previous opensuse versions, but this was an upgrade from 13.1 through 13.2 then 42.1 so was always the same. I said to myself "I know! I could just use yast partitoner to shrink the logical volume for home by 20GiB then expand / by 20 to make it 40GiB" but NO! Yast cannot alter the size of BtrFS (root) or XFS (home) filesystems even though they are the default configuration! argh! I thought it was too simple (always a catch)! Does anyone know a way around this before my server refuses to boot again due to 99% full / ? Help would be much appreciated. Thank you Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
26.11.2016 19:53, Paul Groves пишет:
Hi,
I have a server on opensuse 42.1 and my root partition keeps getting full. The first time I just deleted everything in /tmp /var/log and also all the snapper snapshots which cleared it up (11% use), but this time I am still 55% full!
Please show "btrfs fi usage /"
My set up is 2 128GB ssds in a raid mirror
there is a logical volume group here vg0
then there is a 24GiB lv for swap, 20GiB lv for / and 67.77GiB for /home
I notice the recommended / partition on 42.1 is 40gb not 20 like previous opensuse versions, but this was an upgrade from 13.1 through 13.2 then 42.1 so was always the same.
I said to myself "I know! I could just use yast partitoner to shrink the logical volume for home by 20GiB then expand / by 20 to make it 40GiB" but NO! Yast cannot alter the size of BtrFS (root) or XFS (home) filesystems even though they are the default configuration! argh! I thought it was too simple (always a catch)!
That's correct - it is not possible to reduce size of XFS. Do you really need 24GiB for swap? Do you have 24GiB of RAM and hibernate often?
Does anyone know a way around this before my server refuses to boot again due to 99% full / ? Help would be much appreciated.
Thank you
Paul
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 26/11/16 17:12, Andrei Borzenkov wrote:
26.11.2016 19:53, Paul Groves пишет:
Hi,
I have a server on opensuse 42.1 and my root partition keeps getting full. The first time I just deleted everything in /tmp /var/log and also all the snapper snapshots which cleared it up (11% use), but this time I am still 55% full!
Please show "btrfs fi usage /"
My set up is 2 128GB ssds in a raid mirror
there is a logical volume group here vg0
then there is a 24GiB lv for swap, 20GiB lv for / and 67.77GiB for /home
I notice the recommended / partition on 42.1 is 40gb not 20 like previous opensuse versions, but this was an upgrade from 13.1 through 13.2 then 42.1 so was always the same.
I said to myself "I know! I could just use yast partitoner to shrink the logical volume for home by 20GiB then expand / by 20 to make it 40GiB" but NO! Yast cannot alter the size of BtrFS (root) or XFS (home) filesystems even though they are the default configuration! argh! I thought it was too simple (always a catch)!
That's correct - it is not possible to reduce size of XFS. Do you really need 24GiB for swap? Do you have 24GiB of RAM and hibernate often?
Does anyone know a way around this before my server refuses to boot again due to 99% full / ? Help would be much appreciated.
Thank you
Paul
Here is the output, I have cleared all the snapper files since so have more space at the moment. server5:/# btrfs fi usage / Overall: Device size: 20.00GiB Device allocated: 18.16GiB Device unallocated: 1.84GiB Device missing: 0.00B Used: 7.54GiB Free (estimated): 10.91GiB (min: 9.99GiB) Data ratio: 1.00 Metadata ratio: 2.00 Global reserve: 112.00MiB (used: 0.00B) Data,single: Size:16.03GiB, Used:6.96GiB /dev/mapper/vg0-root 16.03GiB Metadata,DUP: Size:1.03GiB, Used:293.69MiB /dev/mapper/vg0-root 2.06GiB System,DUP: Size:32.00MiB, Used:16.00KiB /dev/mapper/vg0-root 64.00MiB Unallocated: /dev/mapper/vg0-root 1.84GiB the home partition is xfs. Could I somehow get rid of the home partition (merge it back into root). This is not needed because the data is in /srv Yes I do have a use for the 24gb swap (I have 24gb RAM). I am planning to set it up so that when my UPS is activated in a power cut the server should hibernate. (I have not looked into this yes but I have an APC back-ups CS-650 with a usb lead so should be easy once I know how). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2016 01:46 PM, Paul Groves wrote:
Yes I do have a use for the 24gb swap (I have 24gb RAM). I am planning to set it up so that when my UPS is activated in a power cut the server should hibernate. (I have not looked into this yes but I have an APC back-ups CS-650 with a usb lead so should be easy once I know how).
That is then, this is now. Solve your immediate problem now. You are not doing hibernate NOW so you don't need 24G swap NOW. Linus is very flexible about swap. You can run merrily under normal conditions with a lot less swap. I'm my case I have enough slack on LVM that I could, if I wanted, create an extra 100G swap partition on my LVM. I'd also remind you that with Linux you don't need a swap PARTITION, you can swap to a file. As long as there is space *somewhere* Linux can use it for swap. It doesn't have to be all in one partition or all on one file system. You could ... swapoff delete the swap partition create a 4G swap partition swap on create a 20G ext4FS, mount it on /mnt rsync /home to /mnt unmount /home delete the /home partition create an appropriate to your need /home partition on LVM rsync /home back from /mnt unmount /mnt Now, how much free do you have on LVM? How much free do you have on /home? how much space is being used by /srv? Figure out how much you need to grow your rootFS RIGHT NOW. My policy would be to put /usr/share and the rarely accessed stuff under /home/<username> on slower media. There are a lot of DOT files in your home directory that you'll need, and of course your (web) application runs out /srv. Yes, they need fast access. But, comparatively speaking. Bow often do you access man pages or the package documentation files there? heck, a lot of that space is taken up with copy after copy of the "GNU LESSER GENERAL PUBLIC LICENSE". Heck, I have over 1,000 of those there! Each one is 18K. (I also have some called "LICENCE".) As it is, you have /usr as part of the rootFS. Calculate how much space you are using for those copies on your system. You might also think of purging the unused language files through your system The tool "bleachbit" is useful for that :-) There's a very good case to be made for having swap on fast media when the machine is running, but does it need to be on fast media for hibernate? My grub2 config file has entries that use resume=/dev/disk/by-label/SWAP which is what we normally assume, but there's no reason the "hibernate/resume" could come from another device, other than the normal swap. And does it have to be the same physical device? I note reading https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#... that the size of the hibernate does not have to be the same as the size of RAM. There's also a 'compress' option. See also https://wiki.debian.org/Hibernation/Hibernate_Without_Swap_Partition -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
26.11.2016 21:46, Paul Groves пишет:
On 26/11/16 17:12, Andrei Borzenkov wrote:
26.11.2016 19:53, Paul Groves пишет:
Hi,
I have a server on opensuse 42.1 and my root partition keeps getting full. The first time I just deleted everything in /tmp /var/log and also all the snapper snapshots which cleared it up (11% use), but this time I am still 55% full!
...
Here is the output, I have cleared all the snapper files since so have more space at the moment.
server5:/# btrfs fi usage / Overall: Device size: 20.00GiB Device allocated: 18.16GiB Device unallocated: 1.84GiB Device missing: 0.00B Used: 7.54GiB Free (estimated): 10.91GiB (min: 9.99GiB) Data ratio: 1.00 Metadata ratio: 2.00 Global reserve: 112.00MiB (used: 0.00B)
Data,single: Size:16.03GiB, Used:6.96GiB /dev/mapper/vg0-root 16.03GiB
Metadata,DUP: Size:1.03GiB, Used:293.69MiB /dev/mapper/vg0-root 2.06GiB
System,DUP: Size:32.00MiB, Used:16.00KiB /dev/mapper/vg0-root 64.00MiB
Unallocated: /dev/mapper/vg0-root 1.84GiB
This looks pretty normal. The same output when filesystem gets full would probably be more interesting. Do you have subvolumes on this filesystem? btrfs sub list / grep btrfs /proc/self/mounts
the home partition is xfs. Could I somehow get rid of the home partition (merge it back into root). This is not needed because the data is in /srv
Partition?!? In original post you said it was LV?
Yes I do have a use for the 24gb swap (I have 24gb RAM). I am planning to set it up so that when my UPS is activated in a power cut the server should hibernate. (I have not looked into this yes but I have an APC back-ups CS-650 with a usb lead so should be easy once I know how).
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/26/2016 11:53 AM, Paul Groves wrote:
I said to myself "I know! I could just use yast partitoner to shrink the logical volume for home by 20GiB then expand / by 20 to make it 40GiB" but NO! Yast cannot alter the size of BtrFS (root) or XFS (home) filesystems even though they are the default configuration! argh! I thought it was too simple (always a catch)!
See http://blog.endpoint.com/2015/01/shrink-xfs-partition-almost-possible.html One reason I continue to use ReiserFS is that I can shrink the file system.
Does anyone know a way around this before my server refuses to boot again due to 99% full / ? Help would be much appreciated.
I use LVM. I advocate using LVM. What I should say more often is that I am a bit minimalist about this. I don't simply do root/home split, I split what's under /home/anton: Documents, Downloads, Media and that into movies and music, Photographs. Yes, I use ext4 as well. Many of my subdirectories I can predict the file/size ratio pretty well and don't have a provisioning problem. Worst case, I can shrink-to-fit ext4 as well. It used to be that yes you needed as much swap as you had RAM, but those days are past. I run a 8G memory system with "only" 5G swap and I've never seen swap more than 2G occupied. The other thing is that while I use LVM I don't use all of the disk. I have 1T of LVM space but don't use nearly that, despite a huge amount devoted to movies, photographs and music. Unlike some people here I don't do data collection and I do do archiving. # pvscan -v PV /dev/sda3 VG vgmain lvm2 [924.06 GiB / 520.06 GiB free] Given that, I could, if it ever became critical, set up an additional swap area under LVM. You current swap is in LV, you say. Try scavenging 20G of that to add to your rootFS. That still leaves you 4G of swap. How much swap do you need? You can monitor it with 'swapon -s' or in real-time with 'htop' in a root vtty. Linux is pretty smart about memory. I use KDE4 with two Firefox windows each with about 430 to 60 tabs, Thunderbird with 14 IMAP and throw open my photo-editor, Darktable, and 'swapon -s' still says I'm not using swap. If needed, you can flush swap by using 'swapoff' the bring it back with 'swapon' after you've shrunk that partition. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Paul Groves wrote:
Does anyone know a way around this before my server refuses to boot again due to 99% full / ? Help would be much appreciated.
Move high-usage directories onto /home. At one point I needed space on my /usr partition, so I moved 'share' to /home/share and put a softlink in /usr to point to /home/share. A couple of largish SW packages wanted to store large things in /var/lib -- things like "docker", "libvirt" and virtualBox wanted to put their VM's in /var/lib. They are on /home/docker (w/symlink in /var/lib), /home/VMs/libvirt and /home/Virtual Machines/VirtualBox VMs, respectively. Some software doesn't like symlinks. In which case, use mount w/the bind option to mount a dir (like from /home/dirname) somewhere else (like at /var/lib/dirname), with something like: /home/dirname /var/lib/dirname none rbind 0 0 in your fstab. Anyway -- that's how I dealt with a similar prob. Cheers! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Anton Aylward
-
L A Walsh
-
Paul Groves