0

I use my computer with Debian 9 for Java Spark development. Spark is a Big Data API and these kind of works use more temporary space than the 2G that by default the Debian installation sat.

marc@bouleau:/data$ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
udev                15G       0   15G   0% /dev
tmpfs              3,0G    9,7M  3,0G   1% /run
/dev/sda1           23G    9,7G   12G  45% /
tmpfs               15G     29M   15G   1% /dev/shm
tmpfs              5,0M    4,0K  5,0M   1% /run/lock
tmpfs               15G       0   15G   0% /sys/fs/cgroup
/dev/sda5          9,2G    2,3G  6,4G  26% /var
/dev/sda7          1,9G    6,0M  1,7G   1% /tmp
/dev/sdb1          1,8T     85G  1,7T   5% /data
/dev/sda8          171G     77G   85G  48% /home
tmpfs              3,0G     16K  3,0G   1% /run/user/115
tmpfs              3,0G     64K  3,0G   1% /run/user/1000

But currently I can't resize it by using a mount command : the relying filesystem isn't large enough. It appears that I have to reduce one filesystem and extends another, or give /tmp another mount point.

I've installed gparted. But using it in my GNOME session, it doesn't offer me to resize anything : I mean : for /dev/sdb1 for example where I have 1,8T the resize options show for constants :
minimal size : 1,8T, maximal size : 1,8T
and therefore I can't change anything.

What is happening that makes gparted unable to changes my filesystems sizes ?
What is the simpliest (and the safer way) to solve my problem ?

The output of lsblk is :

marc@bouleau:/data$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238,5G  0 disk 
├─sda1   8:1    0  23,3G  0 part /
├─sda5   8:5    0   9,3G  0 part /var
├─sda6   8:6    0    30G  0 part [SWAP]
├─sda7   8:7    0   1,9G  0 part /tmp
└─sda8   8:8    0   174G  0 part /home
sdb      8:16   0   1,8T  0 disk 
└─sdb1   8:17   0   1,8T  0 part /data
sr0     11:0    1  1024M  0 rom  
1

On Linux you cannot change partitions on a drive that is mounted. You will need to boot from a live usb [1], and first make more space by making /swap smaller from the end point (it looks too big anyway unless you have more than 15 Gb of ram). Otherwise make /home smaller from the start. You can then expand /tmp into the empty space.

With that said, I'm not sure that expanding /tmp is the best solution to your problem. I'm not familiar with Java development or spark but maybe you can set a directory in /home to work as temporary space.

  • That's a clever alternative, thanks ! – Marc May 18 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.