rsync -avxH
will copy the files between drives.
You can simply mount the new drive in the same place as the old one after the copy, that way you don't have to change any paths.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
rsync -avxH
will copy the files between drives.
You can simply mount the new drive in the same place as the old one after the copy, that way you don't have to change any paths.
Ill look into rsync, thx.
About not changing paths, does it apply to my case? This is how I defined docker volumes:
volumes:
- /home/config/radarr:/config
- /srv/dev-disk-by-uuid-4cfcd2b7-507b-4e3e-abd3-7b9c87d8ce64/data2000/data:/data
Well considering you made the mount point so specific to the drive you might as well change it. 😊 In the future consider something named after the directory's function rather than physical support, such as /srv/docker/radarr/data. That way you can swap drives at /srv/docker and keep everything the same.
Yeah I felt like it wasnt the best. I did that path in OMV following some guide a while ago.
Thx!
I would clone the second disk to the new disk (with gparted for instance) an then resize the partion to fit the disk. This way it would be a simple disk swap without needing to do anything else.
PS: I think simply copying the files will go wrong with the hard links.
My data SSD is 2TB and my new HDD is 12TB. I guess cloning will make 2TB partition on new HDD and then I have to extend it to 12TB? Did I understand that correctly? Do I need to use live OS or can I do it on running Debian OS? Do I have to change paths in my docker-compose after that? Please check another comment how I defined volumes, there might be a better way.
Sorry I wanted bit to fast. Clonezilla will clone disk including huid (which can mess things up is you keep both in the pc). But then you can boot clonezilla, clone disk (has a flag -k1 for resizing partitions), remove the old disk, and should work without changing anything else. If you want to change the settings anyway, there are more options like DD. For clonezilla instructions, see https://clonezilla.org/fine-print-live-doc.php?path=./clonezilla-live/doc/03_Disk_to_disk_clone/00-prepare-clonezilla-live.doc#00-prepare-clonezilla-live.doc
Mate this was awesome recommendation. Using -k1 made exact same disk but with more storage 😉
It took 1h55m for 1.5 TB od files from 2TB disk to new 12TB
Nothing changed, I just replaced disk and viola server is up and running
Awesome thank you
The disks will have a different UUID, so will be seen as different devices. I can't remember what you need to do, but I'm pretty sure that the *arrs have a guide for transferring to a new disk without the files being detected as new.
The containers (docker etc) don’t have access to the uuid, they just see the mounted folder.
The “dates “ on the files however may change. Cloning the drive is recommended
Ah, that's good to know. Thanks for the correction :)
I would like to stick with recommended solution and I don't mind if dates of the files change. It would be nice if you have any source I can follow.
Look up “dd” , that’s the utility you want to use
I’d post a link, but I’m mobile right now
Thx
I found a post how to move root folder, but I'm afraid it will not move hardlinks for qbittorrent.
Method I use is a RAID 5 replace all my disks with larger ones. Grow RAID, LVM and then XFS. Went from 4TB drives to 8TB, and now 24TB drives using this method for the past about decade now
Setting up a RAID is something I want to do in the future, but need more drives for that. Maybe next Xmass 🙃