Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202125

Re: Recommendation on partition sizes

From Curt <curty@free.fr>
Newsgroups linux.debian.user
Subject Re: Recommendation on partition sizes
Date 2018-11-05 09:40 +0100
Message-ID <wQIAq-2NF-11@gated-at.bofh.it> (permalink)
References (2 earlier) <wQiwh-2PA-3@gated-at.bofh.it> <wQsOZ-xe-9@gated-at.bofh.it> <wQtrH-Zf-3@gated-at.bofh.it> <wQwIV-2NQ-1@gated-at.bofh.it> <wQz45-5q6-9@gated-at.bofh.it>
Organization Unorganized

Show all headers | View raw


On 2018-11-04, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
> Le 04/11/2018 à 20:56, Stefan Monnier a écrit :
>>>> I use LVM volumes for my swap space, which is yet another option, one
>>>> that can be grown and shrunk easily, online.
>>> You can resize a logical volume online, but AFAIK you cannot resize a swap
>>> area online (while in use) ;
>> 
>> Indeed, in the general case you'll need to do it like:
>> 
>>      lvcreate --name tmpswap --size NNg <VG>
>>      mkswap /dev/<VG>/tmpswap
>>      swapon /dev/<VG>/tmpswap
>>      swapoff /dev/<VG>/swap
>>      lvresize --size +2g /dev/<VG>/swap
>>      mkswap /dev/<VG>/swap
>>      swapon /dev/<VG>/swap
>>      swapoff /dev/<VG>/tmpswap
>>      lvremove /dev/<VG>/tmpswap
>
> Or you can just delete the old swap and rename the new one.
>
>        lvcreate --name newswap --size NNg <VG>
>        mkswap /dev/<VG>/newswap
>        swapon /dev/<VG>/newswap
>        swapoff /dev/<VG>/swap
>        lvremove /dev/<VG>/swap
>        lvrename <VG> newswap swap
>
>> [ Sadly --resizefs doesn't work on a swap partition, AFAICT.  ]
>
> Because there is no swap resizing tool.
>

I was reading about swap recently and fell upon (like a sword) this
remark from 2005 from Andrew Morton:

  Create the swapfile when the filesystem is young and empty,
  it'll be nice and contiguous.  Once created the kernel will never add
  or remove blocks.

Can it be inferred that excessive (LVM) resizing would be detrimental
contiguity-wise, and thus also performance-wise, or is this
insignificant and not a concern?



-- 
“If a person is not talented enough to be a novelist, not smart enough to be a
lawyer, and his hands are too shaky to perform operations, he becomes a
journalist.” --Norman Mailer 

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Recommendation on partition sizes D&P Dimov <lddimov@yahoo.com> - 2018-11-04 04:30 +0100
  Re: Recommendation on partition sizes Andy Smith <andy@strugglers.net> - 2018-11-04 05:50 +0100
    Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 10:30 +0100
      Re: Recommendation on partition sizes Andy Smith <andy@strugglers.net> - 2018-11-04 14:00 +0100
        Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 14:40 +0100
          Re: Recommendation on partition sizes Andy Smith <andy@strugglers.net> - 2018-11-04 14:50 +0100
            Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 16:00 +0100
      Re: Recommendation on partition sizes Rick Thomas <rbthomas@pobox.com> - 2018-11-05 09:20 +0100
        Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-05 19:50 +0100
    Re: Recommendation on partition sizes Stefan Monnier <monnier@iro.umontreal.ca> - 2018-11-04 16:50 +0100
      Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 17:30 +0100
        Re: Recommendation on partition sizes Stefan Monnier <monnier@iro.umontreal.ca> - 2018-11-04 21:00 +0100
          Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 23:30 +0100
            Re: Recommendation on partition sizes Stefan Monnier <monnier@iro.umontreal.ca> - 2018-11-05 00:20 +0100
              Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-05 20:20 +0100
            Re: Recommendation on partition sizes Curt <curty@free.fr> - 2018-11-05 09:40 +0100
              Re: Recommendation on partition sizes Michael Stone <mstone@debian.org> - 2018-11-05 16:20 +0100
              Re: Recommendation on partition sizes Stefan Monnier <monnier@iro.umontreal.ca> - 2018-11-06 15:10 +0100
                Re: Recommendation on partition sizes Michael Stone <mstone@debian.org> - 2018-11-06 16:20 +0100
      Re: Recommendation on partition sizes Michael Stone <mstone@debian.org> - 2018-11-04 17:40 +0100
  Re: Recommendation on partition sizes David Christensen <dpchrist@holgerdanske.com> - 2018-11-04 08:40 +0100
    Re: Recommendation on partition sizes Michael Stone <mstone@debian.org> - 2018-11-04 15:10 +0100
  Re: Recommendation on partition sizes Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-04 10:30 +0100

csiph-web