16
Best way to swap drives?
(lemmy.world)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
dd then resize the fs?
Edit: one caveat here I forgot: if your fstab is using UUIDs, you're going to have to update that, since the new drive won't be the same UUID because, well, it's not the same drive.
Absolutely this. Relatively quick and clean, no messing with installation or reconfiguration. That is, assuming your data isn't completely corrupted and the old drive doesn't just outright fail during transfer... But if that happens you were screwed to begin with.
The old drives are fine, just either too small or too slow, so it sounds like it may be an option
Any help with the acronyms? I'm still pretty new to Linux
two commands: dd and resize2fs, assuming you're using ext4 and not something more exotic.
one makes a block-level copy of one device to another like so: dd if=/dev/source-drive of=/dev/destination-drive
the other is used to resize the filesystem from whatever size it was, to whatever size you tell it (or the whole disk; I'd have to go read a manpage since it's been a bit)
the dd is completely safe, but the resize2fs command can break things, but you'd still have the data on the original drive, so you could always start over if it does - i'd unplug the source drive before you start doing any expansion stuff.
Only if you have the correct args and device names. Make a backup if you want to do it from the command line and aren't feeling 100% confident.
Thanks, that's really helpful. It can be hard to tell between commands and acronyms in conversation with familiarity
Be absolutely sure that you get the source and destination drives correct. If you get them backwards, it will nuke your data. There is no confirmations, dd will start as soon as you press enter.
Good old disk destroyer.