[plug] Resizing an EXT4 filesystem

Richard Meyer meyerri at gardenshark.org
Thu Nov 9 16:18:36 AWST 2017


Hi all,

Finally a gutsy Linux question (sans networks or printers).

I have a large-ish hard drive and have a partition I want to enlarge.

Let's say it looks like this




> fdisk /dev/sdc -l
> 
> Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x0002e0d1
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1            2048    31455231    15726592   83  Linux
> /dev/sdc2        31455232  3907028991  1937786880    f  W95 Ext'd (LBA)
> /dev/sdc5        31457280    39841791     4192256   82  Linux swap / Solaris
> /dev/sdc6        39843840   459266047   209711104   83  Linux
> /dev/sdc7       459266283  2302467929   921600823+  83  Linux



When checking out the disk and looking for free space, I did this



> fdisk /dev/sdc 
> 
> Command (m for help): p
> 
> Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x0002e0d1
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1            2048    31455231    15726592   83  Linux
> /dev/sdc2        31455232  3907028991  1937786880    f  W95 Ext'd (LBA)
> /dev/sdc5        31457280    39841791     4192256   82  Linux swap / Solaris
> /dev/sdc6        39843840   459266047   209711104   83  Linux
> /dev/sdc7       459266283  2302467929   921600823+  83  Linux
> 
> Command (m for help): h
> h: unknown command
> Command action
>    a   toggle a bootable flag
>    b   edit bsd disklabel
>    c   toggle the dos compatibility flag
>    d   delete a partition
>    l   list known partition types
>    m   print this menu
>    n   add a new partition
>    o   create a new empty DOS partition table
>    p   print the partition table
>    q   quit without saving changes
>    s   create a new empty Sun disklabel
>    t   change a partition's system id
>    u   change display/entry units
>    v   verify the partition table
>    w   write table to disk and exit
>    x   extra functionality (experts only)
> 
> Command (m for help): n
> Partition type:
>    p   primary (1 primary, 1 extended, 2 free)
>    l   logical (numbered from 5)
> Select (default p): l
> Adding logical partition 8
> First sector (2302469978-3907028991, default 2302469978): 
> Using default value 2302469978
> Last sector, +sectors or +size{K,M,G} (2302469978-3907028991, default 3907028991): 
> Using default value 3907028991
> 
> Command (m for help): q


So there's a lot of free space behind sdc7

Now, my question is - how do I grow sdc7 to contain all that space and get the ext4 filesystem to recognise it?

Thanks in advance.




-- 
Richard Meyer

As the ghost of a sceptic, I tend to stay pretty quiet.

Linux Counter user #306629
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/e7d8d862/attachment.html>


More information about the plug mailing list