Announcement

Collapse
No announcement yet.

Add 2nd hard drive

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Add 2nd hard drive

    I've done this on a couple older builds but apparently I've yet to master the craft.

    I followed the directions here, which may have been my first mistake. Now that I'm reflecting on the error of my ways, I'm wondering what was the point of mkdir /hdd? What's wrong with /media? Anyway I made /hdd, added the appropriate line to fstab, and mounted /hdd. After all that I did not have permission to use the hard drive, and while after rebooting it showed up automatically in Dolphin, it didn't show up in Firefox or LibreOffice.

    After that I had the brilliant idea of seeing how the 2nd hard drive was configured in fstab on this (different) computer, and it uses the uuid instead of /dev/sdb1. So I found the uuid of the 2nd hard drive on my new build, and changed the relevant line in fstab to -

    Code:
    UUID=bda34309-f98a-40aa-9c95-28535a706b60    /hdd    ext4    defaults    0    0
    That didn't help so I tried this one -

    Code:
    UUID=bda34309-f98a-40aa-9c95-28535a706b60    /hdd    ext4    uid=1000,gid=1000,umask=007    0    2
    That one put me into maintenance mode, so I've commented it out.

    My current fstab is this -

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda2 during installation
    UUID=0d0a219a-ea2a-4eb6-bf2a-c1a45d152346 /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/sda1 during installation
    UUID=FCD7-1393  /boot/efi       vfat    umask=0077      0       1
    # swap was on /dev/sda3 during installation
    UUID=995695c4-3e9a-474c-92ab-2f3f10f804f8 none            swap    sw              0       0
    #UUID=bda34309-f98a-40aa-9c95-28535a706b60    /hdd    ext4    uid=1000,gid=1000,umask=007    0    2
    The goal is to have it just work in every program after boot. How do I get there?
    Last edited by Jeremy_Ray; Jun 07, 2016, 09:37 AM.

    #2
    The problem is you're mounting a linux file system with options that are for non-linux filesystems. GID and UID are not used for ext4, instead use "auto" to mount it at every bootup and change the permissions of the mountpoint (after mounting) to what ownership and permissions you want. Here's a good explanation: http://www.omaroid.com/fstab-permiss...sks-explained/

    So do this:

    Edit fstab and change the last line to:
    Code:
    UUID=bda34309-f98a-40aa-9c95-28535a706b60    /hdd    ext4    defaults    0    2
    Then:
    Code:
    sudo mount -a
    sudo chown 1000:1000 /hdd
    chmod 0770 /hdd
    and that should do it.

    BTW, there's no reason to use "/hdd" at all. You can mount anything just about anywhere you want. /media is normally reserved for removable media and /mnt is normally used for additional fixed devices mounted via fstab but it's your system so mount where ever you want.

    Please Read Me

    Comment


      #3
      I mount my network shares via a login script rather than in fstab, after all they may not be there all the time. Each user has a folder on the server and has the appropriate lines in their .profile. The shares are mounted as the "Remote" directory under their home and we have a common folder which mounted the users "Shared" directory. The users have to be added to the fuser group.
      I'm sure you can also do this with mount but I'm not sure what group you would add them to.
      If you're sitting wondering,
      Which Batman is the best,
      There's only one true answer my friend,
      It's Adam Bloody West!

      Comment


        #4
        Thanks, that did it!

        Comment

        Working...
        X