gnome-disk-utility graphical disk management tool,可用于分区、监控健康状况和创建磁盘映像

In the openEuler system, I couldn’t find a good graphical tool for viewing disk information, so I used the gnome-disk-utility software from the GNOME UI and built it into an RPM package using the spec file provided on the openEuler official website.

After testing, it works properly under the UKUI graphical environment. Download the RPM package here: AtomGit | GitCode - 全球开发者的开源社区,开源代码托管平台
Source code and RPM download address

The compressed package uploaded below should, in theory, be compatible with openEuler 22.03 and later versions.

gnome-disk-utility.zip (2.3 MB)

yum install libcanberra-gtk3
rpm -ivh gnome-disk-utility-46.1-2.x86_64.rpm

gnome-disk-utility (commonly known as GNOME Disks) is the official graphical disk management tool for the GNOME desktop environment. It is powerful and can be used for partitioning, monitoring disk health, and creating disk images.

1. Installation

If the tool is not already installed on your system, you can install it using the following command:

sudo apt update && sudo apt install gnome-disk-utility

2. Launching and Interface

After installation, you can start it in one of the following ways:

  • Graphical Interface: Search for and open the application named Disks or Disk in the application menu.

  • Command Line: Enter the following command in the terminal and press Enter:

gnome-disks

3. Core Features and Operations

GNOME Disks focuses on disk and partition management, health monitoring, and advanced operations.

A. Partition Management

This is the most commonly used feature, allowing you to partition, format, and manage selected disks.

  • View Information: The left panel lists all connected storage devices. Select any disk or partition to view detailed information on the right, such as device path (/dev/sda), capacity, partition table, and filesystem.

  • Create Partition: On unallocated space of a disk, click the + button to start the wizard. Set the partition size, filesystem type (e.g., ext4), and partition name. Note: Partition operations are irreversible—always back up your data beforehand.

  • Format and Modify: Select an existing partition and click the gear icon ⚙️ to choose Format Partition... or Edit Partition... to change the filesystem or partition label.

  • Mount and Unmount: Select a partition and click the :play_button: (Mount) or :stop_button: (Unmount) button to temporarily mount or unmount it. For automatic mounting at boot, use the Edit Mount Options... option in the gear menu.

B. Disk Health Monitoring (S.M.A.R.T.)

This feature checks the health of your hard drive and provides early warnings for potential failures.

  • View S.M.A.R.T. Data: Select the target disk, click the menu or gear icon ⚙️ in the top-right corner, and choose S.M.A.R.T. Data and Self-Test....

  • Run Self-Test: In the new window, you can run different types of S.M.A.R.T. tests to assess disk status.

    • Short Self-Test: Quickly checks electrical and mechanical performance and a small portion of data areas. Usually completes in under 2 minutes.

    • Long/Extended Self-Test: Performs a thorough scan of the entire disk surface. There is no time limit—typically takes several hours, depending on disk size and speed.

  • Interpreting Attributes: Pay close attention to critical attributes such as Reallocated Sector Count (Reallocated Sector Count). If this value is non-zero, it typically indicates physical bad sectors on the disk. In such cases, immediately back up your data and consider replacing the disk.

C. Disk Imaging and Backup

This feature allows you to create a complete backup (image file) of an entire disk or partition, or restore data from an image file.

  • Create Disk Image: Select the disk you want to back up, click the menu button (hamburger icon ) in the top-right corner, and choose Create Disk Image.... This generates a .img file.

  • Restore Disk Image: Similarly, choose Restore Disk Image... from the menu, select the previously created .img file, and specify the target disk for restoration.

  • Important Reminder: This operation performs a bit-for-bit copy. The resulting image file will be the same size as the source disk or partition. Ensure the destination storage has sufficient space before proceeding.

D. Benchmarking

This feature tests disk performance.

  • Click the gear icon ⚙️ and choose Start Benchmark.... You can customize the number of samples and data size. After testing, performance metrics such as read response time and read/write speed are displayed in charts.

4. Useful Command-Line Options

The gnome-disks command supports several options to launch specific tasks directly:

  • gnome-disks --block-device /dev/sda: Launch GNOME Disks and automatically select the /dev/sda disk.

  • gnome-disks --restore-disk-image /path/to/backup.img: Open the “Restore Disk Image” dialog directly.

Summary

gnome-disk-utility (GNOME Disks) is a crucial tool for interacting between hardware devices and the operating system. For everyday tasks such as partition management, disk health monitoring, and system-level backup and restoration, it is a reliable and convenient choice.