0

Disclaimer: I wasn't really sure where to put this, but as the context is mostly Unix it ended here.

Regarding the recent release of Mac OS High Sierra and the introduction of APFS, I've become curios in the process of changing from one file system to another. I imagine what complicates things the most is the transition of symlinks and hard links from the old system to the new one as the still need to point to the right files (nodes effectively). Doing such a thing would require creating a graph of inodes in the original filesystem, which could have billions of nodes, and trying to recreate that with the new one, probably introducing a different positioning algorithm, associated meta-data and stuff.

I'm willing to see how realistic my assumptions are and if not, could anyone provide an explanation of the process?

Update: I'm not asking about any specific operating system/filesystem. I want to know the process of changing the file system and what happens underneath.

3
  • Are you asking about some manual method of changing the filesystem type on a partition, or are you asking about some internal workings of the macOS operating system?
    – Kusalananda
    Commented Oct 7, 2017 at 7:57
  • You still have to take into account the operating system and filesystem, as the "stuff" that occurs underneath, as you put it, involves system libraries, calls to the kernel through respective modules, etc.
    – ILMostro_7
    Commented Oct 7, 2017 at 9:03
  • @ILMostro_7 Thats for certain. I just didn't want the question to seem tied to Mac OS or APFS specifically, but more to the general concepts involved in a standard Unix system.
    – Paghillect
    Commented Oct 7, 2017 at 9:26

1 Answer 1

2

Symlinks do not point to inodes. And hard links just have to point to the same inode; no problem if the inode number changes.

In some cases you can convert a filesystem (e.g. there is a tool to convert etx4 to btrfs). But usually you make a backup of the data, format the volume with the new filesystem and restore your backup. You just need a backup which handles hard links correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .