LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2017, 08:59 AM   #16
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29

Quote:
Originally Posted by beachboy2 View Post

I can now appreciate that producing an exact copy of a SSD disk by cloning is not possible.
I disagree

I do an exact clone of my notebook SSD regularly.

--

REquirement: UASP USB 3.0 case + sysrescue-cd

I recreate my gentoo linux partition layout, file systems and such with the help of the gentoo handbook on the external drive.

When everthing is mounted. i copy /boot by hand, than i copy / by hand. Both are on separate paritions.

pay attention to not mix up source with destination.

Quote:
cp -avr source destination
--

The internal notebook ssd is put on the shelf
the external ssd in the usb 3.0 uasp case is put in my notebook. than i have to activate the grub bootlaoder, because uefi is demands to recreate the bootloader. than i can reboot and use it as is. pure copy. no difference, except the drive is now another drive.

--

I recreate the file systems on my backup drive every time. So fragmentation is reduced. as everything is copied over again.

there are no "framentation tools" available afaik for linux. highly experimental.

--

I use 3 drives

a => b => c => a => B => and so on

3 different brands and models. (has a reason!)

Quote:
I have two identical Intel SSDs (545s), one of which (disk1) is in a laptop with Solus 3 MATE installed (disk2 is currently still in its sealed Intel packet and unformatted).
do not use the same brand and model.

also pay attention some stuff is just rebranded, relabeled stuff

e.g. firmware issue => data dead
e.g. one drive dies, second drive dies quite soon again because it is the same model.

use well known brands, not chinese SSDs which manufacturers no one knows. I would not recommend SANDISK and SAMSUNG, as both had Firmware issues!

I ended up with 3 drives. Assume you mix up source with destination, than you have the third drive available with data. Using lvm2 should reduce the risk of the mixup with source and destination.

Last edited by _roman_; 12-19-2017 at 09:04 AM.
 
Old 12-19-2017, 09:39 AM   #17
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 19.2 MATE, MX-19, Manjaro
Posts: 2,613

Original Poster
Blog Entries: 14

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
_roman_,

Thanks for your suggestions.
 
Old 12-19-2017, 11:13 AM   #18
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,320

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
Quote:
Originally Posted by syg00 View Post
I've never seen the sense in insisting on an "exact" copy, but is it even possible with SSD ?.
Quote:
Originally Posted by syg00 View Post
Yeah, I'm sure that the copying works - I do it regularly myself, but not by cloning.
I was referring to the lower, hardware layers - with wear levelling and trim, could you ever say with certainty that you'd copied the "start" of the "disk" to the "start" of the target with SSD's.
[SOAPBOX]
If you're going to be that pedantic about having an "exact" copy, then you can never have an exact copy of anything. When going to a disk that is not the same model as the original, it is likely that the way the data is represented on the disk surface is not the same. Even when going to another drive of the same model, on modern disks the recording is an analog waveform, and the read electronics make some sophisticated decisions about what sequence of bits most likely caused that waveform. Those two analog waveforms will never be exactly alike, and could take different paths through the decision tree on their way to coming up with the same bit sequence. For most people, getting the same result is enough to say it's an exact copy. It's similar, though on a different level, with an SSD. You can create an image that reads back bit-for-bit identical with the original, though the internal representation is hidden.

