7/5/2023 0 Comments Ubuntu disk manager![]() This time we use sfdisk to enlarge a partition without changing its starting point: # e2fsck -f -y -v /dev/sda5 We should pay attention to sfdisk‘s options, which in this case are different from those previously used. Verify Partition Table Consistency and List Partitions Also, since the output is particularly verbose, we’ll report only the essential information.ĥ.1. We’ll show how to perform them without explaining each command’s option, for which we refer to the manual pages. Then, let’s see below how to do step-by-step the same tasks done with the graphical tools. Let’s remember to disable swap with swapoff -a. Let’s be cautious and do it only if it’s strictly necessary. So, resizing and moving partitions from the command line is difficult and error-prone. Moreover, these essential command-line tools often need to be used together with other dangerous utilities like dd or resize2fs. Several well-known tools, such as parted, fdisk, cfdisk, and sfdisk, aren’t intuitive or straightforward. That’s why there isn’t an easy-to-use and comprehensive command-line equivalent of GParted or KDE Partition Manager. Moreover, they use other command-line tools under the hood, listed in their previously seen “File System Support” tables. GParted and KDE Partition Manager use libparted for some tasks but implement much other stuff themselves. Moreover, the menu that appears by right-clicking on a partition provides an option to change the UUID. It allows us to check the integrity of a file system and format it. GParted can also show device and partitions information. We note that for ext3/4, it is possible to enlarge a partition online, but moving it is only possible offline: Its legend distinguishes between online operations on mounted or otherwise active partitions and offline on unmounted or inactive ones. To get a clear idea of what actions are possible for each type of file system, we can also consult the “File System Support” table. ![]() When we apply the requested changes, GParted performs them in a fully automated manner: then we move /dev/sda7 and /dev/sda6 to the right.first, we need to enlarge the extended partition.The important thing is the correct order of operations: It offers an intuitive and convenient GUI. GParted is one of the most popular and well-known tools for resizing and moving partitions. # for part in $partitions do umount /dev/$part fsck /dev/$part done # partitions="sda1 sda5 sda6" # we exclude sda2 (extended part) and sda7 (swap part) If in doubt, we can see the list of all UUIDs with blkid.īefore trying the following partition tools, these are the preparatory commands to be executed from a live distribution in our test machine to disable swap and check file systems integrity: # swapoff -a # disables swapping on all known swap devices Or, as a workaround in case of UUID changes, we can manually update /etc/fstab. The partitions’ UUIDs must remain the same for our Linux installation to continue booting. We maintain a certain tolerance in partition sizes, which means that slight variations of a few hundred MB don’t matter: Our goal is to enlarge /dev/sda5 by about 3.7 GiB (4.0 GB) and, as a side effect, to move /dev/sda6 and /dev/sda7 to the right. During the installation, we chose this partitioning: In this case, the partition table is MBR type, and UEFI is not used. Just be aware that enabling it can cause data loss in the event of loss of power-data that is in the cache but not yet permanently written to the disk will disappear when power gets cut.Our test configuration is an installation of Linux Mint 20.3 on a 20GB VirtualBox disk. This is because one write event is quicker than many write events when the amount of data to be written is of the same size. Enabling write cache can improve your drive's performance because it forces the drive to put data that should be written into its cache first, and once it fills up it gets permanently written onto the disk. ![]() You can apply write cache settings under the Drive Settings option to speed up your drive. If the system can't find anything wrong, however, then something else might have caused whatever problem you're facing. If it does find some problems, there's probably not much you can do to fix it, but at least you know it's a hardware issue. If you think your drive has been behaving strangely, you can take a look at the SMART Data & Self-Tests to see if the system can detect any irregularities with the disk. If you are curious about just how fast your drive really is, you can benchmark it with Benchmark Disk to see how fast your read and write speeds are, as well as your access time (the time it takes for the drive to locate a file).
0 Comments
Leave a Reply. |