Difference between revisions of "Swap"

9 bytes removed ,  2 years ago
fix: fallocate => dd
(Correct a typo)
(fix: fallocate => dd)
Line 84: Line 84:
  if [ "$(whoami)" = 'root' ]; then
  if [ "$(whoami)" = 'root' ]; then
   dmesg | grep "zswap:" | grep --silent "load"
   dmesg | grep "zswap:" | grep --silent "load"
   if [[ $? -eq 0 ]]; then
   if [ $? -eq 0 ]; then
     # zswap is active
     # zswap is active
     echo "zswap information:"
     echo "zswap information:"
Line 172: Line 172:
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.</translate>
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.</translate>


<translate><!--T:49--> Prior to running the {{ic|fallocate}} step above, you should run these commands:</translate>
<translate><!--T:49--> Prior to running the {{ic|dd}} step above, you should run these commands:</translate>
  sudo truncate -s 0 /swapfile
  sudo truncate -s 0 /swapfile
  sudo chattr +C /swapfile
  sudo chattr +C /swapfile
1

edit