/
usr
/
share
/
doc
/
sg3-utils
/
examples
/
/usr/share/doc/sg3-utils/examples
mkdir
upload
Name
Size
Mode
Actions
archive/
-
0755
rm
forwarded_sense.txt
296
0644
edit
dl
rm
Makefile
3156
0644
edit
dl
rm
Makefile.freebsd
2023
0644
edit
dl
rm
nvme_dev_self_test.hex
806
0644
edit
dl
rm
nvme_identify_ctl.hex
1198
0644
edit
dl
rm
nvme_read_ctl.hex
1832
0644
edit
dl
rm
nvme_write_ctl.hex
1846
0644
edit
dl
rm
README
776
0644
edit
dl
rm
reassign_addr.txt
465
0644
edit
dl
rm
ref_sense.txt
305
0644
edit
dl
rm
scsi_inquiry.c
4185
0644
edit
dl
rm
sdiag_sas_p0_cjtpat.txt
405
0644
edit
dl
rm
sdiag_sas_p0_prbs9.txt
407
0644
edit
dl
rm
sdiag_sas_p1_cjtpat.txt
464
0644
edit
dl
rm
sdiag_sas_p1_idle.txt
560
0644
edit
dl
rm
sdiag_sas_p1_prbs15.txt
408
0644
edit
dl
rm
sdiag_sas_p1_stop.txt
359
0644
edit
dl
rm
sgq_dd.c
38679
0644
edit
dl
rm
sg_compare_and_write.txt
2483
0644
edit
dl
rm
sg_excl.c
6128
0644
edit
dl
rm
sg_persist_tst.sh
3624
0755
edit
dl
rm
sg_sat_chk_power.c
9164
0644
edit
dl
rm
sg_sat_smart_rd_data.c
6556
0644
edit
dl
rm
sg_simple1.c
6006
0644
edit
dl
rm
sg_simple2.c
6744
0644
edit
dl
rm
sg_simple3.c
6612
0644
edit
dl
rm
sg_simple4.c
7424
0644
edit
dl
rm
sg_simple5.c
7649
0644
edit
dl
rm
sg_simple16.c
3494
0644
edit
dl
rm
sg_unmap_example.txt
1571
0644
edit
dl
rm
sg__sat_identify.c
7733
0644
edit
dl
rm
sg__sat_phy_event.c
12304
0644
edit
dl
rm
sg__sat_set_features.c
9934
0644
edit
dl
rm
transport_ids.txt
1124
0644
edit
dl
rm
Edit:
/usr/share/doc/sg3-utils/examples/sg_unmap_example.txt
(1571B)
# sg_unmap_example.txt # This is an example of the contents of a file that can be given to sg_unmap # For example, assume the /dev/sdc is a scratch disk (e.g. one made by the # scsi_debug kernel module) then: # sg_unmap --in=sg_unmap_example.txt /dev/sdc 0x12345677,1 # unmap LBA 0x12345677 0x12345678 2 # unmap LBA 0x12345678 and 0x12345679 0x12340000 3333 # unmap 3333 blocks starting at LBA 0x12340000 0X5a5a5a5a5a 0 # unmaps 0 blocks (i.e. does nothing) a5a5a5h 7 # unmap 7 blocks starting at LBA 0xa5a5a5 # Note that there can be leading and trailing whitespace and whitespace # (plus comma) can be a separator. # # Example invocation: # $ sg_unmap --in=../examples/sg_unmap_example.txt -vv /dev/sdc # open /dev/sg2 with flags=0x802 # unmap cdb: 42 00 00 00 00 00 00 00 58 00 # unmap parameter list: # 00 56 00 50 00 00 00 00 00 00 00 00 12 34 56 77 # 00 00 00 01 00 00 00 00 00 00 00 00 12 34 56 78 # 00 00 00 02 00 00 00 00 00 00 00 00 12 34 00 00 # 00 00 0d 05 00 00 00 00 00 00 00 5a 5a 5a 5a 5a # 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 a5 a5 # 00 00 00 07 00 00 00 00 # sg_cmds_process_resp: slen=18 # unmap: Fixed format, current; Sense key: Illegal Request # Additional sense: Invalid command operation code # Raw sense data (in hex): # 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 # 00 00 # UNMAP not supported # # -------------------------------------------------------- # Notice the 8 byte header then 5 descriptors in the parameter # list
Save
cmd:
run