Author Topic: SSD partition miss aligned.  (Read 12114 times)

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
SSD partition miss aligned.
« on: February 03, 2022, 12:03:44 am »
I put here my update from under xcenter thread.

Quote
SSD unaligned partition can't be mounted under linux and of course, can't be fstrimed
On, my SSD, I have 4 partition and the last one is a windows one (ntfs)
Gparted could align the ntfs partition but when trying to align the previous one, it faileddespite have space after to move it and allow alignment (hope not impacting too much my ssd !)
I found dfsee having an option to move the partition using CYL or MiB !
msinfo32 under windows is interesting giving the start offset (bytes) and as soon this one is an exact multiple of 4096, partition should be aligned...   ::)

I corrected 2 of 4 partitions on my SSD which under windows show me correct alignment (start offset a multiple of 4096)
I checked under dfsee and it warned me about miss aligned partition because it uses CYL instead of MiB.
I move one partiton backward for 1 MiB to have this one aligned without the need to create it again (with lost of datas)
At en of the move process, it fully updated MBR entries and after check again under windows (msinfo32), all my partition were miss aligned again ?
From what I can see, using LVM or Dfsee, SSD partition are all miss aligned and then not good for SSD (slower and more write operation).

Any idea to not have Dfsee like LVM modifying physical partition alignment ?
Of course, I do not understand how it does it without physically moving partition ?

- partition created on SDD with windows gives good aligned partition but then, it seems not good for LVM or DFSEE
May it suppose SSD are not good disk used with OS/2 or Arca Noae ?
 

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #1 on: February 03, 2022, 12:42:26 am »
It's the usual problem, need to do all partitioning with OS/2 aware tools, and do some math to have the 4k sector partitioning, basically JFS 4k sectors need to align with the SSD's 4k sectors.
My SSD works fine, Linux is happy with it and can trim it.
You might have to start over with blanking the beginning of the drive and then creating the partitions.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: SSD partition miss aligned.
« Reply #2 on: February 03, 2022, 03:30:00 am »
It's the usual problem, need to do all partitioning with OS/2 aware tools, and do some math to have the 4k sector partitioning, basically JFS 4k sectors need to align with the SSD's 4k sectors...

But Dave, for those of us 'mere mortals' (when it comes to doing that mapping RIGHT and knowing how to instruct the tools to implement) this is a nearly hopeless situation.

Remy,
I struggled a bit through this a couple of years ago when I decided to move my OS/2 stuff to a SSD. I noticed that DFSEE did actually provide a way to build an OS/2 partition where the goal was to implement this very alignment. I tried to do that, but the resulting disk GEO was looking really strange and the remaining OS/2 disk tools complained.

Eventually, having spent a pile of time on this and NOT knowing whether all I've done did actually get me a right or wrong setup, I finally just partitioned with LVM like I've done before and off I went having spent far too much time just trying to get OS/2 to benefit from the latest tech.

Total frustration! So I feel your pain.

Unfortunately, I do not have an answer. For what it's worth I'm about to re-do all of that given that I wanted to move my stuff to a larger SSD, that being a Samsung 860Evo (from my current 850Evo drive). I will experiment again, but truth be told, as the tech has moved forward it's been harder and harder to keep all my trusty OS/2 stuff afloat, let alone actually being able to benefit from the better hardware.

I hate to mentally "toss in the towel", but I feel like that "end of the OS/2 road" may be nearer for me than I had previously wanted to believe, or perhaps even realized. Grrrhhh....I hate that feeling!

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: SSD partition miss aligned.
« Reply #3 on: February 03, 2022, 03:58:15 am »
I use DFsee (or dfsanos2 via minilvm) to create partitions. All my SSDs (including Samsung 860 EVO, 500 GB) work.

Never heard of such problems. Do you have the default options for DFSee changed?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: SSD partition miss aligned.
« Reply #4 on: February 03, 2022, 04:12:11 am »
Andreas,

I use DFsee (or dfsanos2 via minilvm) to create partitions. All my SSDs (including Samsung 860 EVO, 500 GB) work.

OK, but how do you know that your partition boundaries are actually aligned?

