Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: resume disk partition

  1. #1
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Question resume disk partition

    I recently "tidied up" and removed unneeded partitions, and a few other helpful things. Unfortunately, afterwards the system (OS 42.3) wouldn't hibernate ... or, I think, it wouldn't resume from hibernate.

    Can you tell me where the hibernate target partition is set?
    (I know where the resume partition is set ... in grub2 via yast2 bootloader)

    TIA
    David

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,742

    Default Re: resume disk partition

    Swap is used.

    Did you perhaps remove or change that location? The resume location is set in grub.pointing to the partition used for swap.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,117

    Default Re: resume disk partition

    Hibernating uses Swap space, most probably the Swap partition. You can find it in /etc/fstab and see if you happened to delete it.
    Henk van Velden

  4. #4
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Default Re: resume disk partition

    Quote Originally Posted by hcvv View Post
    Hibernating uses Swap space, most probably the Swap partition.
    Yes, it's using a swap partition ... but I have 3. One of them is hard coded into the boot line.

    fstab swap:
    Code:
    UUID=e18fda08-c47c-4121-a3fb-6b8e656181ae                         swap                 swap       pri=10               0 0
    UUID=b2d0e8e6-b9cc-4080-91f0-acbfba88b828                 swap                 swap       pri=0                 0 0
    UUID=d5aa9aba-6b73-41cf-9236-a4ff49618f4d                 swap                 swap       pri=0                 0 0
    grub:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="lang=en_GB resume=/dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2RUTTGH-part4 usbhid.quirks=0x056a:0x0319:0x40000000 splash=silent quiet showopts"
    /dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2RUTTGH-part4 -> ../../sda4
    /dev/disk/by-uuid/b2d0e8e6-b9cc-4080-91f0-acbfba88b828 -> ../../sda4
    /dev/disk/by-uuid/d5aa9aba-6b73-41cf-9236-a4ff49618f4d -> ../../sdc3
    /dev/disk/by-uuid/e18fda08-c47c-4121-a3fb-6b8e656181ae -> ../../sdb5

    How can I know (or control) which swap partition it's going to choose to use for resume so I can be certain it's set correctly on the grub line? Or do I need to put all the swap partitions on the grub line?

  5. #5
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,674

    Default Re: resume disk partition

    Quote Originally Posted by jetojedno View Post
    Yes, it's using a swap partition ... but I have 3. One of them is hard coded into the boot line.

    fstab swap:
    Code:
    UUID=e18fda08-c47c-4121-a3fb-6b8e656181ae                         swap                 swap       pri=10               0 0
    UUID=b2d0e8e6-b9cc-4080-91f0-acbfba88b828                 swap                 swap       pri=0                 0 0
    UUID=d5aa9aba-6b73-41cf-9236-a4ff49618f4d                 swap                 swap       pri=0                 0 0
    grub:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="lang=en_GB resume=/dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2RUTTGH-part4 usbhid.quirks=0x056a:0x0319:0x40000000 splash=silent quiet showopts"
    /dev/disk/by-id/ata-IC35L060AVV207-0_VNVB05G2RUTTGH-part4 -> ../../sda4
    /dev/disk/by-uuid/b2d0e8e6-b9cc-4080-91f0-acbfba88b828 -> ../../sda4
    /dev/disk/by-uuid/d5aa9aba-6b73-41cf-9236-a4ff49618f4d -> ../../sdc3
    /dev/disk/by-uuid/e18fda08-c47c-4121-a3fb-6b8e656181ae -> ../../sdb5

    How can I know (or control) which swap partition it's going to choose to use for resume so I can be certain it's set correctly on the grub line? Or do I need to put all the swap partitions on the grub line?
    Hi, apparently sdb5 is used first to store the hibernation image since you set pri=10 in fstab, so resuming from sda4 finds no image to read.
    Setting GRUB to resume from sdb5 should fix things, or maybe you prefer to change swap priorities in fstab.
    Main: Leap 15 Gnome on i7 4720HQ + Geforce GTX960M
    Test: Leap 42.3 (& others) on Core2Duo + GM965

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,742

    Default Re: resume disk partition

    You can use multiple swaps but hibernate will only use one. That one will need to be large enough to hold the memory image


    IMHO it is best to stick with one swap large enough to hole memory

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,545

    Cool Re: resume disk partition

    Quote Originally Posted by gogalthorp View Post
    IMHO it is best to stick with one swap large enough to hole memory
    True, if either a non-commercial system or a non-scientific (laboratory) system, with only one disk drive.
    • IOW, more than 90 % of the “home” (or “student”) systems …


    IMHO, not true for large commercial systems and large scientific (laboratory) systems, with multiple disk drives and/or RAID and, compute intensive applications …

  8. #8
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Default Re: resume disk partition

    Quote Originally Posted by gogalthorp View Post
    That one will need to be large enough to hold the memory image
    Thanks. This may answer my current puzzlement, given the earlier statement about priorities. Hibernate isn't using sdb5 but sda4 - I can tell by "adjusting" the grub/kernel resume partition. The sizes of all the swap partitions are different:
    Code:
    # swapon --summary
    Filename                                Type            Size    Used    Priority
    /dev/sdb5                               partition       8383484 1688    10
    /dev/sdc3                               partition       8388604 0       0
    /dev/sda4                               partition       8391596 0       0
    I'm vaguely puzzled by the different partition sizes, none of which are 8GB, as they will all have been created as 8GB (or 8192 MB) within either gpart or fdisk, but that's a question for another day. Probably down to sector alignment.

    Code:
    # fdisk -l /dev/sda
    Disk /dev/sda: 57.3 GiB, 61492838400 bytes, 120103200 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x15a32722
    
    Device     Boot    Start       End  Sectors  Size Id Type                                                                                                                          
    /dev/sda1  *          63   9389519  9389457  4.5G  b W95 FAT32                                                                                                                     
    /dev/sda2        9389520  72318959 62929440   30G  7 HPFS/NTFS/exFAT                                                                                                               
    /dev/sda3       89102160 120098159 30996000 14.8G  f W95 Ext'd (LBA)                                                                                                               
    /dev/sda4       72318960  89102159 16783200    8G 82 Linux swap / Solaris                                                                                                          
    /dev/sda5       89102223  93305519  4203297    2G  7 HPFS/NTFS/exFAT                                                                                                               
    /dev/sda6       93305583  99610559  6304977    3G  7 HPFS/NTFS/exFAT                                                                                                               
    /dev/sda7       99610623 120098159 20487537  9.8G  7 HPFS/NTFS/exFAT                                                                                                               
                                                                                                                                                                                       
    Partition table entries are not in disk order.
    
    $ echo $(( 16783200 * 512 ))
    8592998400
    Code:
    # fdisk -l /dev/sdb
    Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x93d23bfd
    
    Device     Boot     Start       End  Sectors  Size Id Type
    /dev/sdb1  *         4096    131071   126976   62M  6 FAT16
    /dev/sdb2          131072    524287   393216  192M 83 Linux
    /dev/sdb3          524288  96860159 96335872   46G  7 HPFS/NTFS/exFAT
    /dev/sdb4       138801600 234436544 95634945 45.6G  5 Extended
    /dev/sdb5       138805248 155572223 16766976    8G 82 Linux swap / Solaris
    /dev/sdb6       155573523 234434559 78861037 37.6G 83 Linux
    
    $ echo $(( 16766976 * 512 ))
    8584691712
    ... etc

    Code:
    # cat /proc/meminfo
    [sudo] password for david: 
    MemTotal:        8106528 kB
    
    $ echo $(( 8106528 * 1024 * 1024 ))
    8500310704128
    
    $ echo $(( 8 * 1024 * 1024 * 1024 ))
    8589934592
    In physical reality it has 8 GB memory - 4 x 2GB cards.

    I'd like to get the hibernate partition onto sdc, and remove sda as it has multiple old Windows installs, kept for incompatible software reasons after I migrated to Linux (they now fire up as VMs under vbox). I'll increase the swap partition size on sdc to 12GB and reduce the one on sda (SSD) to 4GB. I also want to move sdb to GPT and boot to UEFI, but that's a whole different can of worms.

    Swap is needed solely for inefficient data analysis packages which insist on keeping the whole dataset in memory.
    Last edited by jetojedno; 06-Apr-2019 at 04:23. Reason: correct memory size

  9. #9
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Default Re: resume disk partition

    Better memory info:
    Code:
    # cat /proc/meminfo
    MemTotal:        8106528 kB
    
    $ echo $(( 8106528 * 1024 ))
    8301084672

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,117

    Default Re: resume disk partition

    Quote Originally Posted by jetojedno View Post
    Better memory info:
    Code:
    # cat /proc/meminfo
    MemTotal:        8106528 kB
    
    $ echo $(( 8106528 * 1024 ))
    8301084672
    I am not sure if /proc/meminfo uses the standards, but
    8106528 kB = 8106528*1000 B
    8106528 kiB = 8106528*1024 B
    Henk van Velden

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •