Hi all,
I currently have a Linux install from an old 256GB SATA SSD that I inherited. It was originally used as a swap drive in another person’s RAID server for about 7 years, then it was given to me, where I put my own Linux install that I have been running for about 5 years.
About a year ago, I acquired a new computer that has an NVMe SSD. It originally ran windows, but I dropped in my SSD with my Linux install, installed grub on the NVMe SSD, and booted to the old SSD.
I am mildly concerned about with this SSD being so old, it could crap out on me eventually. I remember that being a topic of discussion when SSDs first hit the market (i.e. when the one that I am using was made). So I was thinking of wiping the 1TB NVMe SSD that is currently unused in this computer and migrating my install to it. Now, I know I could copy my whole disk with dd
, then expand the partition to make use of the space. But I was wondering if I could change the filesystem to something that had snapshots (such as btrfs).
Is it possible to do this, or to change filesystems do I need to create a new Linux install and copy all the files over that I want to keep?
Make the new filesystem, rsync the old SSD to the new one (making sure to use
rsync -ax
to copy everything properly, also add-H
if you use hardlinks), update fstab UUID, regenerate GRUB configuration and you’re good to go.I have a 10 year old install that’s survived moving several disks and computers, it works just fine.
This is likely what I will do now that I have given it some thought. This will bring over all of my installed apt and snap packages, right? And they will both be aware and know how to update from there?
I have the NVMe prepped. It has a fresh Ubuntu install of the same version, but on btrfs. I could probably even snapshot it before I get started to make sure I can roll back and try again if I fuck up. And worst case, I can just reinstall the OS on that partition, as it would touch my existing install. It feels pretty safe to try. Worst thing that can go wrong is I waste my time.
-x (alias --one-file-system) means “don’t cross filesystem boundaries”; is that what you meant? Or did you mean -X | --xattrs?
Edited because I wrote some things before that were incorrect.
Don’t forget to change the fstab filesystem type when updating the UUID as well (yes, I’ve made this oops before).
And maybe also -ASX for ACLs, sparse files and xattrs