Need help for HDD migration ntfs to ext4

Hello !

It might be more Linux basics than Osmc, but I give it a try here -:slight_smile:

I have currently 3 HDD attached locally to my VeroV for local movies and series, all ntfs, 50+% full.
All 3 are automounted as /media/“LABELx” by Udisks service I assume.

I will soon need more space, so I would like to take the opportunity to migrate all of them to ext4 for best performance.
I wonder what could be the best process…

Basically my idea is to buy a 4th HDD:

  • format it as ext4,
  • name it with a “new_temporary_label”,
  • copy all files from HDD1 to start, keeping the directory structure, dates etc…
  • and then Stop Kodi,
  • umount both disks and re-labels both, naming the new ext4 one per the old ntfs HDD1 “LABEL1” , and vice-versa
  • restart Kodi and check result

I would use .nomedia files to avoid duplicates in the db while migrating.

If OK, similar process for next ntfs HDD…

Hopefully that would mean no change at all required in the video.db, no rescraping etc, all paths being maintained.

Question is can it work, or will Automount/Udisks be unhappy with the new properly labelled ext4 disk because of different uuids or anything else hardware related ?

Any advice is welcome !

Kodi only cares about the file path, so if you maintain that then there wouldn’t be an issue. I’m not sure why you would need to mess around with a nomedia file though. If you format a new drive as ext4 it is going to mount as /media/[something] and Kodi isn’t going to do anything with that file path unless you tell it to. So you can just keep using Kodi as you normally would while transferring files from an old drive to the new. As long as the directory layout remains the same then once the transfer is done you can just remove the old drive, relabel the new drive to match the old, unmount remount, and Kodi is none the wiser. There is no need to do anything more involved.

If your current drives are smaller in size and you wanted to consolidate them to a new big drive then you could transfer the contents of each of the old drives to their own subfolder (ie /media/newdrive/olddrive1/) and then use path substitution to maintain your current Kodi setup without having to reconfigure and rescrape.

Thank you @darwindesign, that is a prompt answer !

You’re probably right about the nomedia file, I was just afraid about a possible db update running in the middle of the process, but as long as I don’t have the new drive as a source this should not hurt.

Overall glad you confirm that only the path is relevant for Kodi, so I guess the whole process should work.

Thx also for the hint and link about path substitution, I read about that earlier, but forgot about it. That is a powerfull thing to have handy !

1 Like

I can speak from experience on this one, if the name of the drive and the paths are the same Kodi will just read your new drive as if it were the old drive.

Lets say you labeled your drives as LABEL1, LABEL2, and LABEL3.
When you buy your forth drive format it as ext4 and label it LABEL1.
Then move the contents from the original LABEL1 drive to your new drive also labeled LABEL1.
When you plug the new drive in Kodi will act like it’s the original drive.
No need to rescan your library or anything.
You will have a couple root folders that are different due to the file systems.
Your NTFS drives have $RECYCLE.BIN and a System Volume Information directory but your ext4 formatted drive will have a lost+found directory.
Neither of those will impact Kodi behavior.
Verify everything work with the new drive.
If so, then format the old LABEL1 drive as ext4 and label it LABEL2, then migrate the old LABEL2 drive contents over and repeat the process.

You should consider a couple things first before doing any of this though.
Do you delete and add content regularly on your existing discs or will you just be filling them up and then moving on to new discs and ever expanding.
If your just filling them up and then expanding then I don’t know how much it would be worth it to do this big shuffle just to get drives mostly full switched over to ext4.
If you delete a lot then maybe it makes since.
Because the only real world advantage you will see is with initial transfers.
If LABEL1 is full and all the content on it is stuff you plan on keeping, I wouldn’t bother migrating and changing the file system.

Second thing to consider is heat.
If you plan on doing a migration like this on external drives they will heat up significantly.
Place a fan so it’s blowing across both the source and target drives for the duration of the project.
I’ve done this plenty of times with 8TB drives and it takes a good while if you are using the Vero as the host device.

What size drives do you have?

my drives are 2TB, 2TB and 4TB. I plan to by one more 4TB at least.

Your comments about usage and ext4 performance benefits are relevant of course.

I mainly fill drives up with new additional stuff, rarely delete things. So I do have frequent initial transfers, each time I add something, but overall I would say total content is pretty stable.

Then very occasionnaly I had to move around few complete and large directories when one drive is getting full. My movies are still organized per genre-named directories, an old habit from before KODI and its db :slight_smile: . And for that I “manually” updated paths in the db with few SQL transactions. Might rather use “path substitution” there…

The heat concern is a good comment, I’d be able to manage.

Bottom-line I expected ext4 performance to be significantly better also for day to day KODI usage, not only inital transfers. I have to think about that and might reconsider, like just using ext4 for the new drive.

Thank you again for valuable advices !

I’d buy a much bigger drive, copy the others across and then unplug them and keep them as a backup, maybe offsite. I use a 14Tb seagate expansion drive currently, have another i back up onto offsite using syncthing and some older drives with a lot of the files on but not plugged in. Redundancy is good and using 2Tb drives seems a bit old considering prices you can pay nowadays for a lot of capacity.

Under what circumstances does Kodi need better disk performance than it’s currently getting? If you can read at a rate greater than the highest video bit rate you ever encounter (which is probably only about 16-20MB/s), when do you need more speed than that?

The amount of untouched UHDs I have watched on NTFS drives plugged into a Vero 4K+ USB 2.0 port is ridiculous and I have never had performance issues.
Some say you may see a difference when seeking but I rarely do that and when I have it seemed plenty responsive to me.
The only real world performance advantage in my opinion with ext4 on USB 3.0 is the initial writing.
I have six 8TB discs formatted as NTFS and full, I’m not going to go back and shuffle all my files around to change the file system on drives I will never write to again.
But my seventh and eighth drives have been formatted ext4 and it is nice to be able to transfer my 90GB UHDs over at 100 MBs instead of 30ish!

As you say, Kodi doesn’t need it.

But if you are going to share that drive over network via samba, the combination of smb-transfers and write to ntfs/exfat, you get regular drops in file transfer speeds. Never really tested it on a VeroV, since I dropped all but one exfat drive and it’s mostly written to via shell file manager.And to top it of, I’ve stared to use NFS for network.

Nice to see how much interest the question created here :wink:

You’re right overall, I do understand that ntfs speed is more than enough for serving even highest bitrates videos.
I can myself confirm that since I started several years ago I never noticed any HDD related bottleneck watching movies or else. Btw I really like my Veros and KODI for that !
Sometimes even, the kids would fetch movies via samba from their PCs while we are watching something else on KODI and it is not a problem either.

As already explained I would still appreciate faster transfers when manipulating always increasing large video files (from Windows where I encode), or occasionally moving some around. So for sure the next drive, at least, will be ext4 :slight_smile:

Thank you all for the good input !

I’d also suggest to purchase a much larger drive. If these drives are small because your using the bus powered ones with 2.5" drives inside I’d submit that you would be better off with a single external 3.5" package with a power brick than with multiple smaller ones and a hub. Not only do the larger drives tend to be more reliable, but they can also be a lot less expensive. I just took a look at the local prices of drives where I’m at. I can buy a small 4TB spinning rust from WD or Seagate for $120 USD or a 14TB WD Essentials (similar to a My Book) on special for $220 USD. That is close to half the cost per TB.

My Costco has 14TB Seagate Expansions on sale for $150 right now.
Very good deal!

@rockrider69 I think it’s time to step up you TB game!


Well that’s a bargain, if I could get one in the uk I’d get another. I can personally attest its a great drive.

Indeed a bargain !
No doubt if I can find one 14TB at this price I take it immediately.
My 2TB are just “reformed” 3.5 ext backups drive I have been using on the desktop. Both on a powered Hub. Probably time for a change anyway :wink:
Here in France best deal I could find so far is 6TB for 154€ :frowning: (and an Expansion as well) …