I want to move my openSUSE 13.1 from HDD to SSD - will this guide work?

Hi guys,
I want to move my existing openSUSE 13.1 x64 installation from 160GB HDD to my new Intel 120GB SSD! I don’t want to reinstall it though.

I found a tutorial and before I dive into it, I just want to know if this will work with openSUSE, is there anything diffferent in grub2, or /dev, /proc/ file systems. It seems to be a generic Linux guide.

http://blog.oaktreepeak.com/2012/03/move_your_linux_installation_t.html

I’m not sure why the author of the writeup is suggesting such a complicated procedure. They mention to backup with clonezilla, which is always a good idea, but why not just use clonezilla to clone the drive? I use clonezilla all the time and it should work.

The problem will be that your destination drive (120GB) is smaller than your source drive (160GB). I don’t think you will be able to do a device to device clone, even if your 160GB hard drive has less than 120GB of data on it. You could give it a try. I have seen some writeup on that topic, so you may want to read about it.

I would do as suggested and backup your 160GB drive with a clonezilla image. Then use a gparted CD to change the partition size to less than 100GB and make a second clonezilla image of the smaller partition. If you have too much data on the 160GB drive to shrink to 100GB, you will have to store some of it somewhere. Once you have a partition that is small enough, you can use clonezilla to write the image to your ssd. There are some steps to that, so post back if you have questions about the procedure.

On the other hand, you can get a really good 256GB SSD for about $100.
Crucial MX100 CT256MX100SSD1 2.5" 256GB SATA III MLC Internal SSD ($108)

It would be much easier to clone your drive if the destination drive is bigger than the source. Then you can do it in one step. If you can exchange your drive, the 256GB drive will have better performance anyway and doesn’t cost that much more.

LMHmedchem

The best tutorial I found was this https://www.sebastian-siebert.de/2013/09/22/opensuse-umzug-von-der-festplatte-zur-ssd/ . For me was it very helpfull.
If you don’t understand german you can just use commands. But you have to schink your partitions.

I’ll try and:

  • Shrink my current partitions to 100GB
  • Clone the shrinked partitions to SSD

What about the swap partition?
Right now i have / ~ 20GB
/home ~100GB and
swap

Should I do a clone of the entire HDD and then write the “entire” hdd image to the SSD?

I’ll get clonezilla right now and check it out.

I’ll use Google Translate.

Thanks!

I think this 20GB should be for “Host protected area (HPA)”. You wont your SSD perfect working, then need you HPA. Swap can take place on 160GB disk. I’ve taken fsarchiver instead of clinzilla, but this is a matter of taste.

One thing that I experienced with creating SUSE is to pre-allocate the swap drive. I have 5 drives and SUSE searched all disks and put multiple swap drives into the fstab.

Have you considered using rsync to do the cloning? I ask that because I never used clonzilla.

