[Android Q&A, Help & Troubleshooting] jla2040:
I have a device that uses UBIFS and I'm trying to increase the partition size of the /system disk as it doesn't have much space and only half of the NAND is partitioned. Unfortunately, it's not as simple as I thought as the entire nand chip doesn't populate in /dev as a single device.

Here's the boot log where MTD partitions are enumerated.

[ 0.000000] Kernel command line: noinitrd rw console=ttyHSL0,115200,n8 androidboot.hardware=qcom ehci-hcd.park=3 msm_rtb.filter=0x37 lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78b1000 androidboot.serialno=796a00b0 androidboot.authorized_kernel=true androidboot.baseband=msm rootfstype=ubifs rootflags=bulk_read root=ubi0:rootfs ubi.mtd=13

[ 0.478465] sps: BAM device 0x07984000 is not registered yet.
[ 0.478706] sps:BAM 0x07984000 is registered.
[ 0.478723] msm_nand_bam_init: msm_nand_bam_init: BAM device registered: bam_handle 0xdde0c800
[ 0.478966] sps:BAM 0x07984000 (va:0xe0bc0000) enabled: ver:0x19, number of pipes:7
[ 0.481536] msm_nand_parse_smem_ptable: Parsing partition table info from SMEM
[ 0.481577] msm_nand_parse_smem_ptable: SMEM partition table found: ver: 4 len: 20
[ 0.481602] msm_nand_version_check: nand_major:1, nand_minor:5, qpic_major:1, qpic_minor:5
[ 0.481640] msm_nand_scan: NAND Id: 0x2690ac98 Buswidth: 8Bits Density: 512 MByte
[ 0.481649] msm_nand_scan: pagesize: 4096 Erasesize: 262144 oobsize: 256 (in Bytes)
[ 0.481656] msm_nand_scan: BCH ECC: 8 Bit
[ 0.481670] msm_nand_scan: CFG0: 0x290409c0, CFG1: 0x08045d5c
[ 0.481670] RAWCFG0: 0x2b8401c0, RAWCFG1: 0x0005055d
[ 0.481670] ECCBUFCFG: 0x00000203, ECCBCHCFG: 0x42040d10
[ 0.481670] RAWECCCFG: 0x42000d11, BAD BLOCK BYTE: 0x00000175
[ 0.481691] Creating 20 MTD partitions on "7980000.nand":
[ 0.481711] 0x000000000000-0x000000280000 : "sbl"
[ 0.482399] 0x000000280000-0x000000500000 : "mibib"
[ 0.482994] 0x000000500000-0x000001b80000 : "efs2"
[ 0.483584] 0x000001b80000-0x000001c80000 : "tz"
[ 0.484194] 0x000001c80000-0x000001d40000 : "rpm"
[ 0.484816] 0x000001d40000-0x000001e40000 : "aboot"
[ 0.485364] 0x000001e40000-0x000002880000 : "boot"
[ 0.485922] 0x000002880000-0x000002900000 : "scrub"
[ 0.486496] 0x000002900000-0x000006fc0000 : "modem"
[ 0.487080] 0x000006fc0000-0x000007140000 : "misc"
[ 0.487672] 0x000007140000-0x000007bc0000 : "recovery"
[ 0.488269] 0x000007bc0000-0x000007c80000 : "fota_none"
[ 0.488883] 0x000007c80000-0x000009340000 : "recoveryfs"
[ 0.489491] 0x000009340000-0x000011bc0000 : "system"
[ 0.490036] 0x000011bc0000-0x000012b40000 : "pad1"
[ 0.490729] 0x000012b40000-0x000013f80000 : "userrw"
[ 0.491301] 0x000013f80000-0x000017a40000 : "hdata"
[ 0.491890] 0x000017a40000-0x00001f000000 : "ntgfota"
[ 0.492500] 0x00001f000000-0x00001f8c0000 : "cust"
[ 0.493103] 0x00001f8c0000-0x000020000000 : "persist"
[ 0.493719] msm_nand_probe: NANDc phys addr 0x7980000, BAM phys addr 0x7984000, BAM IRQ 35
[ 0.493729] msm_nand_probe: Allocated DMA buffer at virt_addr 0xdf446000, phys_addr 0x9f446000

/dev