Remy's point is that unless you have that 4K alignment, it is known that the performance of your SSD is degraded given multiple memory page reads that occur otherwise (I believe, but easy to find detailed on-line explanation out there).

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #5 on: February 03, 2022, 05:38:54 am »
It's the usual problem, need to do all partitioning with OS/2 aware tools, and do some math to have the 4k sector partitioning, basically JFS 4k sectors need to align with the SSD's 4k sectors.
My SSD works fine, Linux is happy with it and can trim it.
You might have to start over with blanking the beginning of the drive and then creating the partitions.

I have a 1TB SSD
(I put 4 partition on it)

I just could have all aligned seen under windows using msinfo32 (or linux $ sudo fdisk -l to get starting offset - To have aligned partitions, first should start at 1MiB ofset)
I could have all aligned with the starting offest been a multiple of 4096. The easiest was to create partition under my win7 which set first ofset at 1MiB by defaut, compatible with HDD and SDD.
All was looking good but...
(I noted that L-Geo and S-geo CHS are now 976761-64-32   ::)
I checked using testdisk and geo seems ok 

I do xcopy from an other JFS disk having saved on it my boot partitions to restore one of the new aligned partition.
I tried to boot on it but it failed... Normal, MBR boot partition information was lost and JFS bootloader removed.
I put back using DFSEE the partition as boot partition and reloaded the jfs loader.
Then, I could boot ArcaOS from the restored partition...
But above a GB value, none where operationnal.