Set aside 1.2x RAMgig for swap. It should be sufficient. In the old days, when 512meg was a large amount of ram. we set aside 2x ram size for swap. (Alternatively look at your current swap size and create one of the same size on the SSD.

Sorry, I dont understand, you habe multiple swap partitions? When so, then why? There were many discussions should have anybody at all swap partition or not. If you have 8GB RAM would this swap by your formula too large. I have 2GB swap by 8GB RAM.

Ok so here’s what I did:

  • I used tuxboot to create a live_gparted USB drive

  • With gParted Live I shrunk one of my partition so that the total of the three partitions I had on my old hdd (SDA) was ~ 100GB. I shrunk sda3 wich had /home as mount point and the unallocated space remained at the end of the drive.

  • I booted the hdd with the new smaller /home partition just to make sure and it went just fine

  • With tuxboot I then created a live Clonezilla USB drive

  • With clonezilla I chose device-device mode, then expert mode and > local device to local device cloning but I made sure to uncheck “Check size of destination drive” and “Re-install GRUB…something” in the expert options just before I started the cloning process.

After everything was done, I pulled the old hdd out from the PC and left the SSD in place and…voila, I’m writing this now using my blazing fast SSD.

What I need to do now is boot gParted live again and resize /home as I have about 11GB of free unallocated space on my SSD.

My question is:

  • What steps do I have to do now in order to fully set up my SSD? Trim? Swap? special kernel settings?

2 Gig with 8gig is ok if a desktop you don’t plan to hibernate. If you are going to hibernate use swap = RAM as best practice.

2 Gig with 8gig is ok if a desktop you don’t plan to hibernate. If you are going to hibernate use swap = RAM as best practice.

you can have multiple swap partitions but they must be set in fstab

You have to optimize you SSD http://jensd.be/?p=1 and then optimize firefox and other browsers http://bernaerts.dyndns.org/linux/74-ubuntu/212-ubuntu-firefox-tweaks-ssd

Ok,
I did 1, 2 and 3, the 4th point regarding the scheduler, I don’t have a scheduler in

cat /sys/block/sda/queue/scheduler

mine is just “none”.

Should I let the current partition table as it is now, with some unallocated space at he end of the drive? I read somewhere that it is recommended.

I’m attaching a screenshot of my partition table

It is recommended:
"*Activation of Host Protected Area (HPA)

Short first: What is HPA or over-provisioning?
This is an invisible data area (spare area) for the operating system. It is used to read and write operations to optimize (Read-Modify-Write), replacement of defective blocks (bad blocks Replacement), optimal utilization of the memory cells (wear leveling).

When Samsung SSD Pro Series HPA feature is disabled at the factory. They can be activated without any problems and is strongly recommended. Subsequent activation of HPA is connected to data loss. Therefore, one should deal with this issue soon enough. In a brand new SSD, it is a good time to activate the HPA feature and to think about the size of the spare area.

How big can for the spare area be?
There are, depending on use different values ​​based solely on recommendations. We are talking about the range of 7% (recommendation from Samsung) to 27% (recommended by Intel) of the reserved data area. For my purposes, I modified the recommendation of Samsung (7%) and another 3% down on it. I believe that 10% Spare Area more than enough. 10% of 512 GB is equal to 51.2 GB. So I end up 460.8 GB usable data area.

Now we have to find out on which device path, the SSD is associated with:

hwinfo --disk | grep -E ‘Model | Device File’

The output from my system:

Model: “Samsung SSD 840”
Device file / dev / sda
Model: “SAMSUNG HD753LJ”
Device file / dev / sdb

Here we see that the device path is below the model name “Samsung SSD 840” / dev / sda. If your device path of the SSD is different, please contact the following commands to customize your circumstances.

Now we let the number of sectors of the SSD issue:

hdparm -N / dev / sda | sed -e ‘! / sectors / d’ -e ‘s @ * / \ * @ \ 1 @. (. * ).’

Issue:

1000215216

10% of the above-mentioned Number: 100,021,521.6. Then we rounded to an integer on: 100021522nd And now we take the sum of the calculated reserved data area from and as a result we have the sum of sectors for the useful data area:
1000215216 to 100021522 = 900193694

Now we ask for the SSD, whether HPA is initially disabled or has already been activated:

hdparm -N / dev / sda

The output is:

/ Dev / sda:
max sectors = 1000215216/1000215216, HPA is disabled

In the above-mentioned hdparm output, it means that the HPA feature is disabled. Indicated by “HPA is disabled”. Should there be already activated, then the decision is up to you whether you will take the value or the value modifies below.

Now we activate via hdparm the HPA feature set and the sum of the sectors for the useful data area:

hdparm -Np900193694 --yes-i-know-what-i-am-doing / dev / sda

On the next call of “hdparm -N / dev / sda” we now see the following output, which also includes the HPA feature is enabled:

/ Dev / sda:
max sectors = 900193694/1000215216, HPA is enabled

If HPA is still disabled in your issue, then it is recommended that at this point the computer to restart once and then run the query again.*

"

I don’t have a scheduler

You can do it so:
Modify /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=" resume=/dev/disk/by-id/(your SSD) splash=silent quiet showopts elevator=deadline"

(This is for Grub2)

/dev/sda:
 max sectors   = 234441648/234441648, HPA is disabled

I’m not sure if I understood correctly, will I lose data if I enable HPA right now, or it was meant in the long term?

You dont lose any data, if you enable HPA. On the contrary, you SSD would work better. You can live without HPA too, but it is not so good for healthy your SSD. It is never too late to enable HPA.

I upgraded my new machine with a bigger SSD and installed the replaced SSD into my old machine. Only very few measures were deemed necessary. A security erase was performed for resetting performance to factory values. New partitioning of the upgraded old machine is:

hofkirchen:~ # df -h|grep ^/dev|sort
/dev/sda1        32G  4.9G   26G  16% /opensuse-13.2btrfs
/dev/sda3        50G  8.4G   39G  18% /openSUSE-13.1
/dev/sda5        20G  4.9G   14G  27% /openSUSE-11.4
/dev/sda6       815G  352G  422G  46% /home-HDD
/dev/sdb1        52G   16G   35G  32% /

The SSD has a single partition using only 93% of the space available (HPA is disabled). Mount options are:

hofkirchen:~ # mount -t ext4
/dev/sdb1 on / type ext4 (rw,noatime,discard,data=ordered)

Swap is available on HDD, but currently turned off. The HDD is normally turned off (standby). Disk writes are not an issue: The Kingston V300S3 60GB has a maximum specified TBW of 32 TB. One year’s usage as a system partition in the new machine resulted in 5000 operating hours with 1915 GB written. Due to the compression of the Sandforce controller effective writes amount to 849 GB written only:

hofkirchen:~ # smartctl -A /dev/sdb
smartctl 6.3 2014-07-26 r3976 [i686-linux-3.16.7-7-desktop] (SUSE RPM)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0033   120   120   050    Pre-fail  Always       -       0/0
  5 Retired_Block_Count     0x0033   100   100   003    Pre-fail  Always       -       1
  9 Power_On_Hours_and_Msec 0x0032   095   095   000    Old_age   Always       -       5016h+04m+36.720s
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       89
171 Program_Fail_Count      0x000a   000   000   000    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0
174 Unexpect_Power_Loss_Ct  0x0030   000   000   000    Old_age   Offline      -       9
177 Wear_Range_Delta        0x0000   000   000   000    Old_age   Offline      -       1
181 Program_Fail_Count      0x000a   000   000   000    Old_age   Always       -       0
182 Erase_Fail_Count        0x0032   000   000   000    Old_age   Always       -       0
187 Reported_Uncorrect      0x0012   100   100   000    Old_age   Always       -       0
189 Airflow_Temperature_Cel 0x0000   031   039   000    Old_age   Offline      -       31 (Min/Max 17/39)
194 Temperature_Celsius     0x0022   031   039   000    Old_age   Always       -       31 (Min/Max 17/39)
195 ECC_Uncorr_Error_Count  0x001c   120   120   000    Old_age   Offline      -       0/0
196 Reallocated_Event_Count 0x0033   100   100   003    Pre-fail  Always       -       1
201 Unc_Soft_Read_Err_Rate  0x001c   120   120   000    Old_age   Offline      -       0/0
204 Soft_ECC_Correct_Rate   0x001c   120   120   000    Old_age   Offline      -       0/0
230 Life_Curve_Status       0x0013   100   100   000    Pre-fail  Always       -       100
231 SSD_Life_Left           0x0013   100   100   010    Pre-fail  Always       -       0
233 SandForce_Internal      0x0032   000   000   000    Old_age   Always       -       849
234 SandForce_Internal      0x0032   000   000   000    Old_age   Always       -       1915
241 Lifetime_Writes_GiB     0x0032   000   000   000    Old_age   Always       -       1915
242 Lifetime_Reads_GiB      0x0032   000   000   000    Old_age   Always       -       213

Using the old machine with its HDD was some kind of PITA compared to the new one. But with everything frequently used on SSD, the difference in performance between the two is only felt on rare occasions (e.g. converting jpegs and movies). :wink:

User over-provisioning is strongly recommended: https://sites.google.com/site/easylinuxtipsproject/ssd-in-opensuse#TOC-Reserve-seven-percent-for-overprovisioning

But given the highly compressible data written to the SSD (total of 1915 GB, actually written 849 GB, see above post) do I really need to have overprovisioning? Also Kingston has some hints on over-provisioning not visible to the user: www.kingston.com/en/ssd/overprovisioning Physical capacity is 64GB vs. 60 GB user capacity. Any thoughts?