Suppose I have some drive with a single partition. For some reason I decide to repartition it, using
fdisk. I create multiple partitions, then write the partition table, then exit
fdisk. At this point the kernel is still not aware of the new partition table : the initial partition is still mounted through NFS, it was only "lazy-unmounted" (
umount -l) before
fdisk, so it triggered the "device or resource busy" error.
Now I change my mind, launch
fdisk again, and merge all partitions into a single one, exactly as it was at first. Then again I write the partition table, exit
fdisk, and the kernel still has no clue of what just happened.
rm -rf everything on the disk, then copy some new data on it.
Question is : what happens at the next reboot, when the kernel will see the "new" (yet same as before) partition table ? Will the data will be straight readable by the system ?