Editing fstab to mount /data from a different partition Is it possible to edit the fstab to mount /data, /cache etc. from a different partition on the
a.internal memory?
b.external sdcard?

Details: The default partition for /data and /cache are too small for my needs and I can manage to format the (internal) /sdcard in ext4.

Edit: My question may superficially seem to be like other questions asking for a way to increase size of /data, but it's not. Here's why:

(1) I need to do it specifically by editing fstab, which is the usual way of doing the same thing on a GNU/Linux desktop.
(2) The other questions don't ask about /cache and other partitions.
As you already expected, the way your question is phrased it looks like an XY problem: There are different ways to achieve your goal (mounting /data, /cache etc. from a different partition), while your question focuses on "editing fstab".

For a working solution, see e.g. Mount a folder from external sd as /data: What's described there should work on all devices/ROMs – while "editing fstab" bears some problems:


While that's of course the way it works on Linux, we're talking Android here – which uses a Linux kernel, but a very different setup (see: What's the Android equivalent of /etc/fstab?)
An fstab file is not present on many/most Android installations (see How to list all major partitions with their labels? for details)
If an fstab file is present, it's usually part of the boot image (see initrd for details). This means, your edits to the file would be in vain: on the next boot where you'd expect them to be processed, instead the file would be overwritten from the boot image and then processed – without your changes


Verdict: Even if your device has an fstab file, you cannot simply edit it and be done. You'd have to rebuild the boot image instead – a task that goes beyond the scope of this site (which is end-user orientated, and creating/rebuilding a boot image rather is in the domain of developers). It might not be straight "off-topic", but at least border-line/gray-zone.