How can I clone my LVM disk to a larger drive?

0
22
Asked By CuriousCoder42 On

I have an NVMe SSD that serves as the only member of an LVM volume and is currently 1.8TB in size. I'm looking to upgrade to a bigger 4TB SSD since I only have one M.2 slot on my motherboard. I have a USB enclosure for the new drive but faced issues when trying to clone the original disk using Clonezilla; it fails with an error saying it can't clone the source disk. I'm wondering if this problem is due to it being an LVM volume. If so, how can I successfully clone my existing disk, or alternatively, how can I replace it while ensuring that all data is preserved? I would appreciate detailed, step-by-step instructions, as I'm a beginner with Linux and LVM. I've also considered the idea of starting fresh with just regular partitions instead of LVM. Would that work, and would I be able to keep my existing directory paths like /mnt/media?

3 Answers

Answered By TechWhiz88 On

Before you do anything, make sure to backup your important data first. Since you don't need LVM specifically, I recommend formatting the new drive as a regular partition and copying over your files. You can use the `rsync` command for that, which is pretty user-friendly. It'll look something like this: `rsync -av /path/to/source/ /path/to/destination/` to ensure all your files get transferred correctly.

CuriousCoder42 -

So just to clarify, after formatting the new drive, I would directly copy files over using that command? What about permissions and settings?

Answered By DataMover66 On

My suggestion is to avoid cloning the entire disk. Instead, focus on cloning the filesystem from your LVM setup to a standard partition on the new drive, then extend the filesystem to use the full 4TB. This way, you can keep everything organized and will likely avoid the issues LVM can introduce during cloning. It’s simpler once you get the hang of it!

CuriousCoder42 -

How exactly would I go about doing that? What commands do I need to use for this?

Answered By DiskDoctor99 On

Clonezilla should support LVM, but there might be specific features causing the issue. You might want to consider using the `dd` command to clone the disk instead, but be cautious of copying empty space. Keep in mind that you could just copy the data without trying to clone the whole disk. If your old disk doesn’t contain the system files, it might be easier to just manually transfer your data instead of dealing with LVM complexities.

CuriousCoder42 -

Does using `dd` mean I need to be more careful with duplicates? Also, can you walk me through the commands?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.