Score:0

Free swap file space contained on root partition without rebooting to free space checked by df

ธง om

I have created a temporary Swap file (/var/cache/swap/myswap) of 500GB on a Ubuntu worstation at work wiht 1TB RAM. This swapfile is on a BTRFS filesystem.

I don't need anymore of this swapfile now and I would like that space taken by this swapfile doesn't appear anymore when I do a "df" command.

I would like to free this space without rebooting.

I tried : $ swapoff -a

I have also tried : $ swapoff /var/cache/swap/myswap

I have removed too basically the file /var/cache/swap/myswap

But still space 500GB are taken into account when I do a df command (I have still 64% root partition "/" instead of 10% when there is not swapfile of 500GB)

How could I make really this swapfile to not be taken into account with df command without having to reboot ? I mean, that Swapfile removing to be effective.

Nmath avatar
ng flag
คุณ `rm` ไฟล์หรือไม่
youpilat13 avatar
om flag
@Nmath . ใช่ ฉันลบออกแล้วตามที่พูด แต่การแสดงหน่วยความจำด้วย `df` ไม่อัปเดต เป็นเรื่องแปลก
Nmath avatar
ng flag
อาจมีแคชที่ป้องกันไม่ให้อัปเดตทันที ดู: https://unix.stackexchange.com/q/8485

โพสต์คำตอบ

คนส่วนใหญ่ไม่เข้าใจว่าการถามคำถามมากมายจะปลดล็อกการเรียนรู้และปรับปรุงความสัมพันธ์ระหว่างบุคคล ตัวอย่างเช่น ในการศึกษาของ Alison แม้ว่าผู้คนจะจำได้อย่างแม่นยำว่ามีคำถามกี่ข้อที่ถูกถามในการสนทนา แต่พวกเขาไม่เข้าใจความเชื่อมโยงระหว่างคำถามและความชอบ จากการศึกษาทั้ง 4 เรื่องที่ผู้เข้าร่วมมีส่วนร่วมในการสนทนาด้วยตนเองหรืออ่านบันทึกการสนทนาของผู้อื่น ผู้คนมักไม่ตระหนักว่าการถามคำถามจะมีอิทธิพลหรือมีอิทธิพลต่อระดับมิตรภาพระหว่างผู้สนทนา