swap 的調整方式 - Linux

By Lydia
at 2018-05-01T17:48
at 2018-05-01T17:48
Table of Contents
目前看過兩個方案
1.直接修改 Partition 大小
2.增加或是刪除 swap file
方案1.
直接 fdisk 新增一個 partition 然後掛到 swap 上
或是利用 LVM 調整大小
方案2.
新增或是刪除一個 swap file
將這個檔案佔用的空間當成 swap 來用
但是這裡小弟有一點問題~
如果你有建立 swap file 掛上去以後覺得不需要這麼大
想要刪除 swap file
那麼要怎麼查詢建立的 swap file ?
如果是臨時建立還沒有寫入 /etc/fstab 的情況下
重新開機的話應該就不會把這個檔案當成 swap 載入了
這種情況下要怎麼尋找可能被遺忘的 swap file ?
另外關於建立 swap file 的指令
dd if=/dev/zero of=/tmp/tempswap bs=1k count=5000
of 是建立的檔案
bs 是區塊大小
count 是區塊數量
那麼前面的 if 是什麼?
就算刪除建立的 swap file 那個 /dev/zero 還是在那裡?
以上一點小問題~希望前輩們可以指點一下迷津~m(_ _)m
--
『老闆你好 我是國立的』 『老闆你好 我是私立的』 『腦~~~~~~~闆~~~~~~』 Amy!
◢ ◣有消息會跟你聯絡 ◢ ◣有消息會跟你聯絡 ◢ ◣給她個私人秘書職位
◤ ◥ ◥ ◢ ◤◥ ◥ ◢ ◥◢ ◣ 國立
-○=○- ◤ -□=□- ◤ ◥● ●● ◤ ◥ 私立
◥ ◤ ︶ ◥ ◤ ︶ ● ▼◤ ● ) 尬不過
◢ ◥◣╱ ◥ -? ◢ ◣◣╱ ◥ - ◢ )●) ▼ ◤ 兩粒
--
1.直接修改 Partition 大小
2.增加或是刪除 swap file
方案1.
直接 fdisk 新增一個 partition 然後掛到 swap 上
或是利用 LVM 調整大小
方案2.
新增或是刪除一個 swap file
將這個檔案佔用的空間當成 swap 來用
但是這裡小弟有一點問題~
如果你有建立 swap file 掛上去以後覺得不需要這麼大
想要刪除 swap file
那麼要怎麼查詢建立的 swap file ?
如果是臨時建立還沒有寫入 /etc/fstab 的情況下
重新開機的話應該就不會把這個檔案當成 swap 載入了
這種情況下要怎麼尋找可能被遺忘的 swap file ?
另外關於建立 swap file 的指令
dd if=/dev/zero of=/tmp/tempswap bs=1k count=5000
of 是建立的檔案
bs 是區塊大小
count 是區塊數量
那麼前面的 if 是什麼?
就算刪除建立的 swap file 那個 /dev/zero 還是在那裡?
以上一點小問題~希望前輩們可以指點一下迷津~m(_ _)m
--
『老闆你好 我是國立的』 『老闆你好 我是私立的』 『腦~~~~~~~闆~~~~~~』 Amy!
◢ ◣有消息會跟你聯絡 ◢ ◣有消息會跟你聯絡 ◢ ◣給她個私人秘書職位
◤ ◥ ◥ ◢ ◤◥ ◥ ◢ ◥◢ ◣ 國立
-○=○- ◤ -□=□- ◤ ◥● ●● ◤ ◥ 私立
◥ ◤ ︶ ◥ ◤ ︶ ● ▼◤ ● ) 尬不過
◢ ◥◣╱ ◥ -? ◢ ◣◣╱ ◥ - ◢ )●) ▼ ◤ 兩粒
--
Tags:
Linux
All Comments

By Connor
at 2018-05-02T16:57
at 2018-05-02T16:57

By Kelly
at 2018-05-03T02:39
at 2018-05-03T02:39

By Joe
at 2018-05-06T17:06
at 2018-05-06T17:06

By Andy
at 2018-05-11T07:07
at 2018-05-11T07:07

By Jacky
at 2018-05-11T21:50
at 2018-05-11T21:50

By Xanthe
at 2018-05-14T22:35
at 2018-05-14T22:35

By Kumar
at 2018-05-16T15:02
at 2018-05-16T15:02

By Tom
at 2018-05-16T17:17
at 2018-05-16T17:17

By Blanche
at 2018-05-21T00:38
at 2018-05-21T00:38

By Kama
at 2018-05-23T13:55
at 2018-05-23T13:55

By Dora
at 2018-05-25T04:07
at 2018-05-25T04:07

By Erin
at 2018-05-29T00:47
at 2018-05-29T00:47

By Skylar DavisLinda
at 2018-06-02T00:43
at 2018-06-02T00:43

By Lydia
at 2018-06-03T22:55
at 2018-06-03T22:55

By David
at 2018-06-08T13:59
at 2018-06-08T13:59

By Noah
at 2018-06-09T02:15
at 2018-06-09T02:15

By Michael
at 2018-06-12T20:11
at 2018-06-12T20:11

By Carol
at 2018-06-13T14:58
at 2018-06-13T14:58

By Todd Johnson
at 2018-06-17T18:10
at 2018-06-17T18:10

By Franklin
at 2018-06-19T21:24
at 2018-06-19T21:24

By Heather
at 2018-06-22T23:31
at 2018-06-22T23:31

By Lydia
at 2018-06-25T06:39
at 2018-06-25T06:39

By Ophelia
at 2018-06-26T17:17
at 2018-06-26T17:17

By Iris
at 2018-06-29T17:09
at 2018-06-29T17:09

By Barb Cronin
at 2018-07-04T11:46
at 2018-07-04T11:46
Related Posts
新酷音選字問題

By Sierra Rose
at 2018-04-29T12:54
at 2018-04-29T12:54
神奇的機房技術!?

By Zenobia
at 2018-04-27T23:52
at 2018-04-27T23:52
Ubuntu 18 台灣被消失了(?)

By Audriana
at 2018-04-27T20:58
at 2018-04-27T20:58
查詢 Linux 網路卡

By Doris
at 2018-04-27T20:56
at 2018-04-27T20:56
新手mac ubuntu18.04雙系統 筆電鍵盤滑鼠失靈

By James
at 2018-04-27T19:48
at 2018-04-27T19:48