Page 1 of 1

How is /root different from other directories?

Posted: Fri Nov 22, 2024 4:05 am
by Luluc

I just had to rename a large directory inside /root in FossaDog. Renaming is usually an instantaneous operation, but this one took a loooooong time... I could see it was performing a full copy operation, as if I was moving it to another file system.

I did it again with a slightly smaller directory, but also large. Again, a looong time...

Running 'sync' after each operation also takes a looong time...

Why?


Re: How is /root different from other directories?

Posted: Fri Nov 22, 2024 5:22 am
by Luluc

I replaced /root with a symlink to a copy of it in another partition.
There was a little resistance, the system put up a fight, but my will prevailed.
Now everything is remarkably fast. I've never seen my OS run so fast. Even the browser loads the pages faster.
Looks like /root was holding the machine back.
What is going on?! What is the deal with /root in this OS?


Re: How is /root different from other directories?

Posted: Fri Nov 22, 2024 7:40 am
by vektor_alian

Hi Luluc

Have to guess since you provided no info: hard drive.

Vektor


Re: How is /root different from other directories?

Posted: Fri Nov 22, 2024 10:16 am
by fredx181

@Luluc Can't see anything special about the /root directory.
I do know that renaming is often tricky on a layered filesystem (FossaDog is still using "aufs", newer DebianDogs now use "overlayfs").
When trying to rename with pcmanfm, I get "Invalid cross-device link" error, using mv from terminal should work, but may depend on e.g. if the file/folder to rename exists in the main .squashfs or (only) in the save-storage.
But frankly I don't know enough about the mechanism. Perhaps better ask about renaming in another (general) section.