Live data from Hacker News

Cloning a Laptop over NVMe TCP

copyninja.in

151–160 of 181 posts

Re: Cloning a Laptop over NVMe TCP

#151
There's nothing special about this NVMe-TCP scenario. It can be done with any storage protocol that works over TCP. Setup a target and an initiator and use dd to dump the data. iSCSI or FCoE could be used also. NVMe-TCP is just newer tech!

Re: Cloning a Laptop over NVMe TCP

#152
post #109
post #64

Earlier quoted context omitted.

Yes USB3.0 is 500 MB/s but are you sure your bus is 3.0? It would imply your machine is 10+ years old. Most likely it's 3.1 or newer which is 1000 MB/s. And again, benchmarking /dev/zero is invalid anyway as I explained (transparent compression)

No, it wouldn't imply the machine is 10+ years old. Even a state-of-the-art motherboard like the Gigabyte Z790 D AX (which became available in my country today ) has more USB 3 gen1 (5Gbps) ports than gen2 (10Gbps). The 5Gbps ports are just marketed as "USB 3.1" instead of "USB 3.0" these days, because USB naming is confusing and the important part is the "gen x".

I didn't mean 5 Gbps USB ports have disappeared, but rather: most machines in the last ~10 years (~8-9 years?) have some 10 Gbps ports. Therefore if he is plugging a fast SSD in a slow 5 Gbps port, my assumption was that he has no 10 Gbps port.

Re: Cloning a Laptop over NVMe TCP

#154
post #118
post #95

Earlier quoted context omitted.

> 200gb of files over wifi […] took at least 6 hours > I wonder what could I have done better. Used an Ethernet cable? That’s not an impressive throughput amount over local. WiFi has like a million more sources of perf bottlenecks. Btw, just using a cable on ONE of the device => router ~> device can help a lot.

Yeah, I did that. One of the devices didn't have an ethernet port though.

If it’s a MacBook you can get Ethernet - USB-C adapters for dirt cheap. Otherwise, you have to move closer to the router and/or get a new router/wifi card if it’s running old 2g stuff for instance. But again, WiFi is headache - especially since many parameters are outside your control (like nearby airports, neighbors, layout of your home, to name a few lol).

Re: Cloning a Laptop over NVMe TCP

#155

Earlier quoted context omitted.

A Linux install is often remarkably hardware agnostic. Windows would panic, certainly (because so much drivers & other state is persisted & expected), but the Linux kernel when it boots kind of figures out afresh what the world is every time. That's fine. The main thing you ought to do is generate a new systemd/dbus machine-id. But past this, I fairly frequently instantiate new systems by taking a btrfs snapshot of m…

Unless you're doing a BIG jump, like from legacy to UEFI, or SATA to NVMe, Windows will generally just figure it out. There may be an occasional exception for when you've doing something weird (iirc the 11th-13th gen Intel RST need a slipstreamed or manually added drivers unless you change controller settings in the BIOS which may bite on laptops at the moment if you're unaware of having to do it). But even for big j…

My old practice used to be to start safe mode & go delete as many devices drivers as I could. That got me pretty far.

These days though I've had a number of cases where some very humble small scoped bios change will cause windows to not boot. I've run into this quite a few times, and it's been quite an aggravation to me. I've been trying to get my desktops power consumption down & get sleep working, mostly in Linux, but its shocking to me what a roll-of-the-die it's been that I may have to do the windows-self-reinstall, from changing an AMD cool-n-quiet settings or adjusting a sleep mode option.

Re: Cloning a Laptop over NVMe TCP

#156

Earlier quoted context omitted.

Can't find corroboration for the assertion 'SSDs are an awful lot better at sequential writes than random writes'. Doesn't make sense at first glance. There's no head to move, as in an old-style hard drive. What else could make random write take longer on an SSD?

The main problem is that random writes tend to be smaller than the NAND flash erase block size, which is in the range of several MB. You can check literally any SSD benchmark that tests both random and sequential IO. They're both vastly better than a mechanical hard drive, but sequential IO is still faster than random IO.

Seems to be the case, to some degree. My SSD is 8% slower doing random writes. I guess your mileage may vary.

Re: Cloning a Laptop over NVMe TCP

#157
post #109
post #64

Earlier quoted context omitted.

Yes USB3.0 is 500 MB/s but are you sure your bus is 3.0? It would imply your machine is 10+ years old. Most likely it's 3.1 or newer which is 1000 MB/s. And again, benchmarking /dev/zero is invalid anyway as I explained (transparent compression)

No, it wouldn't imply the machine is 10+ years old. Even a state-of-the-art motherboard like the Gigabyte Z790 D AX (which became available in my country today ) has more USB 3 gen1 (5Gbps) ports than gen2 (10Gbps). The 5Gbps ports are just marketed as "USB 3.1" instead of "USB 3.0" these days, because USB naming is confusing and the important part is the "gen x".

To be clear for everyone:

USB 3.0, USB 3.1 gen 1, and USB 3.2 gen 1x1 are all names for the same thing, the 5Gbps speed.

USB 3.1 gen 2 and USB 3.2 gen 2x1 are both names for the same thing, the 10Gbps speed.

USB 3.2 gen 2x2 is the 20Gbps speed.

The 3.0 / 3.1 / 3.2 are the version number of the USB specification. The 3.0 version only defined the 5Gbps speed. The 3.1 version added a 10Gbps speed, called it gen 2, and renamed the previous 5Gbps speed to gen 1. The 3.2 version added a new 20Gbps speed, called it gen 2x2, and renamed the previous 5Gbps speed to gen 1x1 and the previous 10Gbps speed to gen 2x1.

There's also a 3.2 gen 1x2 10Gbps speed but I've never seen it used. The 3.2 gen 1x1 is so ubiqitous that it's also referred to as just "3.2 gen 1".

And none of this is to be confused with type A vs type C ports. 3.2 gen 1x1 and 3.2 gen 2x1 can be carried by type A ports, but not 3.2 gen 2x2. 3.2 gen 1x1 and 3.2 gen 2x1 and 3.2 gen 2x2 can all be carried by type C ports.

Lastly, because 3.0 and 3.1 spec versions only introduced one new speed each and because 3.2 gen 2x2 is type C-only, it's possible that a port labeled "3.1" is 3.2 gen 1x1, a type A port labeled "3.2" is 3.2 gen2x1, and a type C port labeled "3.2" is 3.2 gen 2x2. But you will have to check the manual / actual negotiation at runtime to be sure.

Re: Cloning a Laptop over NVMe TCP

#158

Earlier quoted context omitted.

A Linux install is often remarkably hardware agnostic. Windows would panic, certainly (because so much drivers & other state is persisted & expected), but the Linux kernel when it boots kind of figures out afresh what the world is every time. That's fine. The main thing you ought to do is generate a new systemd/dbus machine-id. But past this, I fairly frequently instantiate new systems by taking a btrfs snapshot of m…

Unless you're doing a BIG jump, like from legacy to UEFI, or SATA to NVMe, Windows will generally just figure it out. There may be an occasional exception for when you've doing something weird (iirc the 11th-13th gen Intel RST need a slipstreamed or manually added drivers unless you change controller settings in the BIOS which may bite on laptops at the moment if you're unaware of having to do it). But even for big j…

You can "make" windows do a lot of things. As a consumer oriented product you shouldn't have to.

Re: Cloning a Laptop over NVMe TCP

#159
post #149
post #97

Earlier quoted context omitted.

I wonder how using tee to compute the hash in parallel would affect the overall performance.

On GigE or even 2.5G it shouldn't slow things down, as "sha1sum" on my 4-year-old CPU can process at ~400 MB/s (~3.2 Gbit/s). But I don't bother to use tee to compute the hash in parallel because after the disk image has been written to the destination machine, I like to re-read from the destination disk to verify the data was written with integrity. So after the copy I will run sha1sum /dev/XXX on the destination ma…

It's over 10 years ago that I had to do such operations regularly with rather unreliable networks to Southeast Asia and/or SD cards, so calculating the checksum every time on the fly was important.

Instead of the "fancy" syntax I used

   mkfifo /tmp/cksum
   sha1sum /tmp/cksum &
   some_reader | tee /tmp/cksum | some_writer
Of course under the conditions mentioned throughputs were moderate compared to what was discussed above. So I don't know how it would perform with a more performant source and target. But the important thing is that you need to pass the data through the slow endpoint only once.

Disclaimer: From memory and untested now. Not.at the keyboard.

Re: Cloning a Laptop over NVMe TCP

#160

Earlier quoted context omitted.

Unless you're doing a BIG jump, like from legacy to UEFI, or SATA to NVMe, Windows will generally just figure it out. There may be an occasional exception for when you've doing something weird (iirc the 11th-13th gen Intel RST need a slipstreamed or manually added drivers unless you change controller settings in the BIOS which may bite on laptops at the moment if you're unaware of having to do it). But even for big j…

You can "make" windows do a lot of things. As a consumer oriented product you shouldn't have to.

You don't if you move from one relatively modern machine to another. My current laptop SATA SSD has moved between... 4 different machines, I think? I'll have to "make" when I move to an NVMe SSD, maybe, but it might largely just work. Time may tell.

If you do things the Microsoft way, you just sign into your MS account and your files show up via OneDrive, your apps and games come from the Microsoft store anyway.

There's plenty to fault Microsoft for. Like making it progressively more difficult to just use local accounts.

I don't think "cloning a machine from hardware a decade old onto a brand new laptop may require expertise" is one of them.

Post reply on HN