View previous topic :: View next topic |
Author |
Message |
__name__ n00b
Joined: 06 Feb 2024 Posts: 46 Location: where the wind blows
|
Posted: Fri Oct 18, 2024 12:20 am Post subject: [SOLVED] New NVMe drive but only one NVMe slot in mobo |
|
|
I'm trying to migrate my Gentoo installation from my current NVMe drive to a new NVMe drive, but I'm running into a roadblock. My laptop only has a single NVMe port on the motherboard, so I have to use a USB enclosure for the new drive. Unfortunately, the USB enclosure's write speeds are quite slow.
Does anyone have any recommendations for how I can efficiently migrate my installation to the new drive? I've considered using a live CD to clone the disk, but I'm unsure if that would be the best approach. Any advice would be greatly appreciated.
Last edited by __name__ on Thu Oct 24, 2024 6:52 am; edited 1 time in total |
|
Back to top |
|
|
mirekm Apprentice
Joined: 12 Feb 2004 Posts: 216 Location: Gliwice
|
Posted: Fri Oct 18, 2024 5:08 am Post subject: |
|
|
Use USB NVME drive case.
Later you can use this case with old NVME disk as backup device. |
|
Back to top |
|
|
__name__ n00b
Joined: 06 Feb 2024 Posts: 46 Location: where the wind blows
|
Posted: Fri Oct 18, 2024 6:22 am Post subject: |
|
|
mirekm wrote: | Use USB NVME drive case.
Later you can use this case with old NVME disk as backup device. |
Thank you for the suggestion. I plan to use the USB NVMe drive enclosure after the migration. However, what is the most efficient way to clone my existing Gentoo installation to the new drive using the USB enclosure?
Should I do a fresh install on the new drive and then manually copy over my configuration and data, or should I attempt to clone the existing installation to the new drive after setting up the partitions?
Are there any specific tools or techniques you recommend for a smooth migration process? |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 655
|
Posted: Fri Oct 18, 2024 11:07 am Post subject: |
|
|
There are "cloning" USB enclosures that will effectively 'dd' one drive to another.
Other than that, using a Gentoo live CD/USB is the safe way, you "follow the handbook" for the new drive, then when it comes to dropping a stage3 on it you copy the files over from the old drive. If the bandwidth to the new drive is the bottleneck issue, then using rsync to do the copying, or creating a compressed tar archive* ahead of the copy might serve you better.
*assuming you have the space, this could be the start of your "backup regime" too. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3442
|
Posted: Fri Oct 18, 2024 11:23 am Post subject: |
|
|
Quote: | Are there any specific tools or techniques you recommend for a smooth migration process? |
Advanced version: make it similar to a new installation, but with your own files and skipping redundant steps.
Partition the new disk (or clone partition table), format partitions, copy your files over, possibly fix UUIDs in fstab and bootloader, and you're done.
Simple version: just dd it and - in case of GPT - repair partition table.
Yes, it is suboptimal, yes, empty space, blah blah blah.... It's easy and will be faster than thinking about doing it the "right" way, and your brand new SSD can take that 1 extra write.
And if you have a system on a single partition or LVM, you can expand into new space after you're done. If you want to expand a partition other than the last one, you'll need to do the "advanced" version though. _________________ Make Computing Fun Again |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 655
|
Posted: Fri Oct 18, 2024 4:38 pm Post subject: |
|
|
szatox wrote: | Yes, it is suboptimal, yes, empty space, blah blah blah.... |
You can work round the empty space issue if you have a "shrinkable" filesystem, yeah you have to "delete the partition" but it's nowhere near as scary as it sounds. |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 631 Location: Fife, Scotland
|
Posted: Fri Oct 18, 2024 5:42 pm Post subject: |
|
|
Clonezilla just works |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1252 Location: Richmond Hill, Canada
|
Posted: Fri Oct 18, 2024 5:48 pm Post subject: |
|
|
__name__,
I think you want to search the keyword is "m.2 adapter".
When I search that, I got a few hits that will have something convert m.2 to sata for example. So taking this approach, you can have m,2 -> sata -> sata->m.2 (as some kind of sata enclosure that have nvme inside).
I did not check more, but there could be one m.2 adapter have house 2 nvme card. |
|
Back to top |
|
|
__name__ n00b
Joined: 06 Feb 2024 Posts: 46 Location: where the wind blows
|
Posted: Fri Oct 18, 2024 8:16 pm Post subject: |
|
|
Ralphred wrote: | Other than that, using a Gentoo live CD/USB is the safe way, you "follow the handbook" for the new drive, then when it comes to dropping a stage3 on it you copy the files over from the old drive. If the bandwidth to the new drive is the bottleneck issue, then using rsync to do the copying, or creating a compressed tar archive* ahead of the copy might serve you better.
|
This is what I was looking for. Thanks.
Would it be faster to swap the current NVMe drive with the new one, placing the current drive in the USB enclosure for reading and the new drive in the laptop for writing?
pingtoo wrote: | __name__,
I think you want to search the keyword is "m.2 adapter".
When I search that, I got a few hits that will have something convert m.2 to sata for example. So taking this approach, you can have m,2 -> sata -> sata->m.2 (as some kind of sata enclosure that have nvme inside).
I did not check more, but there could be one m.2 adapter have house 2 nvme card. |
I already purchased the USB NVMe enclosure and I have an old SATA drive in the laptop. Thanks for the suggestion and that may be the way I go about it in the future. |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 655
|
Posted: Fri Oct 18, 2024 9:24 pm Post subject: |
|
|
__name__ wrote: | Would it be faster to swap the current NVMe drive with the new one, placing the current drive in the USB enclosure for reading and the new drive in the laptop for writing? | The slowest link in the "transfer chain" is still going to be the "slowest link", the amount of read/writes you have to do outside of the actual transfer are so minimal that there is no foreseeable benefit in matching the slowest drive (the old drive I assume) with the slowest interface (again an assumption, but the USB link).
That said, proving the new drive will be seen by the PC after the transfer (by installing it), and proving the USB interface/caddy is good (by booting from it before starting) both have merit. |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 655
|
Posted: Fri Oct 18, 2024 9:45 pm Post subject: |
|
|
pingtoo wrote: | I did not check more, but there could be one m.2 adapter have house 2 nvme card. | Yeah, there are various "configurations" for both USB and PCIe. The thing to look out for on the PCIe versions is often when they have the facility for two drives, one slot is sata only, the other nvme only (sometimes the second slot is A or E key too, so for "not a drive at all"). The USB versions vary from item to item, but obviously you aren't going to fit anywhere near ~24GBps of "2x gen5 nvme goodness" down a 10Gbps USB3 gen2 interface, and most of the "2xM.2 drive USB caddies" I've used of offer inter-drive transfer for cloning/mirroring (but to be fair, this is what they were sourced to do so YMMV). |
|
Back to top |
|
|
__name__ n00b
Joined: 06 Feb 2024 Posts: 46 Location: where the wind blows
|
Posted: Sat Oct 19, 2024 8:51 pm Post subject: |
|
|
Ralphred wrote: | __name__ wrote: | Would it be faster to swap the current NVMe drive with the new one, placing the current drive in the USB enclosure for reading and the new drive in the laptop for writing? | The slowest link in the "transfer chain" is still going to be the "slowest link", the amount of read/writes you have to do outside of the actual transfer are so minimal that there is no foreseeable benefit in matching the slowest drive (the old drive I assume) with the slowest interface (again an assumption, but the USB link).
That said, proving the new drive will be seen by the PC after the transfer (by installing it), and proving the USB interface/caddy is good (by booting from it before starting) both have merit. |
I did boot from the USB enclosure and I found an appropriate USB 3.0 cable to use so the speeds are not as bad as they were when I posed the question.
I appreciate the help from everyone. I will be moving forward with this in the next day or two. I'll respond with an outline of the process I used to help others that stumble upon this thread. |
|
Back to top |
|
|
__name__ n00b
Joined: 06 Feb 2024 Posts: 46 Location: where the wind blows
|
Posted: Thu Oct 24, 2024 6:52 am Post subject: |
|
|
I was successful in my migration. I chose the following route:
szatox wrote: | Advanced version: make it similar to a new installation, but with your own files and skipping redundant steps.
Partition the new disk (or clone partition table), format partitions, copy your files over, possibly fix UUIDs in fstab and bootloader, and you're done. |
I loaded a gentoo liveUSB environment and followed the above steps. It was very straightforward and quick.
To copy the files to the proper partitions I used Code: | rsync -avxWHAX --progress /home /new-disk/home | .
The only issue I ran into was with updating the bootloader. I use GRUB and for whatever reason I was not able to get Code: | grub-mkconfig -o /boot/grub/grub.cfg | to work in the liveUSB environment. I cheated and used sed to replace the UUID with the new UUID. Sketchy but I backed up the grub.cfg file prior to the sed operation just in case. It was successful but there has to be a better way... I probably should have used chroot and it would have worked just fine but I chanced it and was lucky. I then booted the new drive in the USB enclosure and reran Code: | grub-mkconfig -o /boot/grub/grub.cfg | just to be safe. Hopefully someone more experienced with this can chime in and confirm my suspicions about using chroot to do it the proper way.
Overall, it was a smooth process, and I'm glad I made the switch. Thanks to everyone for their help! |
|
Back to top |
|
|
|