SSD is not aligned

KDE Partition Manager shows that:

Partition /dev/nvme0n1p2 is not properly aligned (last section: 2,000,397,734, modulo: 1,447)

Is it a serious problem? How to solve this?

You could use GParted to resize the partition (even if only by 1mb) to allow the partition to adjust to the next available boundary. If this partition is / take extra care; resize from the right side and avoid moving the left-hand position. Cloning / might be advisable before committing to this (just in case).

2 Likes

Could you please elaborate on this?

I don’t see much to elaborate on.
What are you having difficulty understanding?

He’s telling you that you could use a partition tool program like GParted (included in Manjaro) to change the size of the partition that’s not aligned. He is also warning you if the partition is / also known as root or main partition is rezised then you must rezise using the last part of the partition and not the first to not disturb low level readings.

1 Like

Since it is exactly the root partition, I think it should be done in a live USB boot. It is quite risky because I have to delete all data first.

That would usually be the accepted procedure.

It can be risky. Thus the suggestion to clone the partition beforehand.

However, there is no reason to delete any data, as you’re simply resizing the partition (albeit only by a very small amount) and not repartitioning or formatting it. In practice, resizing a partition is non-destructive; the only caveat being that the / partition should only be resized from the end (the right-hand side as viewed in GParted), to avoid changing it’s starting sector.

Your comment:

…indicates that only the ending position is misaligned.

Feel free to ask others for their opinions on this, if you’re not feeling confident.

Cheers.

Edit:- Note that this condition might never cause any major issues for you; but it could; ultimately it’s your choice whether (or not) to do anything about it. All I can add is that this issue has arisen before, and has been solved using the same procedure.

Good luck.

2 Likes

In fact, I still don’t really understand ** the only caveat being that the / partition should only be resized from the end**.

The following is the result of print of Gparted:

Model: WD WD_BLACK Gen4 SDCPNRY-1T00-1106 (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      2097kB  317MB   315MB   fat32              boot, esp
 2      317MB   1024GB  1024GB  ext4         root

I asked ChatGPT, and it told me to run resizepart 2 1024GB. Since it is already 1024GB, why to brother resizing it again?

Well, for a start, if you had used GPARTED as I suggested, it might be a little more obvious to you. Gparted is a GUI application; from the Application Menu of the Manjaro Live Installer:

→ System → GParted

You gave command output from PARTED, a command-line tool. Use the GUI app as directed and the logic should reveal itself; it really isn’t complicated.

Resizing of a partition (in the GUI) is done by either incrementing the size 1mb at a time, or by dragging the ends of a partition as it’s graphically represented in GParted.

If the partition is misaligned, this means it is not aligned on the expected boundaries (usually megabyte increments). Resizing the partition with GParted (even by 1mb) will properly align the partition to the next available boundary. Problem solved.

You shouldn’t use KDE Partition Manager for this as the native Manjaro tools have already demonstrated a failure to function as expected. GParted, however, has passed the test of time.

Re-read all of my previous posts in context of using the GParted GUI app, and with any luck, you might finally understand references to end, right-hand, etc.

I hope you don’t rely on ChatGPT for Linux maintenance suggestions.

However, in this case it’s response was close enough: Resizing the partition is necessary for the reasons I have already outlined multiple times. In this case (again) my suggestion is to resize only by 1mb (larger). Resizing to the same size would seem not possible in the GUI.

1 Like

No it’s not serious. It doesn’t matter if the end of the partition is unaligned, the important part is that the start is aligned. So leave it alone unless you 100% know what youre’ doing.

2 Likes

Linux is not Windows. Here software have low and lower level access than software in Windows. Some apps, dependencies and code talks directly to the hard-drive and controller. Some code will work with sector access and lastly all OS will fill a partition from the starting sector. This mean that is waaaay safer (and faster) to reduce the partition from the end rather than the start as the chances of having to move files to do the operation would rather be bad as moving the very first file from x to the end of the disk could bring issues.
This of course is not suppose to happen but most people never had to deal with resizing partitions. The current ideal is fast and cheap storage which wont last. SSD’s limited writes or mechanical drives being mechanical devices. So usually when one of these gives the good ol’ error of bad writes/extra sectors being used then its time to get your new drive and replace your old backup with current drive and new drive is main drive. PC goes brrrrr—

2 Likes