crw-rw---- 1 root root 90, 0 Jan 1 1970 mtd0
crw-rw---- 1 root root 90, 1 Jan 1 1970 mtd0ro
crw-rw---- 1 root root 90, 2 Jan 1 1970 mtd1
crw-rw---- 1 root root 90, 20 Jan 1 1970 mtd10
crw-rw---- 1 root root 90, 21 Jan 1 1970 mtd10ro
crw-rw---- 1 root root 90, 22 Jan 1 1970 mtd11
crw-rw---- 1 root root 90, 23 Jan 1 1970 mtd11ro
crw-rw---- 1 root root 90, 24 Jan 1 1970 mtd12
crw-rw---- 1 root root 90, 25 Jan 1 1970 mtd12ro
crw-rw---- 1 root root 90, 26 Jan 1 1970 mtd13
crw-rw---- 1 root root 90, 27 Jan 1 1970 mtd13ro
crw-rw---- 1 root root 90, 28 Jan 1 1970 mtd14
crw-rw---- 1 root root 90, 29 Jan 1 1970 mtd14ro
crw-rw---- 1 root root 90, 30 Jan 1 1970 mtd15
crw-rw---- 1 root root 90, 31 Jan 1 1970 mtd15ro
crw-rw---- 1 root root 90, 32 Jan 1 1970 mtd16
crw-rw---- 1 root root 90, 33 Jan 1 1970 mtd16ro
crw-rw---- 1 root root 90, 34 Jan 1 1970 mtd17
crw-rw---- 1 root root 90, 35 Jan 1 1970 mtd17ro
crw-rw---- 1 root root 90, 36 Jan 1 1970 mtd18
crw-rw---- 1 root root 90, 37 Jan 1 1970 mtd18ro
crw-rw---- 1 root root 90, 38 Jan 1 1970 mtd19
crw-rw---- 1 root root 90, 39 Jan 1 1970 mtd19ro
crw-rw---- 1 root root 90, 3 Jan 1 1970 mtd1ro
crw-rw---- 1 root root 90, 4 Jan 1 1970 mtd2
crw-rw---- 1 root root 90, 5 Jan 1 1970 mtd2ro
crw-rw---- 1 root root 90, 6 Jan 1 1970 mtd3
crw-rw---- 1 root root 90, 7 Jan 1 1970 mtd3ro
crw-rw---- 1 root root 90, 8 Jan 1 1970 mtd4
crw-rw---- 1 root root 90, 9 Jan 1 1970 mtd4ro
crw-rw---- 1 root root 90, 10 Jan 1 1970 mtd5
crw-rw---- 1 root root 90, 11 Jan 1 1970 mtd5ro
crw-rw---- 1 root root 90, 12 Jan 1 1970 mtd6
crw-rw---- 1 root root 90, 13 Jan 1 1970 mtd6ro
crw-rw---- 1 root root 90, 14 Jan 1 1970 mtd7
crw-rw---- 1 root root 90, 15 Jan 1 1970 mtd7ro
crw-rw---- 1 root root 90, 16 Jan 1 1970 mtd8
crw-rw---- 1 root root 90, 17 Jan 1 1970 mtd8ro
crw-rw---- 1 root root 90, 18 Jan 1 1970 mtd9
crw-rw---- 1 root root 90, 19 Jan 1 1970 mtd9ro
brw-rw---- 1 root root 31, 0 Jan 1 1970 mtdblock0
brw-rw---- 1 root root 31, 1 Jan 1 1970 mtdblock1
brw-rw---- 1 root root 31, 10 Jan 1 1970 mtdblock10
brw-rw---- 1 root root 31, 11 Jan 1 1970 mtdblock11
brw-rw---- 1 root root 31, 12 Jan 1 1970 mtdblock12
brw-rw---- 1 root root 31, 13 Jan 1 1970 mtdblock13
brw-rw---- 1 root root 31, 14 Jan 1 1970 mtdblock14
brw-rw---- 1 root root 31, 15 Jan 1 1970 mtdblock15
brw-rw---- 1 root root 31, 16 Jan 1 1970 mtdblock16
brw-rw---- 1 root root 31, 17 Jan 1 1970 mtdblock17
brw-rw---- 1 root root 31, 18 Jan 1 1970 mtdblock18
brw-rw---- 1 root root 31, 19 Jan 1 1970 mtdblock19
brw-rw---- 1 root root 31, 2 Jan 1 1970 mtdblock2
brw-rw---- 1 root root 31, 3 Jan 1 1970 mtdblock3
brw-rw---- 1 root root 31, 4 Jan 1 1970 mtdblock4
brw-rw---- 1 root root 31, 5 Jan 1 1970 mtdblock5
brw-rw---- 1 root root 31, 6 Jan 1 1970 mtdblock6
brw-rw---- 1 root root 31, 7 Jan 1 1970 mtdblock7
brw-rw---- 1 root root 31, 8 Jan 1 1970 mtdblock8
brw-rw---- 1 root root 31, 9 Jan 1 1970 mtdblock9
crw-rw---- 1 root root 10, 90 Jan 1 1970 ramdump_AR6320
crw-rw---- 1 root root 10, 89 Jan 1 1970 ramdump_AR6320_SD
crw-rw---- 1 root root 10, 85 Jan 1 1970 ramdump_modem
crw-rw---- 1 root root 10, 80 Jan 1 1970 ramdump_smem

cat /proc/mounts

rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,relatime,bulk_read,chk_data_crc 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /dev tmpfs rw,relatime,size=64k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /var/volatile tmpfs rw,relatime 0 0
tmpfs /media/ram tmpfs rw,relatime 0 0
ubi0:usrfs /data ubifs rw,relatime,bulk_read,chk_data_crc 0 0
/dev/ubi1_0 /firmware ubifs rw,relatime,bulk_read,chk_data_crc 0 0
ubi2:userrw /mnt/userrw ubifs rw,sync,relatime,bulk_read,chk_data_crc 0 0
ubi3:hdata /mnt/hdata ubifs ro,relatime,bulk_read,chk_data_crc 0 0
tmpfs /media/drives tmpfs ro,relatime,size=4k 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
var /var tmpfs rw,relatime 0 0
/dev/loop0 /mnt/hdata/licenses squashfs ro,relatime 0 0

I tried poking around /sys/devices/7980000.nand but I'm not as experienced with *NIX systems. I've also tried messing with QPST and similar tools but to no avail.