A new look under Dfsee and this time:
L-Geo 976761-64-32
S-Geo 65535-64-32   =  65535MiB !   (a big amount of GiB missing to go up to 1TiB (1024GB)

Before, I had H255 and S63  (of course, sector size always left at default 512...)
But this resulted to unaligned partition while Dfsee found it aligned (ok for HDD) but it isn't for SSD.
For Dfsee display, it is possible to adjust CHS to get acurate information but it did not correct the disk, only virtually

Note: I checked my older SSD and found that all partitions where unaligned but it worked (badly with more write operations) and the fstrim worked under linux but this time, it will not due the partition can't be mounted.
All errors results from Dfsee after a disk clone operation and dfsee doesn't check nor does it warn when the destination
disk is a SSD with aligment requirements.... Disk clone rewrites MBR but it clones the disk uniqueid too which gives then a disk signature collision problem...     

Well,
testdisk allow me to set CHS but its maximum S value is 63  (56 is not a nice value)
Now, my question is what will be maximum cylinder value for OS/2 LVM ? Which CHS value should I use ?

Now, trying again 124519-255-63 under testdisk not modifying my aligned partitions
aftet this I now see under dfsee:
L-Geo 976761-64-32
S-Geo 124519-255-63
under msinfo32, starting offset are left aligned...
It always show me partitions names and volume label.... (will now check how ArcaOS will react..)
   

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #6 on: February 03, 2022, 08:16:07 am »
It looks I missed something under dfsee...
default setting aren't good for ssd.
I redo all partition on my SSD using dfsee and found that adding an offset of 1 (default = nothing) to the first partition starting from beginning made the trick left  CHS to xxxxx-255-s63   (required for airboot - see below)
(all partition are now aligned)
.
I tried to update my airbot and I do not why, but it wrote into my Win7 ssd disk (only for win7 and M.2 pligged on the mother board)
Now, My windows is no more able to start Airboot corrupt message.
Trying to repear it or remove is unsuccessful due to not a 63 sectors !  (I hoppe not having lost my windows, I have no backup due I only did operation on the ArcaOS disk until airboot decided to prevent me booting windows.... Have now to find how to correct MBR without partition lose  :(
First check if I'm able to get a diskimg ...

   
   

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: SSD partition miss aligned.
« Reply #7 on: February 03, 2022, 09:35:18 am »
Andreas,

I use DFsee (or dfsanos2 via minilvm) to create partitions. All my SSDs (including Samsung 860 EVO, 500 GB) work.

OK, but how do you know that your partition boundaries are actually aligned?

Remy's point is that unless you have that 4K alignment, it is known that the performance of your SSD is degraded given multiple memory page reads that occur otherwise (I believe, but easy to find detailed on-line explanation out there).

I do have various SSDs. Samsung Evo 840, 850, 860, Crucial, noname, even one with IDE interface, different WD drives, SanDisk.... Usually when not in a preinstalled Win system they are all partitioned with DFSee. A few with the DFSee engine included in ArcaOS installer. They all work. They all work very fast. They all work reliable as far as I can say using some of them about 10 years now. Of course some are newer so no clue if they all will work in 20 years too.

I measure transfer speed, reading/writing of small and large files and usually compare it to the at that time state of the art other OS. And I'm quite happy with the performance.

But I don't care how DFSee aligns partitions. I guess it does it right. At least in my experience it doesn't do it wrong. If I would fear about some problems with DFSee I would ask in the DFSee group. But I definitely don't complain about a problem I've never seen in any of my systems.

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #8 on: February 03, 2022, 09:45:19 am »
It looks I missed something under dfsee...
default setting aren't good for ssd.
I redo all partition on my SSD using dfsee and found that adding an offset of 1 (default = nothing) to the first partition starting from beginning made the trick left  CHS to xxxxx-255-s63   (required for airboot - see below)
(all partition are now aligned)
.
I tried to update my airbot and I do not why, but it wrote into my Win7 ssd disk (only for win7 and M.2 pligged on the mother board)
Now, My windows is no more able to start Airboot corrupt message.
Trying to repear it or remove is unsuccessful due to not a 63 sectors !  (I hoppe not having lost my windows, I have no backup due I only did operation on the ArcaOS disk until airboot decided to prevent me booting windows.... Have now to find how to correct MBR without partition lose  :(
First check if I'm able to get a diskimg ...

   
 

Recovered :D

Bad CHS (not S32) was set into LVM information on the disk ! I suppose it was dfsee which wrote into my windows MBR
and Airboot was in it too but corrupted and no reparable nor removable...

Action: Removed LVM information from my windows disk.
Airbot always corruped
Starting a repair of the airboot again and this time the repair was successful.
New test and windows boot again from airboot.
This made me check something else...
Back to my ArcaOS, run airboot install. It told me not installed ! (I installed it and reboot but I don't know on which disk it installed airboot)
After reboot, I check my disk mbr/lvm and I could not find the installed airboot ! Question where did it install (it looks it installed it again on my windows disk (this looks to be an error somewhere in the code because it should install on the disk (with s32) under which I run the airboot installation.

Now, I have my explanation why I no more have the [Airboot] option for reboot under xwcenter shutdown.
I think having lost about 3 year of SSD utlisation following all staff I did but now, I learned a lot and know ow to correctly use an SDD.
You too If you followed this post (in fact, very easy and this should be noted somewhere for easy reuse)

Regards
Rémy

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #9 on: February 03, 2022, 09:48:56 am »
Andreas,

I use DFsee (or dfsanos2 via minilvm) to create partitions. All my SSDs (including Samsung 860 EVO, 500 GB) work.

OK, but how do you know that your partition boundaries are actually aligned?

Remy's point is that unless you have that 4K alignment, it is known that the performance of your SSD is degraded given multiple memory page reads that occur otherwise (I believe, but easy to find detailed on-line explanation out there).

I do have various SSDs. Samsung Evo 840, 850, 860, Crucial, noname, even one with IDE interface, different WD drives, SanDisk.... Usually when not in a preinstalled Win system they are all partitioned with DFSee. A few with the DFSee engine included in ArcaOS installer. They all work. They all work very fast. They all work reliable as far as I can say using some of them about 10 years now. Of course some are newer so no clue if they all will work in 20 years too.

I measure transfer speed, reading/writing of small and large files and usually compare it to the at that time state of the art other OS. And I'm quite happy with the performance.

But I don't care how DFSee aligns partitions. I guess it does it right. At least in my experience it doesn't do it wrong. If I would fear about some problems with DFSee I would ask in the DFSee group. But I definitely don't complain about a problem I've never seen in any of my systems.

Check starting offset of your partition. If the value is a multiple of 4096 then, you are ok. (aligned)
As I can see it now on my system, dfsee put my first partition by adding 1 in the ofset field (1MiB) at 15MiB from beginning (and aligned) (note: I could get back nearly 15MiB after delete/create from end ans aligned was preserved) 
As written if not aligned, you have more write operations which isn't good for SSD (it will slowdown faster despite it could take some time and is write operation dépendant - downloads, maintenance etc...) and of course it has some impact on performance (not a lot because SSD is very fast and a litle drop into speed is very difficult to see in normal use but ujnder benchmark, you should see some. To check it, you should compare an SSD with an aligned partition and one with unaligned.
« Last Edit: February 03, 2022, 11:32:25 am by Remy »

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #10 on: February 03, 2022, 01:07:29 pm »
Andreas,

I use DFsee (or dfsanos2 via minilvm) to create partitions. All my SSDs (including Samsung 860 EVO, 500 GB) work.

OK, but how do you know that your partition boundaries are actually aligned?

Remy's point is that unless you have that 4K alignment, it is known that the performance of your SSD is degraded given multiple memory page reads that occur otherwise (I believe, but easy to find detailed on-line explanation out there).

I do have various SSDs. Samsung Evo 840, 850, 860, Crucial, noname, even one with IDE interface, different WD drives, SanDisk.... Usually when not in a preinstalled Win system they are all partitioned with DFSee. A few with the DFSee engine included in ArcaOS installer. They all work. They all work very fast. They all work reliable as far as I can say using some of them about 10 years now. Of course some are newer so no clue if they all will work in 20 years too.

I measure transfer speed, reading/writing of small and large files and usually compare it to the at that time state of the art other OS. And I'm quite happy with the performance.

But I don't care how DFSee aligns partitions. I guess it does it right. At least in my experience it doesn't do it wrong. If I would fear about some problems with DFSee I would ask in the DFSee group. But I definitely don't complain about a problem I've never seen in any of my systems.

I already have a 64GB and a 128GB SSD out of order (end of life)

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: SSD partition miss aligned.
« Reply #11 on: February 03, 2022, 01:55:22 pm »
Quote
I already have a 64GB and a 128GB SSD out of order (end of life)
You mean not working anymore? Which manufacturer/type?

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #12 on: February 03, 2022, 10:13:34 pm »
OCZ and G.SKILL

Now using Kingston, it works well when used as external USB disk too (low power requirement to write and start, oter SSD use more and then less but when using on USB2, power on power use is more important because it can prevent the ready state)
(lates samsung EVO or Pro are nice but QVO has shorter lifetime) 

Remy

  • Hero Member
  • *****
  • Posts: 645
  • Karma: +9/-1
    • View Profile
Re: SSD partition miss aligned.
« Reply #13 on: February 04, 2022, 05:16:23 pm »
OCZ and G.SKILL

Now using Kingston, it works well when used as external USB disk too (low power requirement to write and start, oter SSD use more and then less but when using on USB2, power on power use is more important because it can prevent the ready state)
(lates samsung EVO or Pro are nice but QVO has shorter lifetime)

having go all SSD issue du a major error having used DFSEE to do a disk clone from HHD to SDD.
Use it only between same media type and be carreful about the disk unique id which is copied too ! (this prevents use of both disk under a same system e.g. windows)

Under desktop system:
Finally, the best option to go from a HDD to SSD is to start from new SSD, create new partion on it and set those elligible to boot from. Then, format them from a bootable system (ArcaOS, eCS) and xcopy (with required parameters) from HDD to SSD with verify. Then sysinstx.com D: (D: current new partition letter supposed to be the futur new boot C: partition) to be sure it is ok (may be a chkdsk D: /f if jfs to verify a last time that the parttion is clean but of course, it should be).

Resume: give a unused partition letter to the new one, boot on the old partition with the new disk online.
Once done all operations to make the new partition a clone from your original one, change the drive letter of the new one to the correct bootable drive letter (I used Dfsee lvm update for this) and remove the older disk before boot into new one.
« Last Edit: February 04, 2022, 05:22:38 pm by Remy »

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: SSD partition miss aligned.
« Reply #14 on: February 04, 2022, 07:40:49 pm »
BTW: IIRC, you need sysinstx only when the filesystem has changed. (Not really sure, if this is correct.)