"Exact" (i.e., bit-for-bit image) copies are important for forensics and recovery of damaged filesystems. Also, if you make a copy that is not a clone of the original, all of the inodes in that copy will have a brand new ctime stamp. If you install that "copy" in place of the original, your next incremental backup will see that all the inodes have changed and will have to do extra work to determine what really needs to be backed up. (If your backup utility ignores ctime, then it could be missing some changes. For example, there's this evil beast called "prelink" that changes the content of files without any change to the size or mtime. Your rsync-based backup will totally miss those changes.)
[/SOAPBOX]
 
Old 12-19-2017, 11:38 AM   #19
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
Quote:
Originally Posted by rknichols View Post
[SOAPBOX]
"Exact" (i.e., bit-for-bit image) copies are important for forensics and recovery of damaged filesystems. Also, if you make a copy that is not a clone of the original, all of the inodes in that copy will have a brand new ctime stamp. If you install that "copy" in place of the original, your next incremental backup will see that all the inodes have changed and will have to do extra work to determine what really needs to be backed up. (If your backup utility ignores ctime, then it could be missing some changes. For example, there's this evil beast called "prelink" that changes the content of files without any change to the size or mtime. Your rsync-based backup will totally miss those changes.)
[/SOAPBOX]
Last time i used rsync it did bother with those all fancy backup rsync based stuff gentoo provided.

there is nothing simpler as recreating the partiton table by hand and use cp.

Are you aware of -a flag of cp command?

Quote:
-a, --archive
same as -dR --preserve=all

--

Maybe I missed it here.

I do my procedure for quite a long time. Usually every 3 weeks or when I consider the data on my backups to be too old.

I have a verification of my backup. as my backup drive is put to use and the source drive is put on my shelf.

The backup is working as I use the backup drive and move the source to the shelf.

The data fragmentation is reduced. File system errors are reduced as I recreate the file system. This was an improvement over the previous backup strategy.

Bitwise copy, dd, dd-rescue, are not advised as you copy over all the errors on the drive. A bitwise copy is never suggested by any guide. This also includes fragmentation, file errors, bit swaps on the drive, other madness of the file systems or drive.

-- Backup in my own words is a full working backup, where I just put the drive in my notebook. Because of microsoft UEFI madness I have to redo the bootloader with grub-install .... This is a flaw in ASUS UEFI and microsoft. Not a flaw in my backup straegy. This was not needed wiht old bios notebooks.

I do not care for incremental backups and such. These all require a working linux. I only have one computer + one which i do not use because it does not belong to myself. So I need something to continue when the drive dies.

Also have you ever considered how long it takes install a fresh operating system. Than move back all the data from external storage? In comparision i just mount the drive and reapply the bootloader with grub-install. This is the fastest approach I know of when you need your computer and the drive is just dead.

--

When you deal with dd-rescue, testdisk, you are screwed anyway

--

Quote:
When going to a disk that is not the same model as the original, it is likely that the way the data is represented on the disk surface is not the same
Sorry i disagree. The user only sees what the drive reports. You do not have access to the physical layer. and what the user sees is the same.

again, I would not work on that level, as you miss out the checksums of lvm2, luks, your file system of choice. Every layer adds additional data which corrects drive errors. I doubt any of those layers works without a checksum without looking into details. Even the drive has a checksum. the reason why they made 4k sectors is to more efficency store the data and have bigger checksum blocks. bigger blocks improve the recovery rate

also with my strategy you will see cp errors every few weeks. somewhere you will see it.

i also sell any drive which is usually 2 years old. 2 years is the warranty period (or whatever you call it, that's term in law speech) in my area, the additional time which I may get from the manufacturer do not count in my point of view.

Last edited by _roman_; 12-19-2017 at 11:47 AM.
 
Old 12-19-2017, 01:46 PM   #20
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,320

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
Quote:
Originally Posted by _roman_ View Post
Quote:
Originally Posted by rknichols View Post
When going to a disk that is not the same model as the original, it is likely that the way the data is represented on the disk surface is not the same.
Sorry i disagree. The user only sees what the drive reports. You do not have access to the physical layer. and what the user sees is the same.
I know it's an exact copy as far as anyone can see. I was just disagreeing with @syg00's position that a copy on an SSD could not be considered "exact" because of the decisions the SSD controller makes about where the data is stored physically.
Quote:
Originally Posted by syg00 View Post
... could you ever say with certainty that you'd copied the "start" of the "disk" to the "start" of the target with SSD's.
You can copy LBA 0 to LBA 0. Where and how that is stored (and whether it gets remapped to a different physical location next week) is irrelevant.
 
Old 12-19-2017, 02:00 PM   #21
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 19.2 MATE, MX-19, Manjaro
Posts: 2,613

Original Poster
Blog Entries: 14

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
I have had success using Redo Backup by creating a system image of disk1 and transferring this to disk2 via a USB external hard drive.
The laptop booted up successfully using disk2.

Redo Backup, the front end of Partclone, works on both Linux and Windows:
http://redobackup.org/

Features:
http://redobackup.org/features.php

Thanks to all who responded.
I will mark this thread as solved.
 
Old 12-19-2017, 03:39 PM   #22
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,346

Rep: Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977
I think we got lost in the "EXACT" part there a bit.

Yes, I have also used Redo backup and it worked great.

Thanks for the update and solution.
 
  


Reply

Tags
clonezilla, cloning, disk, fstab


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] yum repo issue with iso disk1 and disk2 oly_r Linux - Software 2 03-01-2013 08:56 AM
Moving LVM from disk2 t o disk1 DragonFly2 Linux - Server 14 04-11-2011 03:43 PM
Cloning a partition using DD. Some advice / suggestions needed. uncle-c Linux - Newbie 1 10-28-2007 01:14 PM
Dual Boot (Disk1-Linux, Disk2-Windows) Slipstream2006 Linux - General 5 07-28-2007 11:32 PM
How to unmount disk2? Jwirt Linux - Hardware 2 02-07-2005 02:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration