Create SWAP
Code:
# swapon /dev/sda7
# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 0 -1
# mount /dev/sda1 p1
# ls -l p1/dum
-rw-r--r-- 1 root root 909107200 Jun 5 12:48 linuxmint-11-gnome-dvd-32bit.iso
# rm p1/dum/*
rm: remove regular file `p1/dum/linuxmint-11-gnome-dvd-32bit.iso'? y
Create Large File
Code:
# dd if=/dev/zero of=p1/dum/dummy bs=1M count=768
768+0 records in
768+0 records out
805306368 bytes (805 MB) copied, 10.8299 s, 74.4 MB/s
Successfully Created
Code:
# ls -l p1/dum/dummy
-rw-r--r-- 1 root root 805306368 Jun 11 18:52 p1/dum/dummy
# ls -lh p1/dum/dummy
-rw-r--r-- 1 root root 768M Jun 11 18:52 p1/dum/dummy
# du -h p1/dum/dummy
769M p1/dum/dummy
Used to Crash with the Same Symptoms after Continuous disk access the System Froze
Code:
# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 79916 -1
Swap Used and Command Completed
Large File
Code:
# mount /dev/sda6 p6
# ls -l p6/lm
-rw-r--r-- 1 999 999 909107200 May 28 15:26 linuxmint-11-gnome-dvd-32bit.iso
drwxr-xr-x 2 root root 4096 Jun 6 11:06 vd
Large File Copy
Code:
# cp -a p6/lm/linuxmint-11-gnome-dvd-32bit.iso p1/dum
# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 79896 -1
Swap Used
Code:
# ls -lh p1/dum/
total 1.6G
-rw-r--r-- 1 root root 768M Jun 11 18:52 dummy
-rw-r--r-- 1 999 999 867M May 28 15:26 linuxmint-11-gnome-dvd-32bit.iso
# ls -l p1/dum/
-rw-r--r-- 1 root root 805306368 Jun 11 18:52 dummy
-rw-r--r-- 1 999 999 909107200 May 28 15:26 linuxmint-11-gnome-dvd-32bit.iso
& Copy Terminated Normally
Swap Usage
Code:
# swapon /dev/sda7
# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 0 -1
# mount /dev/sda1 p1
During DD
Code:
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 0 -1
# dd if=/dev/zero of=p1/dum/ddt bs=1M count=768
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 2776 -1
/dev/sda7 partition 530108 2828 -1
/dev/sda7 partition 530108 2828 -1
/dev/sda7 partition 530108 2828 -1
/dev/sda7 partition 530108 2768 -1
Code:
768+0 records in
768+0 records out
805306368 bytes (805 MB) copied, 13.0094 s, 61.9 MB/s
$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 2628 -1
Command Execution
Code:
# ls -lh p1/dum/
total 2.4G
-rw-r--r-- 1 root root 768M Jun 11 22:10 ddt
-rw-r--r-- 1 root root 768M Jun 11 18:52 dummy
-rw-r--r-- 1 999 999 867M May 28 15:26 linuxmint-11-gnome-dvd-32bit.iso
Normally Terminating |