# dd if=/dev/urandom of=tmpfile bs=1M count=3
3+0 records in
3+0 records out
3145728 bytes (3.1 MB) copied, 0.443321 s, 7.1 MB/s
# hdparm --fibmap tmpfile
tmpfile: underlying filesystem: blocksize 4096, begins at LBA 63; assuming 512 byte sectors
byte_offset begin_LBA end_LBA sectors
0 1318991 1325134 6144
# hdparm --read-sector 1318991 /dev/sdb
/dev/sdb:
reading sector 1318991: succeeded
b0e8 3ad7 d080 84e8 b4b2 7e60 21f1 eff3
0ef9 fa10 b172 89f8 186f 0194 4cb1 e190
.......................................
# rm tempfile && sync && sleep 120
# hdparm --read-sector 1318991 /dev/sdb
/dev/sdb:
reading sector 1318991: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
.......................................
위와 같이 0000 으로 채워져야 이상없이 trim 기능 작동하는 것임
# 정확한 방법
# 간단한 확인 방법
# TRIM 기능이 적용되도, 파일의 처음 1개 섹터와 마지막 7개 섹터는 내용이 변하지 않고 나머지 섹터는 0000으로 체워짐
# dd if=/dev/urandom of=tmpfile bs=1M count=3
3+0 records in
3+0 records out
3145728 bytes (3.1 MB) copied, 0.362944 s, 8.7 MB/s
# hdparm --fibmap tmpfile
tmpfile:
filesystem blocksize 4096, begins at LBA 63; assuming 512 byte sectors.
byte_offset begin_LBA end_LBA sectors
0 369727 375870 6144
# hdparm --read-sector 369728 /dev/sdd
/dev/sdd:
reading sector 369728: succeeded
b560 f5cd 3258 40d7 a6b6 0a09 23b6 651e
5804 266f e94d 846e 07ed d601 eab3 3c20.......................................
# hdparm --read-sector 369728 /dev/sdd
# 위 내용 세부 설명
# TRIM 기능이 적용되도, 파일의 처음 1개 섹터와 마지막 7개 섹터는 내용이 변하지 않고 나머지 섹터는 0000으로 체워짐
# dd if=/dev/urandom of=tmpfile bs=1M count=3
3+0 records in
3+0 records out
3145728 bytes (3.1 MB) copied, 0.362944 s, 8.7 MB/s
# hdparm --fibmap tmpfile
tmpfile:
filesystem blocksize 4096, begins at LBA 63; assuming 512 byte sectors.
byte_offset begin_LBA end_LBA sectors
0 369727 375870 6144
# hdparm --read-sector 369727 /dev/sdd
/dev/sdd:
reading sector 369727: succeeded
24f5 2e3a 9b74 1748 d299 7898 3f7d 28a3
c4fa aff3 a5db f760 249b d416 1a75 8f32
.......................................
# hdparm --read-sector 369728 /dev/sdd
/dev/sdd:
reading sector 369728: succeeded
b560 f5cd 3258 40d7 a6b6 0a09 23b6 651e
5804 266f e94d 846e 07ed d601 eab3 3c20.......................................
# hdparm --read-sector 375870 /dev/sdd
/dev/sdd:
reading sector 375870: succeeded
46d9 4d96 afc9 aa44 a255 d1bf d8b0 f63f
6c44 8f79 0225 f2f8 fd19 6041 9cf7 ad9c
.......................................
# hdparm --read-sector 375869 /dev/sdd
/dev/sdd:
reading sector 375869: succeeded
b765 1f8f 15fb 2143 ff81 5216 6a58 2bba
da61 658e 106b 95d2 52c4 5764 cfff 4b72
.......................................
# hdparm --read-sector 375868 /dev/sdd
/dev/sdd:
reading sector 375868: succeeded
51e7 7313 c3f4 5344 99d9 2e24 35bc 8033
242a 5d09 6aee c045 7ff0 a1b2 e47b 5b04
# hdparm --read-sector 375867 /dev/sdd
.......................................
# hdparm --read-sector 375866 /dev/sdd
/dev/sdd:
reading sector 375866: succeeded
a92f 15f3 8025 dda3 7ef4 8498 ea4a b96d
e200 d9cc 7ca8 ea18 99b1 f26b 3ace dc02
# hdparm --read-sector 375865 /dev/sdd
# hdparm --read-sector 375864 /dev/sdd
# hdparm --read-sector 375863 /dev/sdd
# hdparm --read-sector 375862 /dev/sdd
# hdparm --read-sector 375861 /dev/sdd
# rm -f tmpfile && sync && sleep 10
# hdparm --read-sector 369727 /dev/sdd
# hdparm --read-sector 369728 /dev/sdd
# hdparm --read-sector 375870 /dev/sdd
# hdparm --read-sector 375869 /dev/sdd
# hdparm --read-sector 375868 /dev/sdd
# hdparm --read-sector 375867 /dev/sdd
# hdparm --read-sector 375866 /dev/sdd
# hdparm --read-sector 375865 /dev/sdd
# hdparm --read-sector 375864 /dev/sdd
.......................................
# hdparm --read-sector 375863 /dev/sdd
/dev/sdd:
reading sector 375863: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
.......................................
# hdparm --read-sector 375862 /dev/sdd
/dev/sdd:
reading sector 375862: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000.......................................
# hdparm --read-sector 375861 /dev/sdd
/dev/sdd:
reading sector 375861: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
.......................................'Linux' 카테고리의 다른 글
파티션 UUID 확인 하는 방법 (1) | 2012.02.17 |
---|---|
awk IP주소 가져오기 (0) | 2012.02.07 |
man 내용 파일로 저장하기 (0) | 2012.02.02 |
areca 1212-1222 핫스페이, 리빌드 관련 정보 (0) | 2012.01.17 |
GeoIP 업데이트 (0) | 2011.12.29 |