Announcement

Collapse
No announcement yet.

Second hard drive - can be seen, but not used?

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

    Second hard drive - can be seen, but not used?

    I'm booting off a small SSD and have a 2nd internal hard drive for mass storage. I thought I could hook up the blank drive and it would work for storage, but apparently not. I ran KDE Partition Editor and created one big partition on it. My mistake here may have been using the ext2 file system instead of ext4, which IIRC the SSD uses. After creating the partition, the hard drive shows up in Dolphin but I can't copy files to it.

    I tried running KDE Partition Editor, but it won't let me make any changes.

    ??

    I need this puppy working.

    #2
    Hi,

    As far as I'm aware there's nothing wrong with what you are trying to achieve. I'm guessing the reason Dolphin won't let you copy any files is a permissions issue and that read/write access is currently restricted to the root user.

    Also ext4 is better so before you do anything else I'd delete the ext2 partition and re-create it as ext4.

    You'll need to unmount the partition using the partition manager before you can make any changes, right-click on the ext2 partition and select unmount, you should then be able to delete it and start all over again this time creating it in ext4, give the partition a label while you are at it.

    If you get this far then the next step will be to add your partition to fstab so that it is mounted and available for use when you start your system.
    Kubuntu 20.04(AMD64)/KDE 5

    Comment


      #3
      I've recreated the new partion as ext4, and added a new line to /etc/fstab. Still getting the same problem.

      Here's my fstab -

      proc /proc proc nodev,noexec,nosuid 0 0
      # / was on /dev/sda1 during installation
      UUID=3c4e03a7-9af8-4cb9-8a26-c60124dc2166 / ext4 errors=remount-ro 0 1
      # /boot was on /dev/sda5 during installation
      UUID=d02ea622-2681-4389-8077-3aa376fba0c1 /boot ext4 defaults 0 2
      # /home was on /dev/sda8 during installation
      UUID=9bad3042-38a6-4d2c-81cf-244141e3f2dd /home ext4 defaults 0 2
      # /tmp was on /dev/sda6 during installation
      UUID=a95b726d-cc5e-4da5-a6fc-27bec79cf233 /tmp ext4 defaults 0 2
      # /usr was on /dev/sda7 during installation
      UUID=e901ae69-8e52-42ab-a0a2-363c484e7955 /usr ext4 defaults 0 2
      # swap was on /dev/sda9 during installation
      UUID=bac326c0-dbcf-4f96-bff3-3135838a72c4 none swap sw 0 0
      # 2nd hard drive
      UUID=b0ef4b51-acaf-4b46-a13a-efe53957dd40 /media/manon ext4 rw,auto,user,sync,exec 0 0
      Where did I go wrong?

      Comment


        #4
        First off, whether or not you can access a file system has nothing to do with it's format or partition manager. Accessing (or not) is a permission issue. The permissions for the mounted directory need to be accessible by your user.

        Please Read Me

        Comment


          #5
          Doesn't this line give the user permissions?

          UUID=b0ef4b51-acaf-4b46-a13a-efe53957dd40 /media/manon ext4 rw,auto,user,sync,exec 0 0

          Comment


            #6
            No. "user" in fstab line allows a non-root user to mount the partition. The permissions of /media/manon dictate who can access the file system. Unmount the drive, change the ownership and/or permissions of /media/manon and then re-mount the drive. That should work.

            Please Read Me

            Comment


              #7
              Is that right? I think the permissions of the mount point, when the volume is unmounted, don't make a difference. If it's ext* the permissions are controlled inside volume and (personal observation) the root of the files. I think you will have to do it while mounted, and you will have to use sudo to make the change (because by default it will be owned by root).

              What I usually do with ext4 volumes is to make a subdirectory ('data' or something) that I own.

              Or else you could override everything via the umask setting in mount / fstab.
              I'd rather be locked out than locked in.

              Comment


                #8
                Which of these solutions is going to stick? I don't want to have to reset permissions every time I boot.

                What would my fstab line look like with umask set?

                Comment


                  #9
                  Originally posted by Jeremy_Ray View Post
                  Which of these solutions is going to stick? I don't want to have to reset permissions every time I boot.
                  Both, but which to use depends on the filesystem:
                  umask (and other "mask" options) are used with non-posix filesystems (like fat and ntfs) where ownerships and permissions are set at mount time.

                  With posix filesystems (like ext4) ownerships and permissions are stored within the filesystem, so you can change them at will while the filesystem is mounted (the changes you make will live through remounts/reboots).

                  So with an ext4 filesystem, use chmod (and chown) to change permissions (and ownerships)...you can also start dolphin as root (kdesudo dolphin) and change the permissions/ownerships via GUI.

                  Comment


                    #10
                    This still points to permissions, in your original post you said the drive shows up in Dolphin but you can't use it - I'm assuming you are back at this point again.

                    When you created the mountpoint for your new partition did you set its ownership and permissions?

                    Here's the process I follow:

                    Create the mountpoint:
                    sudo mkdir -p /media/manon

                    Set the ownership and permissions:
                    sudo chown -R nick /media/manon (replace 'nick' with your username)
                    sudo chmod -R 777 /media/manon (chmod 755 is also ok, chmod 777 gives complete access to all)

                    Then add the entry to fstab:
                    UUID=b0ef4b51-acaf-4b46-a13a-efe53957dd40 /media/manon ext4 rw,auto,user,sync,exec 0 0

                    In my case my fstab entry is a bit simpler:
                    LABEL="BackupDrive" /media/BackupDrive ext4 user 0 0

                    Hope this helps.

                    Nick
                    Kubuntu 20.04(AMD64)/KDE 5

                    Comment


                      #11
                      Originally posted by quarkslot View Post
                      Create the mountpoint:
                      sudo mkdir -p /media/manon

                      Set the ownership and permissions:
                      sudo chown -R nick /media/manon (replace 'nick' with your username)
                      sudo chmod -R 777 /media/manon (chmod 755 is also ok, chmod 777 gives complete access to all)
                      You don't usually (with a few exceptions) need to change the mount point permissions, once a filesystem is mounted on the mount point, the root permissions/ownerships of the mounted filesystem take over (effectively "masking out" the permissions/ownerships of the mount point).

                      To change permissions/ownerships of a posix filesystem, you'll want to run chmod/chown on a mounted filesystem (and not the mount point)

                      Comment


                        #12
                        Problem solved. I started Dolphin as root, went into permissions>advanced permissions>add entry, and added an entry for myself with full permissions.

                        Thanks for everyone's help!

                        Comment


                          #13
                          Originally posted by Jeremy_Ray View Post
                          Problem solved. I started Dolphin as root, went into permissions>advanced permissions>add entry, and added an entry for myself with full permissions.
                          Using acl (access control list) in the advanced permissions dialog is somewhat unorthodox for the task, most people would probably just change the owner/group and/or permissions to their liking in the "regular" permissions dialog, but you can of course use acl if you wish.

                          Comment


                            #14
                            "Regular" permissions are grayed out, starting Dolphin with sudo. Doesn't seem like they should be, does it?

                            Comment


                              #15
                              Well, first of all you shouldn't launch dolphin with sudo, rather use "kdesudo". this prevents root taking ownership of configuration files in your home directory. Only use sudo for non-gui commands and use kdesudo for GUI apps. I don't know if this is the cause of your problem or not, could be.

                              Another, cleaner way to do this is to install the rootactions-servicemenu http://kde-apps.org/content/show.php?content=48411 which gives you root access via the right-click dialog.

                              Please Read Me

                              Comment

                              Working...
                              X