How To Install sg3_utils on Fedora 34

sg3_utils is Utilities for devices that use SCSI command sets

Introduction

In this tutorial we learn how to install sg3_utils on Fedora 34.

What is sg3_utils

Collection of Linux utilities for devices that use the SCSI command set. Includes utilities to copy data based on “dd” syntax and semantics (called sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check mode and log pages (sginfo, sg_modes and sg_logs); spin up and down disks (sg_start); do self tests (sg_senddiag); and various other functions. See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) must be used. In the 2.6 series other device names may be used as well (e.g. /dev/sda). Warning and the incorrect usage of them may render your system inoperable.

We can use yum or dnf to install sg3_utils on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install sg3_utils.

Install sg3_utils on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sg3_utils using dnf by running the following command:

sudo dnf -y install sg3_utils

Install sg3_utils on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sg3_utils using yum by running the following command:

sudo yum -y install sg3_utils

How To Uninstall sg3_utils on Fedora 34

To uninstall only the sg3_utils package we can use the following command:

sudo dnf remove sg3_utils

sg3_utils Package Contents on Fedora 34

/usr/bin/rescan-scsi-bus.sh
/usr/bin/scsi-rescan
/usr/bin/scsi_logging_level
/usr/bin/scsi_mandat
/usr/bin/scsi_readcap
/usr/bin/scsi_ready
/usr/bin/scsi_satl
/usr/bin/scsi_start
/usr/bin/scsi_stop
/usr/bin/scsi_temperature
/usr/bin/sg_bg_ctl
/usr/bin/sg_compare_and_write
/usr/bin/sg_copy_results
/usr/bin/sg_dd
/usr/bin/sg_decode_sense
/usr/bin/sg_emc_trespass
/usr/bin/sg_format
/usr/bin/sg_get_config
/usr/bin/sg_get_elem_status
/usr/bin/sg_get_lba_status
/usr/bin/sg_ident
/usr/bin/sg_inq
/usr/bin/sg_logs
/usr/bin/sg_luns
/usr/bin/sg_map
/usr/bin/sg_map26
/usr/bin/sg_modes
/usr/bin/sg_opcodes
/usr/bin/sg_persist
/usr/bin/sg_prevent
/usr/bin/sg_raw
/usr/bin/sg_rbuf
/usr/bin/sg_rdac
/usr/bin/sg_read
/usr/bin/sg_read_attr
/usr/bin/sg_read_block_limits
/usr/bin/sg_read_buffer
/usr/bin/sg_read_long
/usr/bin/sg_readcap
/usr/bin/sg_reassign
/usr/bin/sg_referrals
/usr/bin/sg_rep_zones
/usr/bin/sg_requests
/usr/bin/sg_reset
/usr/bin/sg_reset_wp
/usr/bin/sg_rmsn
/usr/bin/sg_rtpg
/usr/bin/sg_safte
/usr/bin/sg_sanitize
/usr/bin/sg_sat_identify
/usr/bin/sg_sat_phy_event
/usr/bin/sg_sat_read_gplog
/usr/bin/sg_sat_set_features
/usr/bin/sg_scan
/usr/bin/sg_seek
/usr/bin/sg_senddiag
/usr/bin/sg_ses
/usr/bin/sg_ses_microcode
/usr/bin/sg_start
/usr/bin/sg_stpg
/usr/bin/sg_stream_ctl
/usr/bin/sg_sync
/usr/bin/sg_test_rwbuf
/usr/bin/sg_timestamp
/usr/bin/sg_turs
/usr/bin/sg_unmap
/usr/bin/sg_verify
/usr/bin/sg_vpd
/usr/bin/sg_wr_mode
/usr/bin/sg_write_buffer
/usr/bin/sg_write_long
/usr/bin/sg_write_same
/usr/bin/sg_write_verify
/usr/bin/sg_write_x
/usr/bin/sg_xcopy
/usr/bin/sg_zone
/usr/bin/sginfo
/usr/bin/sgm_dd
/usr/bin/sgp_dd
/usr/lib/.build-id
/usr/lib/.build-id/01
/usr/lib/.build-id/01/9d76917c87520332a6fe9f3856f77ad5e505e5
/usr/lib/.build-id/03
/usr/lib/.build-id/03/4410290e69e24b7512ca0d758be886745f65cb
/usr/lib/.build-id/03/5bbf57ade08555d4395cef1e2372cc121e892c
/usr/lib/.build-id/07
/usr/lib/.build-id/07/ba9ee9027b66140bfaea10074c328a6b75f3a1
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/be6f972d04d40ed33f506177a0a451e3e4b966
/usr/lib/.build-id/12
/usr/lib/.build-id/12/b2390201dbc81e286d6d904c2931cfc6021ebc
/usr/lib/.build-id/14
/usr/lib/.build-id/14/2e61241a11705198fd8cab1ea10f8183967beb
/usr/lib/.build-id/15
/usr/lib/.build-id/15/af53e2b02f2ce614b8f2d196231c8e700feea9
/usr/lib/.build-id/16
/usr/lib/.build-id/16/17cbe893043f1ea2b256ce7ee4e28eb30352a6
/usr/lib/.build-id/16/a568224bd34a8b21618cfa6484e6a4d48a53d7
/usr/lib/.build-id/17
/usr/lib/.build-id/17/40e7edfc3c4a77d2caffaaf43d722f79556815
/usr/lib/.build-id/1d
/usr/lib/.build-id/1d/ff34e56f6b201ebaca45fd146c1bfbd7a47b3a
/usr/lib/.build-id/2f
/usr/lib/.build-id/2f/2dd6d2978b8aeead165dba49ebd173174f86de
/usr/lib/.build-id/2f/a2e1b0bfe5077a0405d041053bfb6a51ad44ba
/usr/lib/.build-id/2f/af947a4b78b0be3e6a462f4cca79c26adf8bdf
/usr/lib/.build-id/30
/usr/lib/.build-id/30/91719ff1602cecb8cc7f236f6e99c6b3a09b8c
/usr/lib/.build-id/38
/usr/lib/.build-id/38/78def6cc7b578cbeb8859a5e43afdca6e25dec
/usr/lib/.build-id/3a
/usr/lib/.build-id/3a/59af9f59425389c4b670e1d0a52935834d109d
/usr/lib/.build-id/3b
/usr/lib/.build-id/3b/2e1457264b826630f57f27ac095d8b770b07a7
/usr/lib/.build-id/46
/usr/lib/.build-id/46/5ddce1568e16a6708fb2dea2c8b76305415ce8
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/afe1a4b7998cbb4c10e5846b533a236910f6ae
/usr/lib/.build-id/51
/usr/lib/.build-id/51/d13d6f7c2bd68e2b9423b04fbd3ca9642935d7
/usr/lib/.build-id/51/d53fb885a2b3e728845bffb74fc5edc7a78d25
/usr/lib/.build-id/53
/usr/lib/.build-id/53/def1c97ac1c7c925ff7958378f85bc86592749
/usr/lib/.build-id/5a
/usr/lib/.build-id/5a/a8d8eb9b1579390279eb18e4b7695fa4a6c7ce
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/67a858d7f4359918b07ffe6facdf7b96fa63c7
/usr/lib/.build-id/62
/usr/lib/.build-id/62/377afe26ae9a4c7db7c7f126ff5f10399004cf
/usr/lib/.build-id/65
/usr/lib/.build-id/65/633430763579b640b2a298b3f050dd64749119
/usr/lib/.build-id/6a
/usr/lib/.build-id/6a/6c2e8288608f4d5cdb7fa02557fb1f35f07e91
/usr/lib/.build-id/6b
/usr/lib/.build-id/6b/4df01ef8abb0c21be90b4dc1b5b1ba849ee392
/usr/lib/.build-id/6b/7b56160b61d88475837ccd027b28e3d5293592
/usr/lib/.build-id/6b/9e8007fe009fcc759874786bc3c48e29f3a54f
/usr/lib/.build-id/70
/usr/lib/.build-id/70/23cd13e3bd61d1302620bb8b25525bf1f4edf2
/usr/lib/.build-id/70/46b6246dded01f0eba58637786d372209cadb6
/usr/lib/.build-id/70/bbfa762dedfc6efaf9cb56eecbfcf0a1b52f0f
/usr/lib/.build-id/7c
/usr/lib/.build-id/7c/0178cf4d5ae08a59d61007e043ad7ece5783da
/usr/lib/.build-id/7c/6c9d83b2b2b9d9f2837cfd43c1977a6b93e13b
/usr/lib/.build-id/7c/e222127031dcec9a7d12023806c1fa79021eda
/usr/lib/.build-id/84
/usr/lib/.build-id/84/8d0645e0fb18d309df5552a78022647a7bed2b
/usr/lib/.build-id/94
/usr/lib/.build-id/94/57e29741eeb5dc2f019c132ddc5a5d3d65ad6b
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/fd2cb231660c94c4b0b2e4c1c699604b9ff4db
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/fc90fcb69b2de968b0bcc23bb0366b77edbfcb
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/d495c32748d3a784188d18da950ac903c557d8
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/3746a94690d03b63736dacf2d30bfa0fadeb21
/usr/lib/.build-id/a7
/usr/lib/.build-id/a7/decf40602a1653b0726ca58a0c169c6033beeb
/usr/lib/.build-id/a9
/usr/lib/.build-id/a9/dc6d73b28ba450c0da0a0fae3ff1abedf4145b
/usr/lib/.build-id/ab
/usr/lib/.build-id/ab/c3ff6a7601e9c9c194c8b99a625c53f9e81296
/usr/lib/.build-id/af
/usr/lib/.build-id/af/8b7b31c4024e9c6dea19eba5be017537817934
/usr/lib/.build-id/b8
/usr/lib/.build-id/b8/b193020efbe2dfdb2c87895f41b787fcfa5ede
/usr/lib/.build-id/c8
/usr/lib/.build-id/c8/7724293fa47df475c46846b3339cbde500cbc5
/usr/lib/.build-id/ca
/usr/lib/.build-id/ca/46c8de38d23c1dce1d292b38483054bd8d32f9
/usr/lib/.build-id/ca/f50637ec8fef8f001ba579c8c569d17e679a87
/usr/lib/.build-id/cb
/usr/lib/.build-id/cb/6783561d072b8a7bd1c8e8411f0c71290cb5ad
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/0d28fdc8d1f7b14cce3c45a7b5d5e6aafa9c38
/usr/lib/.build-id/cd
/usr/lib/.build-id/cd/0c8bf93812d2966c335c5e2de6a137f0d261cd
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/c6efcda670e3c2e8072d89e33492e45049fa18
/usr/lib/.build-id/d6
/usr/lib/.build-id/d6/ce159d94b71d1ff02216009e0227b216fb4c8d
/usr/lib/.build-id/d8
/usr/lib/.build-id/d8/35d623b97406f83d377622720f0450d72b9577
/usr/lib/.build-id/db
/usr/lib/.build-id/db/77eafd3388ad14820be26abe8d769c97186d48
/usr/lib/.build-id/e5
/usr/lib/.build-id/e5/0a17e3b8462a62d11aa7ad1f2eb9891eaef48a
/usr/lib/.build-id/e5/127b02f8db06b859258c14816b3d31fd0fcd94
/usr/lib/.build-id/e9
/usr/lib/.build-id/e9/a48a3d3841977df79cb3a05525a06a04226db0
/usr/lib/.build-id/ee
/usr/lib/.build-id/ee/bd10c5549cdb83fc91cced02b4856d987dc66d
/usr/lib/.build-id/f3
/usr/lib/.build-id/f3/492333a1b549c88a7598e8bce1fd838793abe4
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/5168f4504702b95f1fc7fa1d867c29b7854b40
/usr/lib/.build-id/f7/867748368d1278054c9e1f7d618fa712c86fad
/usr/lib/.build-id/f8
/usr/lib/.build-id/f8/10eccfa6e18cce5fa7b8b236b52c22aa7e288f
/usr/lib/.build-id/fa
/usr/lib/.build-id/fa/d497c11f231c7edf7bd511a3532adc645f26a2
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/626112595c612e8e9a3cfb2fe833955b53fc48
/usr/lib/udev/fc_wwpn_id
/usr/lib/udev/rules.d/40-usb-blacklist.rules
/usr/lib/udev/rules.d/61-scsi-sg3_id.rules
/usr/lib/udev/rules.d/63-fc-wwpn-id.rules
/usr/lib/udev/rules.d/63-scsi-sg3_symlink.rules
/usr/lib/udev/rules.d/65-scsi-cciss_id.rules
/usr/share/doc/sg3_utils
/usr/share/doc/sg3_utils/AUTHORS
/usr/share/doc/sg3_utils/BSD_LICENSE
/usr/share/doc/sg3_utils/COPYING
/usr/share/doc/sg3_utils/COVERAGE
/usr/share/doc/sg3_utils/CREDITS
/usr/share/doc/sg3_utils/ChangeLog
/usr/share/doc/sg3_utils/README
/usr/share/doc/sg3_utils/README.sg_start
/usr/share/man/man8/rescan-scsi-bus.sh.8.gz
/usr/share/man/man8/scsi-rescan.8.gz
/usr/share/man/man8/scsi_logging_level.8.gz
/usr/share/man/man8/scsi_mandat.8.gz
/usr/share/man/man8/scsi_readcap.8.gz
/usr/share/man/man8/scsi_ready.8.gz
/usr/share/man/man8/scsi_satl.8.gz
/usr/share/man/man8/scsi_start.8.gz
/usr/share/man/man8/scsi_stop.8.gz
/usr/share/man/man8/scsi_temperature.8.gz
/usr/share/man/man8/sg3_utils.8.gz
/usr/share/man/man8/sg_bg_ctl.8.gz
/usr/share/man/man8/sg_compare_and_write.8.gz
/usr/share/man/man8/sg_copy_results.8.gz
/usr/share/man/man8/sg_dd.8.gz
/usr/share/man/man8/sg_decode_sense.8.gz
/usr/share/man/man8/sg_emc_trespass.8.gz
/usr/share/man/man8/sg_format.8.gz
/usr/share/man/man8/sg_get_config.8.gz
/usr/share/man/man8/sg_get_elem_status.8.gz
/usr/share/man/man8/sg_get_lba_status.8.gz
/usr/share/man/man8/sg_ident.8.gz
/usr/share/man/man8/sg_inq.8.gz
/usr/share/man/man8/sg_logs.8.gz
/usr/share/man/man8/sg_luns.8.gz
/usr/share/man/man8/sg_map.8.gz
/usr/share/man/man8/sg_map26.8.gz
/usr/share/man/man8/sg_modes.8.gz
/usr/share/man/man8/sg_opcodes.8.gz
/usr/share/man/man8/sg_persist.8.gz
/usr/share/man/man8/sg_prevent.8.gz
/usr/share/man/man8/sg_raw.8.gz
/usr/share/man/man8/sg_rbuf.8.gz
/usr/share/man/man8/sg_rdac.8.gz
/usr/share/man/man8/sg_read.8.gz
/usr/share/man/man8/sg_read_attr.8.gz
/usr/share/man/man8/sg_read_block_limits.8.gz
/usr/share/man/man8/sg_read_buffer.8.gz
/usr/share/man/man8/sg_read_long.8.gz
/usr/share/man/man8/sg_readcap.8.gz
/usr/share/man/man8/sg_reassign.8.gz
/usr/share/man/man8/sg_referrals.8.gz
/usr/share/man/man8/sg_rep_zones.8.gz
/usr/share/man/man8/sg_requests.8.gz
/usr/share/man/man8/sg_reset.8.gz
/usr/share/man/man8/sg_reset_wp.8.gz
/usr/share/man/man8/sg_rmsn.8.gz
/usr/share/man/man8/sg_rtpg.8.gz
/usr/share/man/man8/sg_safte.8.gz
/usr/share/man/man8/sg_sanitize.8.gz
/usr/share/man/man8/sg_sat_identify.8.gz
/usr/share/man/man8/sg_sat_phy_event.8.gz
/usr/share/man/man8/sg_sat_read_gplog.8.gz
/usr/share/man/man8/sg_sat_set_features.8.gz
/usr/share/man/man8/sg_scan.8.gz
/usr/share/man/man8/sg_seek.8.gz
/usr/share/man/man8/sg_senddiag.8.gz
/usr/share/man/man8/sg_ses.8.gz
/usr/share/man/man8/sg_ses_microcode.8.gz
/usr/share/man/man8/sg_start.8.gz
/usr/share/man/man8/sg_stpg.8.gz
/usr/share/man/man8/sg_stream_ctl.8.gz
/usr/share/man/man8/sg_sync.8.gz
/usr/share/man/man8/sg_test_rwbuf.8.gz
/usr/share/man/man8/sg_timestamp.8.gz
/usr/share/man/man8/sg_turs.8.gz
/usr/share/man/man8/sg_unmap.8.gz
/usr/share/man/man8/sg_verify.8.gz
/usr/share/man/man8/sg_vpd.8.gz
/usr/share/man/man8/sg_wr_mode.8.gz
/usr/share/man/man8/sg_write_buffer.8.gz
/usr/share/man/man8/sg_write_long.8.gz
/usr/share/man/man8/sg_write_same.8.gz
/usr/share/man/man8/sg_write_verify.8.gz
/usr/share/man/man8/sg_write_x.8.gz
/usr/share/man/man8/sg_xcopy.8.gz
/usr/share/man/man8/sg_zone.8.gz
/usr/share/man/man8/sginfo.8.gz
/usr/share/man/man8/sgm_dd.8.gz
/usr/share/man/man8/sgp_dd.8.gz

References

Summary

In this tutorial we learn how to install sg3_utils on Fedora 34 using yum and dnf.