Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]resize root partition . is that possible?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sat Aug 19, 2017 10:53 am    Post subject: [SOLVED]resize root partition . is that possible? Reply with quote

he there
my partition map is this:
Code:
Fujitsu ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698.7G  0 disk
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0   8.5G  0 part
├─sda6   8:6    0    40G  0 part /
└─sda7   8:7    0   650G  0 part /home
sr0     11:0    1  1024M  0 rom 
Fujitsu ~ # df -h
Filesystem             Size  Used Avail Use% Mounted on
udev                    10M  4.0K   10M   1% /dev
/dev/sda6               40G   33G  4.3G  89% /
tmpfs                  582M  1.3M  581M   1% /run
shm                    2.9G     0  2.9G   0% /dev/shm
cgroup_root             10M     0   10M   0% /sys/fs/cgroup
/dev/sda1              197M   52M  146M  27% /boot
/dev/sda7              639G   70G  538G  12% /home
none                   2.9G     0  2.9G   0% /run/user/1000
//192.168.1.13/500gig  466G  178G  289G  39% /home/saeb/SharedHdd
Fujitsu ~ #


now I have problem with updating firefox and libreoffice cuz of few space in root partition, details are here

Code:
https://forums.gentoo.org/viewtopic-t-1067880-highlight-.html


