[plug] Resizing an EXT4 filesystem
Nicholas Lloyd - HESWA
nic at heswa.com.au
Thu Nov 9 16:30:11 AWST 2017
Hi Richard,
This may be helpful to you. https://wiki.archlinux.org/index.php/GNU_Parted#Resizing_partitions
You need to make sure file system isn’t mounted, resize the partition, then resize the filesystem.
Kind regards,
<http://www.heswa.com.au/> HESWA
HESWA
<https://plus.google.com/107945848640973246037> Google Plus/ <http://www.linkedin.com/company/hoisting-equipment-specialists-WA> Linkedin/ <https://www.facebook.com/HESWA-1152824791400604/> Google Plus
https://s3.amazonaws.com/htmlsig-assets/spacer.gif
Nicholas Lloyd
General Manager
<mailto:nic at heswa.com.au> nic at heswa.com.au
Mobile: 0425 635 555
<http://www.heswa.com.au/> HESWA
<http://www.heswa.com.au/> http://www.heswa.com.au/
<http://www.heswa.com.au/> elogo
elogo Please consider the environment before printing this e-mail!
From: plug [mailto:plug-bounces at plug.org.au] On Behalf Of Richard Meyer
Sent: Thursday, 9 November 2017 4:19 PM
To: PLUG
Subject: [plug] Resizing an EXT4 filesystem
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/dd3ae5c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8028 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 14446 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1442 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 167 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1177 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1174 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.gif
Type: image/gif
Size: 1097 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 16736 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.jpg
Type: image/jpeg
Size: 16559 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 1767 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20171109/dd3ae5c2/attachment-0007.png>
More information about the plug
mailing list