LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2022, 10:03 AM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894

If possible boot a USB live version of gparted on your PC.
https://gparted.org/livecd.php
 
Old 04-12-2022, 10:11 AM   #17
Colombia
Member
 
Registered: Oct 2021
Posts: 72

Original Poster
Rep: Reputation: Disabled
yet I have problems:
Code:
[root@localhost /]# lvextend -L4G /dev/mmcblk0p3
-bash: lvextend: command not found
[root@localhost /]# yum -y install lvextend
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.cedia.org.ec
 * centos-kernel: mirror.cedia.org.ec
 * extras: mirror.cedia.org.ec
 * updates: mirror.cedia.org.ec
No package lvextend available.
Error: Nothing to do
[root@localhost /]#
(https://access.redhat.com/documentat...tion/lv_extend)

Last edited by Colombia; 04-12-2022 at 10:13 AM.
 
Old 04-12-2022, 10:27 AM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Your not using LVM.

Have you tried running a live USB version of gparted?
 
Old 04-12-2022, 10:45 AM   #19
Colombia
Member
 
Registered: Oct 2021
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Colombia View Post
yes!!
so please: how I do this?
the "trick" is use growpart:
Code:
[root@localhost /]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0  7.3G  0 disk
├─mmcblk0p2 179:2    0  488M  0 part [SWAP]
├─mmcblk0p3 179:3    0  1.7G  0 part /
└─mmcblk0p1 179:1    0  286M  0 part /boot


[root@localhost /]# growpart /dev/mmcblk0 3
CHANGED: partition=3 start=1593344 old: size=3516416 end=5109760 new: size=13684703 end=15278047


[root@localhost /]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0  7.3G  0 disk
├─mmcblk0p2 179:2    0  488M  0 part [SWAP]
├─mmcblk0p3 179:3    0  6.5G  0 part /
└─mmcblk0p1 179:1    0  286M  0 part /boot
[root@localhost /]#
but the command "growpart /dev/mmcblk0 3" take ALL "free space", how I can resize in only 2GB and have the rest of disk as "OTHER partition" ?
 
Old 04-12-2022, 11:15 AM   #20
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
You resized the partition but I do not think you resized the filesystem.

One way would be to delete partition 3 and create a new one the desired size starting at the exact same spot. Nothing will happen to the filesystem. Then use resize2fs to enlarge the filesystem.
 
Old 04-12-2022, 11:50 AM   #21
Colombia
Member
 
Registered: Oct 2021
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
You resized the partition but I do not think you resized the filesystem
100 true!!

I am desperated, when I run
Code:
reboot
then AGAIN:
Code:
[root@localhost csf]# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/root      ext4      1.7G  1.5G  104M  94% /
devtmpfs       devtmpfs  430M     0  430M   0% /dev
tmpfs          tmpfs     463M     0  463M   0% /dev/shm
tmpfs          tmpfs     463M   12M  451M   3% /run
tmpfs          tmpfs     463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1 vfat      286M   50M  237M  18% /boot
tmpfs          tmpfs      93M     0   93M   0% /run/user/0
[root@localhost csf]#
why ??...

please: how I can ASIGN only 2GB to my "hard disk" ?? (/dev/root or /mmcblk0/mmcblk0p3)
 
Old 04-12-2022, 12:21 PM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
why?...
Because your not paying attention or understanding what is posted.

A partition is nothing more then a container that defines limits of a filesystem. When a filesystem is created the mkfs tool by default uses the entire size of the partition. Resizing is actually two steps, changing the size of the filesystem and changing the size of the partition.

growpart only resizes the partition to use adjacent unallocated space. It does not increase the size of the filesystem.

There is some risk involved but it is doable.

1. Using fdisk delete partition 3. You are just deleting location of the partition in the table but not the filesystem itself.

2. Using fdisk create a new partition 3. Its starting point should be the same as the old one. Define the end as 2GB. You might have to reboot for the kernel to see the new partition.

3. Use resize2fs to resize2fs the filesystem. ext4 filesystems can be resized larger regardless if it is active.
 
Old 04-12-2022, 05:15 PM   #23
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
You have already been told how, repeatedly.

1. Take the sd card to a different machine (probably with a USB card reader)
2. Use gparted (or equivalent) to expand the partition and file system
3. Put the card back into the device where it boots and you will be happy

Most systems will not allow altering the root partition when it is in use so that explains why you cannot do that from the running system booted from that card.
 
Old 04-12-2022, 08:50 PM   #24
Colombia
Member
 
Registered: Oct 2021
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Because your not paying attention or understanding what is posted...
Quote:
Originally Posted by computersavvy View Post
You have already been told how, repeatedly...
many thanks and SO SORRY,
maybe my english is SO POOR...

I will re-read ALL again.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
For Sales. Iphone 8gb Nokia n95 8gb Lrg Sidekick 3 Iphone 4g bigbrother1 Linux - Enterprise 2 01-30-2008 12:49 PM
For Sales. Iphone 8gb Nokia n95 8gb Lrg Sidekick 3 Iphone 4g bigbrother1 Linux - Newbie 1 01-28-2008 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration