[colug-432] Assign Mount Points to Existing Partitions

Richard Hornsby richardjhornsby at gmail.com
Fri Aug 22 09:02:37 EDT 2014


On Aug 21, 2014, at 20:52 , tom <thomas.w.cranston at gmail.com> wrote:

> I got notice from K3B that I did not have enough space in /tmp. Using 
> the Disks gui I saw that I had pleanty of room in /tmp, but it was 
> unmounted. I then opened GParted and saw that /dev/sda5 which I 
> partitioned for /tmp and /dev/sda7 which I partitioned for /home was not 
> mounted.
> 
> 
> Partition            File System     Mount Point Size                 
> Used                 Unused            Flags
> /dev/sda1        ext4         / 11.17 GiB                
> 6.51                  4.67 Boot
> /dev/sda2        Extended                                   687.46 GiB
>     /dev/sda5    ext4 13.04 Gib             370.30 MiB          12.68 GiB
>     /dev/sda6    linux-swap                                     4.19 
> GiB                 4.00 KiB             4.19 GiB
>     /dev/sda7    ext4 670.23 GiB             141.24 GiB         528.99 GiB
> 
> This was the first time I did a manual partitioning using an extended 
> scheme. I had always had /tmp and /home as primary partitions before. Is 
> there something about using Extended Partitions that prevent /tmp and 
> /home from having mount points
> 
> Is there a way I can assign them mount points now?


The odd wrapping is making your partition scheme output hard to read.  

try using the shells command 

$ mount

and 

$ fdisk -a

Regardless, where a filesystem (“partition”) is mounted is not dependent on whether the partition is primary, logical, extended or anything else.

A mount point is just a directory.  That’s it.  It really is that simple.  You mount a filesystem to a directory.

If /tmp and /home have filesystems allocated, but the filesystems are not explicitly mounted then it means that they’re using space from whatever parent filesystem they’re on - in this case that is /dev/sda1 which is mounted at /.  That’s likely where the low disk space warning is coming from.

You can certainly “assign” mount points any time you like.  However, before doing that you’ll want to temporarily move the contents of /home to somewhere other than /home.  When you  mount /dev/sda2 (or whatever it is) to /home, the *existing* directory, which lives right now on /, will no longer be accessible.  That’s because you’ve mounted a filesystem at /home, and the OS instead of reading from /dev/sda1/home (that doesn’t actually exist like that, just using it to explain), is now reading /home as /dev/sda2.

After you’ve mounted /dev/sda2 at /home, you can move the archived contents of your /home backup into /home.

Whatever is going on with all the GUI tools you’re using, the underlying cause of /home and /tmp not being mounted properly is in /etc/fstab — or perhaps is what is missing from /etc/fstab.  Take a look at the commands fdisk, mount, and the manpage for /etc/fstab.




More information about the colug-432 mailing list