My question is it possible to mount /var and /src in /home partition or resize root partition ?
_________________
I`m noob and I have a jillion question


Last edited by saeb on Sun Aug 20, 2017 2:05 am; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7348
Location: Goose Creek SC

PostPosted: Sat Aug 19, 2017 2:14 pm    Post subject: Reply with quote

very possible if filesystem is not excessively exotic
recommend boot a sysresccd to xfce4 and use gparted from there
_________________
Defund the FCC.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 15738
Location: here

PostPosted: Sat Aug 19, 2017 2:35 pm    Post subject: Reply with quote

DONAHUE wrote:
very possible if filesystem is not excessively exotic
recommend boot a sysresccd to xfce4 and use gparted from there

And backup your important data if something goes wrong
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sat Aug 19, 2017 3:56 pm    Post subject: Reply with quote

DONAHUE wrote:
very possible if filesystem is not excessively exotic
recommend boot a sysresccd to xfce4 and use gparted from there


fedeliallalinea wrote:

And backup your important data if something goes wrong


Just resize with bootable gparted ? thats it ? ill try tonight
_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 202

PostPosted: Sat Aug 19, 2017 4:22 pm    Post subject: Reply with quote

Careful. Don't move the starting block of thte partition. Else you lose the metadata of the partition and thus your files.
Back to top
View user's profile Send private message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sat Aug 19, 2017 4:34 pm    Post subject: Reply with quote

bstaletic wrote:
Careful. Don't move the starting block of thte partition. Else you lose the metadata of the partition and thus your files.

So I must decreese from end of /home partition and resize end of /root ? is that possible?
Code:
 saeb@Fujitsu  ~  lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698.7G  0 disk
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0   8.5G  0 part
├─sda6   8:6    0    40G  0 part /
└─sda7   8:7    0   650G  0 part /home
sdc      8:32   1   1.9G  0 disk
└─sdc1   8:33   1   1.9G  0 part
sr0     11:0    1  1024M  0 rom 
 saeb@Fujitsu  ~ 

_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 165
Location: Brisbane, Australia

PostPosted: Sat Aug 19, 2017 5:21 pm    Post subject: Re: resize root partition . is that possible? Reply with quote

saeb wrote:
he there
my partition map is this:
Code:
Fujitsu ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698.7G  0 disk
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0   8.5G  0 part
├─sda6   8:6    0    40G  0 part /
└─sda7   8:7    0   650G  0 part /home
sr0     11:0    1  1024M  0 rom 
Fujitsu ~ # df -h
Filesystem             Size  Used Avail Use% Mounted on
udev                    10M  4.0K   10M   1% /dev
/dev/sda6               40G   33G  4.3G  89% /
tmpfs                  582M  1.3M  581M   1% /run
shm                    2.9G     0  2.9G   0% /dev/shm
cgroup_root             10M     0   10M   0% /sys/fs/cgroup
/dev/sda1              197M   52M  146M  27% /boot
/dev/sda7              639G   70G  538G  12% /home
none                   2.9G     0  2.9G   0% /run/user/1000
//192.168.1.13/500gig  466G  178G  289G  39% /home/saeb/SharedHdd
Fujitsu ~ #


now I have problem with updating firefox and libreoffice cuz of few space in root partition, details are here

Code:
https://forums.gentoo.org/viewtopic-t-1067880-highlight-.html


My question is it possible to mount /var and /src in /home partition or resize root partition ?


I have 40G and root partition and occasionally the same problem. My solution is to get rid of gunk in the root partition:
- delete all log files in /var/log and sub directories except emerge.log.
- delete unused kernels from /boot/grub/grub.conf. (grub-static).
- emerge and run app-admin/eclean-kernel. This will delete all kernel and related files not listed in grub.conf.
- change to /usr/src/linux and run 'make clean'. (This cleans out about 4G to 5G.)
run 'rm -R /usr/portage/* (This deletes all ebuilds and distfiles. Can't remember the name of the utility that cleans out superseded distfiles.)

update your system with:
emerge --sync (This installs current ebuilds)
emerge --update --deep --with-bdeps=y --newuse --backtrack=300 --changed-deps=y --keep-going=y @world -va
If necessary fix blockers and run again.
Then run:
emerge --depclean
revdep-rebuild

The last time I got rid of about 25G gunk.
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 539
Location: Arlington, TX, US

PostPosted: Sat Aug 19, 2017 5:26 pm    Post subject: Reply with quote

It might be easier to just find some big directory in / - maybe /usr/portage, for example - and move that to the /home partition, and then bind mount it.

... or set PORTAGE_TMPDIR in /etc/portage/make.conf to a directory in the /home partition (it defaults to /var/tmp).
Back to top
View user's profile Send private message
russK
Guru
Guru


Joined: 27 Jun 2006
Posts: 498

PostPosted: Sat Aug 19, 2017 6:44 pm    Post subject: Reply with quote

saeb wrote:
bstaletic wrote:
Careful. Don't move the starting block of thte partition. Else you lose the metadata of the partition and thus your files.

So I must decreese from end of /home partition and resize end of /root ? is that possible?
Code:
 saeb@Fujitsu  ~  lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698.7G  0 disk
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0   8.5G  0 part
├─sda6   8:6    0    40G  0 part /
└─sda7   8:7    0   650G  0 part /home
sdc      8:32   1   1.9G  0 disk
└─sdc1   8:33   1   1.9G  0 part
sr0     11:0    1  1024M  0 rom 
 saeb@Fujitsu  ~ 


Essentially you are going to make /home smaller and / larger.
Need to emphasize the need for a backup here, perhaps a USB drive or stick. bstaletic is saying don't move the start block of '/'
There are many references found on google regarding resizing root with gparted.

Section_8 had a good suggestion for avoiding the whole resize.
For next time you do an install, consider using lvm. This situation is exactly why I started using lvm for all my filesystems. Resizing is easy.
Back to top
View user's profile Send private message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sun Aug 20, 2017 2:03 am    Post subject: Reply with quote

with bootable gparted I changed start of /home partition and end of /
Code:
Fujitsu /home/saeb # df
Filesystem            1K-blocks      Used Available Use% Mounted on
udev                      10240         4     10236   1% /dev
/dev/sda6              86932544  31350856  51136044  39% /
tmpfs                    595852      1232    594620   1% /run
shm                     2979244        32   2979212   1% /dev/shm
cgroup_root               10240         0     10240   0% /sys/fs/cgroup
/dev/sda1                201633     52857    148777  27% /boot
/dev/sda7             623866480  72510380 519595728  13% /home
//192.168.1.13/500gig 488375968 185930644 302445324  39% /home/saeb/SharedHdd
none                    2979244         0   2979244   0% /run/user/1000
Fujitsu /home/saeb # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698.7G  0 disk
├─sda1   8:1    0   200M  0 part /boot
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0   8.5G  0 part
├─sda6   8:6    0  84.5G  0 part /
└─sda7   8:7    0 605.5G  0 part /home
sr0     11:0    1  1024M  0 rom 
Fujitsu /home/saeb #

_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sun Aug 20, 2017 2:08 am    Post subject: Re: resize root partition . is that possible? Reply with quote

C5ace wrote:

I have 40G and root partition and occasionally the same problem. My solution is to get rid of gunk in the root partition:
- delete all log files in /var/log and sub directories except emerge.log.
- delete unused kernels from /boot/grub/grub.conf. (grub-static).
- emerge and run app-admin/eclean-kernel. This will delete all kernel and related files not listed in grub.conf.
- change to /usr/src/linux and run 'make clean'. (This cleans out about 4G to 5G.)
run 'rm -R /usr/portage/* (This deletes all ebuilds and distfiles. Can't remember the name of the utility that cleans out superseded distfiles.)

update your system with:
emerge --sync (This installs current ebuilds)
emerge --update --deep --with-bdeps=y --newuse --backtrack=300 --changed-deps=y --keep-going=y @world -va
If necessary fix blockers and run again.
Then run:
emerge --depclean
revdep-rebuild

The last time I got rid of about 25G gunk.


make clean doesnt work for me

Code:
Fujitsu /usr/src/linux # pwd
/usr/src/linux
Fujitsu /usr/src/linux # make clean
make: *** No rule to make target 'clean'.  Stop.
Fujitsu /usr/src/linux # ls
arch    drivers   init    mm               net       System.map  vmlinux-gdb.py
block   firmware  ipc     modules.builtin  scripts   usr         vmlinux.o
certs   fs        kernel  modules.order    security  virt
crypto  include   lib     Module.symvers   sound     vmlinux
Fujitsu /usr/src/linux # cd ..
Fujitsu /usr/src # cd linux
linux/               linux-4.12.2-gentoo/ linux-4.9.34-gentoo/
linux-4.12.0-gentoo/ linux-4.12.7-gentoo/
Fujitsu /usr/src # cd linux-4.9.34-gentoo/
Fujitsu /usr/src/linux-4.9.34-gentoo # make clean
make: *** No rule to make target 'clean'.  Stop.
Fujitsu /usr/src/linux-4.9.34-gentoo # uname -r
4.9.34-gentoo

Fujitsu /usr/src/linux-4.9.34-gentoo # cd ..
Fujitsu /usr/src # du -sh *
0   linux
16K   linux-4.12.0-gentoo
16K   linux-4.12.2-gentoo
849M   linux-4.12.7-gentoo
6.1G   linux-4.9.34-gentoo
Fujitsu /usr/src #

_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
saeb
n00b
n00b


Joined: 13 Apr 2017
Posts: 44
Location: iran

PostPosted: Sun Aug 20, 2017 2:10 am    Post subject: Reply with quote

russK wrote:

Section_8 had a good suggestion for avoiding the whole resize.
For next time you do an install, consider using lvm. This situation is exactly why I started using lvm for all my filesystems. Resizing is easy.


I`ll try that , tnx
_________________
I`m noob and I have a jillion question
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum