Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
sg3-utils /
examples /
Delete
Unzip
Name
Size
Permission
Date
Action
archive
[ DIR ]
drwxr-xr-x
2024-02-17 03:48
Makefile
3.08
KB
-rw-r--r--
2020-07-17 12:50
Makefile.freebsd
1.98
KB
-rw-r--r--
2020-07-17 12:50
README
776
B
-rw-r--r--
2018-01-20 05:14
forwarded_sense.txt
296
B
-rw-r--r--
2011-02-11 02:54
nvme_dev_self_test.hex
806
B
-rw-r--r--
2018-02-19 14:55
nvme_identify_ctl.hex
1.17
KB
-rw-r--r--
2018-02-19 14:55
nvme_read_ctl.hex
1.79
KB
-rw-r--r--
2020-08-03 13:16
nvme_write_ctl.hex
1.8
KB
-rw-r--r--
2020-08-03 13:16
reassign_addr.txt
465
B
-rw-r--r--
2007-06-27 12:51
ref_sense.txt
305
B
-rw-r--r--
2011-02-09 06:43
scsi_inquiry.c
4.09
KB
-rw-r--r--
2018-12-08 01:42
sdiag_sas_p0_cjtpat.txt
405
B
-rw-r--r--
2009-06-08 11:30
sdiag_sas_p0_prbs9.txt
407
B
-rw-r--r--
2019-10-28 06:44
sdiag_sas_p1_cjtpat.txt
464
B
-rw-r--r--
2009-06-08 11:30
sdiag_sas_p1_idle.txt
560
B
-rw-r--r--
2009-06-12 05:41
sdiag_sas_p1_prbs15.txt
408
B
-rw-r--r--
2019-10-28 06:44
sdiag_sas_p1_stop.txt
359
B
-rw-r--r--
2007-06-27 12:53
sg__sat_identify.c
7.55
KB
-rw-r--r--
2018-02-22 16:00
sg__sat_phy_event.c
12.02
KB
-rw-r--r--
2018-02-22 16:00
sg__sat_set_features.c
9.7
KB
-rw-r--r--
2020-12-08 07:38
sg_compare_and_write.txt
2.42
KB
-rw-r--r--
2019-09-18 06:53
sg_excl.c
5.98
KB
-rw-r--r--
2018-12-29 14:00
sg_persist_tst.sh
3.54
KB
-rwxr-xr-x
2017-11-05 14:08
sg_sat_chk_power.c
8.95
KB
-rw-r--r--
2018-12-08 01:42
sg_sat_smart_rd_data.c
6.4
KB
-rw-r--r--
2018-12-08 01:42
sg_simple1.c
5.87
KB
-rw-r--r--
2018-12-08 01:42
sg_simple16.c
3.41
KB
-rw-r--r--
2018-02-22 16:00
sg_simple2.c
6.59
KB
-rw-r--r--
2016-05-29 05:14
sg_simple3.c
6.46
KB
-rw-r--r--
2016-05-29 05:14
sg_simple4.c
7.25
KB
-rw-r--r--
2016-05-29 05:14
sg_simple5.c
7.47
KB
-rw-r--r--
2018-02-22 16:00
sg_unmap_example.txt
1.53
KB
-rw-r--r--
2020-07-17 12:50
sgq_dd.c
37.77
KB
-rw-r--r--
2019-03-26 12:54
transport_ids.txt
1.1
KB
-rw-r--r--
2020-07-17 12:50
Save
Rename
# sg_compare_and_write.txt # This file provides a usage example of sg_compare_and_write. # sg_compare_and_write accepts a buffer containing 2 logical instances: # - the verify instance: used to match the current content of the LBA range # - the write instance: used to write to the LBA if the verify succeeds # # In case of failure to verify the data, the command will return with check # condition with the sense code set to MISCOMPARE DURING VERIFY OPERATION. # # The following example shows initialization, successful and unsuccessful # compare and write using sg3_utils. I am using caw_buf_zero2one and # caw_buf_one2zero as shown below. $ hexdump /tmp/caw_buf_zero2one 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200 1111 1111 1111 1111 1111 1111 1111 1111 * 0000400 $ hexdump /tmp/caw_buf_one2zero 0000000 1111 1111 1111 1111 1111 1111 1111 1111 * 0000200 0000 0000 0000 0000 0000 0000 0000 0000 * 0000400 $ sg_map -i -x /dev/sg0 0 0 0 0 0 /dev/sda ATA ST3320613AS CC2H /dev/sg1 3 0 0 0 5 /dev/scd0 HL-DT-ST DVD-RAM GH22NS30 1.01 /dev/sg2 5 0 0 0 0 /dev/sdb KMNRIO K2 0000 /dev/sg3 5 0 0 1 0 /dev/sdc KMNRIO K2 0000 # First I zero out the volume to make sure that the first compare and write # will succeed $ sg_write_same --16 -i /dev/zero -n 0x200000 -x 512 /dev/sdc $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200 $ ./sg_compare_and_write --in=/tmp/caw_buf_zero2one --lba=100 --xferlen=1024 /dev/sdc # contents of LBA 100 are a block of ones $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 1111 1111 1111 1111 1111 1111 1111 1111 * 0000200 # We repeat the same compare and write command (zero2one input buffer). # compare and write fails since the verify failed (compared the zero block to # the actual 1 block in LBA 100 $ ./sg_compare_and_write --in=/tmp/caw_buf_zero2one --lba=100 --xferlen=1024 /dev/sdc COMPARE AND WRITE: Fixed format, current; Sense key: Miscompare Additional sense: Miscompare during verify operation sg_compare_and_write: SCSI COMPARE AND WRITE failed # Now we use the second buffer (one2zero) $ ./sg_compare_and_write --in=/tmp/caw_buf_one2zero --lba=100 --xferlen=1024 /dev/sdc # operation succeeded, contents of LBA 100 are back to zero $ dd if=/dev/sdc bs=512 count=1 skip=100 2>/dev/null | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000200