LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2019, 09:49 AM   #16
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by system001 View Post
after reading you originasl post i'm not even going to bother to read the rest of the post. from what your saying you're simply combining two drives, right? if so and you have the space for the operation on the one drive simply use gpoarted to do it.
No, not that simple, but thanks.
 
Old 09-08-2019, 10:00 AM   #17
hddfsck
Member
 
Registered: Aug 2019
Distribution: Debian; Ubuntu
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
This will create a device file named /dev/dm-Y (where Y is a number) and a symbolic link /dev/mapper/mydestination that points to /dev/dm-Y. Everything written to /dev/mapper/mydestination is encrypted, then written to /dev/sdX. When you read from /dev/mapper/mydestination, data is first read from /dev/sdX, then decrypted.

Copy the source disk to this device file.
...combined comments in previous comment.

Last edited by hddfsck; 09-08-2019 at 10:06 AM. Reason: dup
 
Old 09-08-2019, 06:21 PM   #18
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by hddfsck View Post
Thanks.
Copy the source disk to this device file.

#1) Which file? (1) /dev/dm-Y or (2) /dev/mapper/mydestination ?
Either works.

Quote:

#2) The files are going to be copied "byte-by-byte"? I have deleted files on the source disk and if in trying to get those files back the disk gets corrupted, I need to have an exact replica, byte-by-byte, that I can use to try to get those files back.
Yes, byte by byte.
Quote:
Just to be sure: you do know that I (1) already have data on the destination drive
This data will be overwritten.
Quote:
(2) the destination drive IS already encrypted with LUKS?
Yes, otherwise luksOpen would not work.

If you want to keep the data on the destination disk, copying disk A to disk B using dd is not the right way. Assuming the data of both disks resides on filesystems, you could mount both source and destination drive and copy files from the source drive. This won't copy deleted files however.

Or first save the data from the destination drive.

How large is the source disk? Perhaps it's small enough that you can copy it to a regular file on your PC or on the destination disk. Linux allows you to treat files like drives; they are called loop devices and the command to do this is losetup. You can then recover the deleted files from that regular file.

It seems that you want to recover data from a copy of the source disk, but you have no empty drive lying around. Honestly, the best solution is to buy another disk. A 2.5inch Terabyte disk costs around 40 US$.
 
  


Reply



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
Adding 2 SAS HDD (RAID -0) to existing 4 HDD (2 RAID-0), then swapping 2 pairs kaza Linux - Hardware 2 01-23-2019 03:23 PM
How to overwrite existing files by using tar command (Remove extra files) Kalibo Linux - Newbie 9 12-26-2013 12:42 AM
Adding kerberos authentication to existing network with LDAP already deployed btmiller Linux - Server 2 01-31-2013 08:39 PM
how to install pre existing wordpress directory on a existing wordpress to run a web ajbardhan Linux - Software 3 04-28-2012 07:01 PM
Adding new Linux firewall/router on network with pre-existing gateway/router grittyminder Linux - Networking 4 08-13-2008 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:34 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
Open Source Consulting | Domain Registration