How To Install sg3_utils on CentOS 8
Introduction
In this tutorial we learn how to install sg3_utils
on CentOS 8.
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 CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install sg3_utils.
Install sg3_utils on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 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 CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 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 CentOS 8
To uninstall only the sg3_utils
package we can use the following command:
sudo dnf remove sg3_utils
sg3_utils Package Contents on CentOS 8
/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_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/1c78b92c09d3db3bda1d1b828d49a4420ba6b8
/usr/lib/.build-id/08
/usr/lib/.build-id/08/7d6b1ff0f819b72342d1ba0cef6754c4cd6358
/usr/lib/.build-id/09
/usr/lib/.build-id/09/d6935b4a0dc08a9c6ab0c4db8300abca1cfe04
/usr/lib/.build-id/09/e57222b6d56bb5fbfca9d1ea7261b0044c8eed
/usr/lib/.build-id/0a
/usr/lib/.build-id/0a/d51ab5125ee7f61cabe8057ccd9d8814807ecb
/usr/lib/.build-id/0b
/usr/lib/.build-id/0b/02d6bcbf0d226fc2c77fccc81e59eda05c84bc
/usr/lib/.build-id/0b/a7869aa3b35c5796772f30b8b0b9e59abdb2d7
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/023d1af4c4a6f2c52b30d1f9c6bc1d92d7a1a6
/usr/lib/.build-id/0d/9164760d84b4672514b9e3155241a4465633af
/usr/lib/.build-id/11
/usr/lib/.build-id/11/5ea328f05b1af9f677af7a8cd440a2bcdc354a
/usr/lib/.build-id/11/bc86494734a5b373912c7cec06084e131869fb
/usr/lib/.build-id/1e
/usr/lib/.build-id/1e/e260d8e4428157f3a4b0f09e7d6224140e4278
/usr/lib/.build-id/24
/usr/lib/.build-id/24/a7ae5f472fab9f1707d365455154ecc7bc4013
/usr/lib/.build-id/26
/usr/lib/.build-id/26/2e2d3ee19c737a8af199b86bd25c16285c38f7
/usr/lib/.build-id/29
/usr/lib/.build-id/29/204e1126739490f1d463663b7ecc771b2842c4
/usr/lib/.build-id/2a
/usr/lib/.build-id/2a/86aaa5d4877d3efc951c5ce64cb29cf6923297
/usr/lib/.build-id/2e
/usr/lib/.build-id/2e/15217d04115ee91998dba045aa0ce0d9d550a3
/usr/lib/.build-id/30
/usr/lib/.build-id/30/c631ab8cbd115030782a025c4f3613bcd418d5
/usr/lib/.build-id/35
/usr/lib/.build-id/35/5b9ffb011063efe8b3278b86913c926f4b02a2
/usr/lib/.build-id/38
/usr/lib/.build-id/38/bb6349f8b819c807d60a4fe626337430e1f251
/usr/lib/.build-id/3b
/usr/lib/.build-id/3b/c148bcfd0157da418a3b5ce78acea0091fc234
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/8a624a801fa06f77804d781490394e25a7d57c
/usr/lib/.build-id/3d
/usr/lib/.build-id/3d/95c2e838d32da6653de7c82f3fe94d9aa426a6
/usr/lib/.build-id/40
/usr/lib/.build-id/40/dd0c87c1f93b34b2271f24d01d32f56fa21068
/usr/lib/.build-id/42
/usr/lib/.build-id/42/b03a99337db0f3282a79d9792b493dbd671c02
/usr/lib/.build-id/4c
/usr/lib/.build-id/4c/160360de27d8de55a2121b79ac57cf1a4b5701
/usr/lib/.build-id/4c/3d83d84bd2ad259ea506ce8f469c5c5a6126b1
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/7df875ec16e735537843ea3d6f9fe9f611fce5
/usr/lib/.build-id/53
/usr/lib/.build-id/53/e858a626f0fcff8427911c1adffb5b673f344f
/usr/lib/.build-id/57
/usr/lib/.build-id/57/0598c967e08ddb5b8b351aab284165f631e79c
/usr/lib/.build-id/59
/usr/lib/.build-id/59/ac27341eb16616ec2c937827adadd84894c0c9
/usr/lib/.build-id/5a
/usr/lib/.build-id/5a/c601d0da63cb4857760be8613f55e55f2312d1
/usr/lib/.build-id/68
/usr/lib/.build-id/68/09c092ade5f99f2190a4b455a45bcc48863b60
/usr/lib/.build-id/70
/usr/lib/.build-id/70/b2be58a69cae175ab2034f0ae259ee8b7e4101
/usr/lib/.build-id/73
/usr/lib/.build-id/73/d9fec1cc0a5c8a5f9c5b00ebd492b144701e3f
/usr/lib/.build-id/75
/usr/lib/.build-id/75/384a30acf9bf05cba74b86be26df8507a8282c
/usr/lib/.build-id/75/5485c062b5f7b5823a8e6d7b2bb5ec83ac08da
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/8ed8a1783be9a465122e78fbc3a06e2499beef
/usr/lib/.build-id/88
/usr/lib/.build-id/88/5f89fa6ed6084a29e8e48ab2862428bdfdf5f7
/usr/lib/.build-id/8a
/usr/lib/.build-id/8a/d3874e0e7c3721ec9d159147fa426831f2c946
/usr/lib/.build-id/8d
/usr/lib/.build-id/8d/623453a6148760f1ae24039477caeab6fcdbd5
/usr/lib/.build-id/94
/usr/lib/.build-id/94/dccb7b4c3b46e1b71ed10d23e2e1d4b54d7655
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/84cb6a08fa5b847c7636b23b42d29df7275d41
/usr/lib/.build-id/9b
/usr/lib/.build-id/9b/7e6eafd1dc1fd89f99c57e95508c7585277865
/usr/lib/.build-id/9b/d5edc1592f16ba797f8033abe7890c46bc1c9a
/usr/lib/.build-id/9c
/usr/lib/.build-id/9c/9ea9a7c252ff3bc627f0f204ff93883786ac1b
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/0b311b3a31301a7c633316c79620bc2fabd5a8
/usr/lib/.build-id/9e
/usr/lib/.build-id/9e/a9fc2335156eb0c27ce9b2987aec8b3af78099
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/36261366e228ee2594448f9255e83431154941
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/53f4bc4e0c989522c7a702773ab21f5f34e997
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/2697724cfe732cdad048a8b5ba4342e3d1e15e
/usr/lib/.build-id/a6
/usr/lib/.build-id/a6/a380ada10ba2eb45a61c11e9b01021ed3ecc0a
/usr/lib/.build-id/af
/usr/lib/.build-id/af/4b4c53bb85f2d0f28088a78a2311af8d0d7e7e
/usr/lib/.build-id/b0
/usr/lib/.build-id/b0/8d81fdfa746f0f8e2c621489486cba012d067c
/usr/lib/.build-id/b0/c827d1e9922e1ebbbbec35fb205a3344006318
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/f0925b4875e9adb59c033167bab9d60bb49be9
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/c721faefc8425ac8e905c43adfbf8a96f6aa36
/usr/lib/.build-id/be
/usr/lib/.build-id/be/fbeaded47c58564749ca9838b898f126d21bef
/usr/lib/.build-id/c8
/usr/lib/.build-id/c8/ed29905878ac38508ce86d7c2db4796f25177e
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/449febbc8085972c10c02fe626409105ca703e
/usr/lib/.build-id/d9
/usr/lib/.build-id/d9/23b05f77e3a19a2e819f5d08da780a2087f8dc
/usr/lib/.build-id/da
/usr/lib/.build-id/da/8528de7713e05cd5f14290492bdf54d8feed49
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/4db94145e954caa274b1ecbd166b16d38065b1
/usr/lib/.build-id/f0
/usr/lib/.build-id/f0/a78c2ecc1724419a75f56ccf8f0c7dfd193b2a
/usr/lib/.build-id/f4
/usr/lib/.build-id/f4/bbfdea5079700bd00a0379bd8734d5a58f31db
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/521a14eb6c0291da73a3159c3f17fdb4175c1a
/usr/lib/.build-id/fa
/usr/lib/.build-id/fa/c50f0902fa1db689c734cef1c97468733ab4b3
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/aff0da513929b3b2aef617c2c083a44504fc12
/usr/lib/udev/fc_wwpn_id
/usr/lib/udev/rules.d
/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/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_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 CentOS 8 using yum and dnf.