Advertisement
Hitesh_jadhav

can't increase swap space

May 9th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. [HJ_xman@localhost ~]$ free -m
  2. total used free shared buff/cache available
  3. Mem: 4926 873 2043 15 2009 3803
  4. Swap: 2462 0 2462
  5. [HJ_xman@localhost ~]$ swapon -s
  6. Filename Type Size Used Priority
  7. /dev/zram0 partition 2522108 0 100
  8. [HJ_xman@localhost ~]$ dd if=/dev/zero of=/swap_file bs=1G count=1
  9. dd: failed to open '/swap_file': Permission denied
  10. [HJ_xman@localhost ~]$ sudo dd if=/dev/zero of=/swap_file bs=1G count=1
  11. [sudo] password for HJ_xman:
  12. 1+0 records in
  13. 1+0 records out
  14. 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.68649 s, 291 MB/s
  15. [HJ_xman@localhost ~]$ chmod 600 /swap_file
  16. chmod: changing permissions of '/swap_file': Operation not permitted
  17. [HJ_xman@localhost ~]$ sudo chmod 600 /swap_file
  18. [HJ_xman@localhost ~]$ mkswap /swap_file
  19. mkswap: cannot open /swap_file: Permission denied
  20. [HJ_xman@localhost ~]$ sudo mkswap /swap_file
  21. Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
  22. no label, UUID=62d068fc-03d8-4981-9d67-244e9831d5a8
  23. [HJ_xman@localhost ~]$ cat /etc/fstab
  24.  
  25. #
  26. # /etc/fstab
  27. # Created by anaconda on Wed Mar 31 06:42:17 2021
  28. #
  29. # Accessible filesystems, by reference, are maintained under '/dev/disk/'.
  30. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
  31. #
  32. # After editing this file, run 'systemctl daemon-reload' to update systemd
  33. # units generated from this file.
  34. #
  35. UUID=9a6209be-1b02-4cc6-a2fa-f4adeecd266f / btrfs subvol=root 0 0
  36. UUID=a008e035-a35c-431f-93da-b0206361e436 /boot ext4 defaults 1 2
  37. UUID=9a6209be-1b02-4cc6-a2fa-f4adeecd266f /home btrfs subvol=home 0 0
  38. /swap_file swap swap defaults 0 0
  39. [HJ_xman@localhost ~]$ swapon /swap_file
  40. swapon: cannot open /swap_file: Permission denied
  41. [HJ_xman@localhost ~]$ sudo swapon /swap_file
  42. swapon: /swap_file: swapon failed: Invalid argument
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement