Hot plug /dev/sda in order to accept file transfers

10 Antworten [Letzter Beitrag]
amenex
Offline
Beigetreten: 01/03/2015

Faced with the so-far-insurmountable task of transferring ca. 650GB of files between a pair
of Trisquel_9 Lenovo T420 laptops, I'm inquiring about the feasibility of combining the
client and server into the same T420.

That would be necessary because the client's 650GB of files are in a DVDslot/SATA caddy, and
the server's similar DVDslot/SATA caddy has ca. 900GB of free space.
Each caddy's OS is Trisquel_9. They are presently on different T420's.

Here's the stumbling block: each GRUB have both source & sink located at /dev/sdb1.
I've established that I can hot plug the caddy's, run update-grub, and commence running the
Trisquel_9 operating system after a reboot so long as the updated GRUB was on the parent
computer.

Physically, the HDD has to be extracted from the DVDslot/SATA caddy and then installed in
the T420's main HDD caddy. The parent computer has to de started with /dev/sda slot empty
and booted into the OS residing in the still-in-place DVDslot/SATA caddy.

Hot-plugging the extracted SATA drive into the empty main drive slot ought not create any
conflict because the operating system will detect its HDD and put it into the unoccupied
/dev/sd? location. Subsequently running update-grub from within the operating system in the
DVDslot/SATA caddy should place the operating systems and partitions in an orderly way.

Have I got these steps right ? I'm planning this so I do not have to edit any GRUB.

nadebula.1984
Offline
Beigetreten: 05/01/2018

If your / and /home are on different hard disks, it's strongly not recommended to swap the disks, because it's very likely to result in configuration file conflicts.

The easiest way to transfer large quantity of files quickly and securely is to use SSH (either scp or SFTP). On Debian, the only thing you need to do is to set the IP addresses.

However, if you still have difficulties in using SSH (as you've been complaining about), I could show you a stupidest but sure-fire way. Your T420 should have a 34-mm express card slot. Buy two 34-mm express card USB 3.0 adapter cards and two USB 3.0 hard disk enclosures.

amenex
Offline
Beigetreten: 01/03/2015

nadebula.1984 suggested that I try a 34mm express-card-to-USB adapter card, so I'm trying.

My first attempt involved a popular auction site and a vendor in China. Shipping was free
and very slow; two cards arrived in a squashed flimsy cardboard box; return shipping would
have cost more than the purchase price; so the unusable condition led to reimbursement of
most of the purchase price. The second attempt involved an immensely profitable retailer;
two more cards, each shipped for free from a different USA location, quickly arrived via
unstiffened envelope under the care of USPS for one and UPS for the other. The included
mini-CD's were not sufficient to protect either express card from permanent bending damage.
Unusable again.

Seeing the four damaged cards makes me wonder whether staying within the cards' form factors
leaves any room for an enclosure stronger than heavy-duty aluminum foil and whether the
circuit board can be sufficiently strong to support the insertion forces of a couple of USB
thumb drives. Not only that, but USB thumb drives will not fit side-by-side in the slots.

Has anyone out there had a positive experience with these USB adapter cards ?

nadebula.1984
Offline
Beigetreten: 05/01/2018

Surely, I use many of them on notebooks without USB 3.0 ports. Ranging from Z60m to T/W520. In a word, any laptop based on 915, 945, 965, 4-series, 5-series (Nehalem), or 6-series (SandyBridge) chipset and having an ExpressCard slot (either 34 or 54 mm) could make use of them.

Using SSH/SFTP over LAN is best and USB 3.0 is second best. I have tested Trisquel 7/8/9 for you. SSH worked perfectly on either of them.

It was Intel that once refused to introduce native USB 3.0 to its chipsets until IvyBridge. Intel planned to force users to use Thunderbolt, so it could extract lots of licensing fees.

amenex
Offline
Beigetreten: 01/03/2015

Each 1.0GB HDD has its own OS and Data partitions: /dev/sdb1; /dev/sdb3, respectively, with swap at /dev/sdb2.
Therefore, the configuration files for each file system are entirely within the same physical drive.
One DVDslot/SATA caddy has "nothing" in its Data partition, the other has the 656GB in a similar partition.
The former is destined to be the client, the later will be the server.
Once GRUB is updated, the File Manager will do the rest, with the USB bus filling the role of the Ethernet
cable in Plan A.

Plan C adds another USB bus outside the body of the T420 and doesn't involve unscrewing anything from the T420.
I've been making copies of files on USB thumb drives of 256GB capacity, but that means purchasing way more
hardware than Plan C involves. I have only one SATA HDD enclosure right now.

What's behind all this frantic trial and error activity is that the 656GB of data is in the /dev/sdb3 of a
T420 that has a suspect motherboard that doesn't like pairs of RAM sticks and even freezes now and then with
just one RAM stick of the same 3.7GB capacity.

Followup: The system will not operate without a storage system in the "0" slot ... even after that hard drive
has been put back into that spot. GRUB cannot be fixed. The remedy was to reinstall Trisquel_9 on the replaced
hard drive and go to a simpler version of nadebula.1984's Plan C: I put the server hard drive in an external
SATA USB 3.0 hard drive enclosure and copied just over half of the client hard drive's 656GB of files in about
five hours at 32MB/s using the File Managers on each system, preserving the file structure and requiring little
user interaction.

amenex
Offline
Beigetreten: 01/03/2015

emacs emphasized that I should "Learn how to use SSH."

My progress: SSH installed on each machine; wired IPv4 addresses are different from wireless addresses.
In spite of having appropriately configured IPv4 addresses at each end and having wired connections
that remained "up" reliably, neither address could be reached despite everyone's efforts. With my
printer on the wireless LAN, printing is trivial by comparison because CUPS negotiates the connection.

nadebula.1984
Offline
Beigetreten: 05/01/2018

Attach both source and destination disks between which you wish to transfer data to the same computer. You can use either a third hard disk (i.e. mSATA) or a Live USB as the operation environment.

amenex
Offline
Beigetreten: 01/03/2015

nadebula.1984 makes too much complexity of the process, though I haven't been that ambitious.
I've just downloaded one dataset to the USB 3.0 SATA 1.0TB disk using two cc's of file manager,
and from there back up to another /dev/sdb3 in the target T420. Takes about five hours at 33 MB/sec.
I'm actually 3/4 of the way through making three copies so I can continue to use the USB 3.0
setup to keep an up-to-date backup. It took five years to collect that data; in that context,
five hours is lightning quick.

Magic Banana

I am a member!

I am a translator!

Offline
Beigetreten: 07/24/2010

If you are referring to plain text, compress it with GNU Zip (algorithms providing a better compression ratio would demand too much CPU) and you will have far less (maybe ~5 times less) to store/transfer.

nadebula.1984
Offline
Beigetreten: 05/01/2018

zstd is much more efficient. When I used zstd --fast=1 parameter, I could still have ~100 MByte/s of processing speed (approximately the upper limit of a USB 3.0 hard disk or gigabit ethernet). The average size reduction was approximately 5%~7% for my /home directory (which still saved me dozens of GB). There were both compressible and non-compressible files.

nadebula.1984
Offline
Beigetreten: 05/01/2018

Congratulations. Though such job could have been done in a much more efficient way.