how to mount drives within /home [resolved]

New to SolydXK? This is the place to start.
Please check the other subforums to see if there's a more suitable place for your question.
User avatar
PendragonUK
Posts: 41
Joined: 14 Apr 2014 17:03
Location: St.Austell, Cornwall

how to mount drives within /home [resolved]

Postby PendragonUK » 04 May 2014 20:48

I have several drives in my system.

sda = SSD 256GB swap, / & /home
sdb = HDD 1TB
sdc = SSD 60GB

I would like to use both the HDD and the smaller SDD have them partitioned and formatted but it's the mount points I need help with. I would like them to be in mounted in home. That is /home/*user*/ in my case /home/stevem/ so if I named the HDD as Data it would be /home/stevem/Data so that the whole drive would be mounted on boot and appear as a location (folder/directory) within my home folder.

In the past I have used the HDD as a recording location and the smaller SSD as a render location, I make videos for Youtube...
Image
Image

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: how to mount drives within /home

Postby ScottQuier » 05 May 2014 11:15

Not too difficult. I do much the same thing on my desktop. I have / and /home on one drive and a second drive is mounted at /home/scott/Data (on that machine, I 'm scott - go figure :) )

Anyway:
  1. Create your mount point

    Code: Select all

    mkdir /home/stevem/Data
  2. Edit your /etc/fstab file to automagically mount your HDD at your newly created folder. There are plenty of examples around on how to format your entry in /etc/fstab. You can find one example at step 14.3 in this post ( http://forums.solydxk.nl/viewtopic.php?f=9&t=1122 ). I took it one step further and made my HDD an optional mount. If the HDD is physically connected and powered it will mount. If it's not, then the system will quielty and without complaint simply ignore that fact.
  3. Once you've added the entry into your /etc/fstab file, you can run

    Code: Select all

    sudo mount -a
    to cause Linux to (re)mount all the storage resources identified in your fstab file without needing to actually reboot the computer. If it works this way, it will also work on reboot - automagically!
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
PendragonUK
Posts: 41
Joined: 14 Apr 2014 17:03
Location: St.Austell, Cornwall

Re: how to mount drives within /home [resolved]

Postby PendragonUK » 05 May 2014 11:53

Thank you, that's got it sorted.

To discover the partition ID

Code: Select all

gksudo blkid
To edit fstab

Code: Select all

gksudo kwrite /etc/fstab
My fstab now looks like this:

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=15ab5135-446c-44cc-a3f5-efe230159a3f	swap	swap	sw	0	0
# /dev/sda2
UUID=63ef3e52-9f91-4904-9165-555ee22bbd97	/	ext4	rw,errors=remount-ro	0	1
# /dev/sda3
UUID=515ef16d-5319-499a-ba6f-311c19d04d30	/home	ext4	rw,errors=remount-ro	0	0
#Entry for /dev/sdb1
UUID=25a3d6b0-db18-40d2-9125-ea17a139f4fe      /home/stevem/Data      ext4     defaults     0     2
#entry for /dev/sdc1
UUID=6542d84f-b6b1-440c-8942-0d94069b3e51      /home/stevem/Scratch    ext4    defults 0 2
Both drives now mount automatically as part of the systems file system. Apart from just making life easer I'm going to have to point Steam to the large HHD before it completely swallows my SSD ;)

Next task lets see if I can record game play, but that's another subject.
Image
Image

ukbrian
Posts: 72
Joined: 01 Mar 2013 04:20

Re: how to mount drives within /home [resolved]

Postby ukbrian » 05 May 2014 12:39

I use a data partition but use the label to mount it in fstab which makes things a lot more readable than UUID's

Code: Select all

LABEL=data	/home/user/data   ntfs-3g  defaults,uid=1000	0      0
You might want to look at Vokoscreen for recording http://www.kohaupt-online.de/hp/

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: how to mount drives within /home [resolved]

Postby ScottQuier » 05 May 2014 14:28

ukbrian wrote:I use a data partition but use the label to mount it in fstab which makes things a lot more readable than UUID's

Code: Select all

LABEL=data	/home/user/data   ntfs-3g  defaults,uid=1000	0      0
Yep - the LABEL/UUID argument has pros/cons on both sides of the question. More easily read is a strong "pro" for using LABEL.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
PendragonUK
Posts: 41
Joined: 14 Apr 2014 17:03
Location: St.Austell, Cornwall

Re: how to mount drives within /home [resolved]

Postby PendragonUK » 09 Sep 2014 11:40

Sorry to reawaken an old thread but... I'm back. :shock:

After some messing about that I'll not go into in much depth now I have just clean installed SolydK on to my workstation.

Faced with some of the same issues as before I found this old thread to re-do my drives as before.

One small snag and I'm sure there is a simple fix as I have made some small mistake somewhere along the way, I don't have write permission on the resulting drive.

Following the instructions in this thread I have a 1TB HDD mounted as a folder within my Home folder.

/home/stevem/Data

The current owner is root, how do I as myself as the owner of this drive/folder?
Image
Image

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: how to mount drives within /home [resolved]

Postby ScottQuier » 09 Sep 2014 13:16

Change the owner:

Code: Select all

sudo chown -R stevem:stevem /home/stevem/Data
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
PendragonUK
Posts: 41
Joined: 14 Apr 2014 17:03
Location: St.Austell, Cornwall

Re: how to mount drives within /home [resolved]

Postby PendragonUK » 09 Sep 2014 13:22

Thank you, I sort of guessed it would be simple...

Now I can get on with Steam and Dropbox :D
Image
Image

nixer
Posts: 18
Joined: 09 Mar 2014 18:05
Location: Laurinburg, NC (USA)

Re: how to mount drives within /home [resolved]

Postby nixer » 09 Sep 2014 15:08

I took it one step further and made my HDD an optional mount. If the HDD is physically connected and powered it will mount. If it's not, then the system will quielty and without complaint simply ignore that fact.
A quick question... this was casually mentioned in a post above and it caught my eye. I read through this thread and I can't see where this quote came into play. I would like to mount external devices with fstab but the times before when I did this, the boot would stop if they were not powered on. So, I depend on mounting devices in file manager.

How can this be implemented in fstab, so that the boot does not fail if the devices are not plugged in or on? If the answer is obvious, then I apologize but I can't see it.

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: how to mount drives within /home [resolved]

Postby ScottQuier » 09 Sep 2014 15:48

nixer wrote:
I took it one step further and made my HDD an optional mount. If the HDD is physically connected and powered it will mount. If it's not, then the system will quielty and without complaint simply ignore that fact.
A quick question... this was casually mentioned in a post above and it caught my eye. I read through this thread and I can't see where this quote came into play. I would like to mount external devices with fstab but the times before when I did this, the boot would stop if they were not powered on. So, I depend on mounting devices in file manager.

How can this be implemented in fstab, so that the boot does not fail if the devices are not plugged in or on? If the answer is obvious, then I apologize but I can't see it.
Use the option "nofail":
nofail -- Do not report errors for this device if it does not exist.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 4 guests