My PC has two SSDs (120GB and 465GB), the smaller SSD is mounted on / and currently the larger SSD is mounted on /tmp. Output of df -h
:
Filesystem Size Used Avail Use% Mounted on
udev 12G 0 12G 0% /dev
tmpfs 2.4G 114M 2.3G 5% /run
/dev/sda1 101G 88G 8.1G 92% /
tmpfs 12G 130M 12G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/sdb5 459G 73M 435G 1% /tmp
tmpfs 2.4G 112K 2.4G 1% /run/user/1001
I have quite limited experience in doing this so I'm just looking for the easiest way of re-allocating space from the larger SSD to / or to /home from /tmp.
(Note: I didn't create this set-up myself, there was a previous user who mounted the drives in this way.)
fdisk -l
output:
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 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
Disklabel type: dos
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 214843391 214841344 102.5G 83 Linux
/dev/sda2 214845438 250068991 35223554 16.8G 5 Extended
/dev/sda5 214845440 250068991 35223552 16.8G 82 Linux swap / Solaris
Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2046 976771071 976769026 465.8G 5 Extended
/dev/sdb5 2048 976771071 976769024 465.8G 83 Linux
cp
has completed; I'ddiff
to ensure they copied correctly; thenrm
only if you're happy; yes you couldmv
but the addeddiff
compare step makes me happier). then modify your/etc/fstab
to reflect your new chosen layout & reboot your normal ubuntu os. – guiverc Nov 16 '17 at 11:35