I had a old dietpi install (over 1 year old) i was using as a NAS basically with samba, and torrenting time to time with transmission, today it lost power and it seems some data corruption on the SD card may have occurred, it boots SSH but says dietpi config files are missing, samba never loads, either does transmission. so no problem I re-wrote the dietpi image to a SD card and threw it in there, had it up and running in a few minutes installed samba and transmission.
now here’s the problem, when I open the network share none of my data is there, I plugged the drive into my windows PC and used an ext4 driver to mount the drive, and all the files are still there in tact, from what my googling has told me it may have something to do with the mount location on the drive, but I don’t know how to fix it as i’m not incredibly well versed in linux. and I can’t find anything addressing this issue directly online (maybe I’m looking for it wrong, idk)
I do still have the SD card that it was running on before (installed the new one on a new SD card) so if any data on there is helpful i can easily obtain it.
Try to copy old /etc/fstab to the new SD card - back up the new /etc/fstab first of course.
Thanks for the reply John, I did that and transferred my user-data over to the drive again, my samba drive shows 700gb free of 3TB, but there’s no files in the folders when I access it so that didn’t fix the problem… in the dietpi drive manager it’s mounted to /mnt/usb_1 : dev/sda1 now which is the same as it was on the previous install, so I’m not really sure what the problem is, how can I move my data to the new user folder?
when I transferred my userdata dietpi told me this:
[ OK ] DietPi-Set_userdata | Moving your existing data from /mnt/dietpi_userdata to /mnt/usb_1/dietpi_userdata
[ INFO ] DietPi-Set_userdata | Please wait...
[ INFO ] DietPi-Set_userdata | Target filesystem supports user permissions:
[ INFO ] DietPi-Set_userdata | - Attempting to preserve permissions during transfer.
'/mnt/dietpi_userdata/downloads' -> '/mnt/usb_1/dietpi_userdata/downloads'
'/mnt/dietpi_userdata/Music' -> '/mnt/usb_1/dietpi_userdata/Music'
'/mnt/dietpi_userdata/Pictures' -> '/mnt/usb_1/dietpi_userdata/Pictures'
'/mnt/dietpi_userdata/Video' -> '/mnt/usb_1/dietpi_userdata/Video'
maybe user permissions has something to do with this issue?
Maybe try copying the old /etc/samba/samba.conf to the new SD card?
Tried copying the smb.conf file, but still the same result, just empty folders on the samba share.
so is my only option here to buy a new drive and transfer the data to it? cause i’d really prefer not to but it seems to be the only choice I have at this point.
Can you clarify, is it that the files can’t be seen from the C2 or can’t be seen from Windows when the drive is attached to the C2?
What I mean is if you login to the C2 using SSH from WInSCP (or similar) can you navigate to the drive location and view the files? If so can you change folder permissions to 777 and see if that makes them visible from Windows?
Is it the case that the files are there but the problem is that Windows does not see them when the drive is attached to the C2?
If I connect to SSH I can view the files, but they are not in the “dietpi_userdata” folder, they are in /mnt/bunch of random letters/ (the root of the drive) so the data cannot be seen by samba or transmission, how can I make them visible to my other software? (samba and transmission are only able to see the folders inside of “dietpi_userdata” I guess I could move the files via SSH? may take a while.
edit: nevermind, moved the data in a matter of a few seconds over to the correct folder and now its working! thank you for your help John!