Results 1 to 9 of 9

Thread: Created BTRFS on external SSD - what now?

  1. #1

    Default Created BTRFS on external SSD - what now?

    Hi,

    just received my new 500GB SSD that I want to use as a quick back up driver.
    Steps I have followed so far:
    1. Create a BTRFS on sdb using Yast partitioner with the options:
    - mount point /run/media/david/SSD
    - can be mounted by user
    - do not mount at system startup
    I have also changed the owner of the created mountpoint to my user.
    2. Plug in the drive, it gets mounted but I cannot write on it.
    Also my aforementioned options seem to have vanished (now it the boxes are unticked for "can be mounted by..." and "do not mount at...".

    What have I done wrong and what's the right way to set up the external partition?
    I want this SSD to be treated as a external storage, but with a meaningful name, like "SSD"

    Thanks a lot

  2. #2

    Default Re: Created BTRFS on external SSD - what now?

    Weird, it shows as "rw", yet I still cannot write on it:

    Code:
    /dev/sdb1 on /run/media/user/SSD type btrfs (rw,nosuid,nodev,noexec,relatime,space_cache,subvolid=5,subvol=/,user)

  3. #3
    Join Date
    Jul 2008
    Location
    Toronto, Canada
    Posts
    1,255

    Default Re: Created BTRFS on external SSD - what now?

    Rather than using BTRFS for a backup drive I would use XFS. I used GParted boot disk and formatted my entire drive using XFS. This is what I did with my backup drive.
    Assign 7% of your drive as unformatted. The SSD drive requires this and you'll use the command fstrim -v /dev/SSD once a week to trim it.
    Boot to openSUSE desktop and open konsole or xterm. Log in by typing in "su -" without the quotes.

    Type in:
    Code:
    blkid
    and add the UUID to /etc/fstab. I added noatime instead of relatime. You can use "defaults noatime" for /etc/fstab.
    The UUID line for your SSD drive should also have a dev name. Copy it also to /etcfstab so the OS can identify it including the UUID.


    Good Luck!
    My Linux Box
    OS:
    openSUSE 52.2 - Plasma 5.18.9
    OS:
    Tumbleweed Plasma 5.22
    ASUS P5Q | Intel Quad 6600 @3.02 GHz | 8GB G.SKILL RAM | Nvidia GeForce 750 Ti

  4. #4

    Default Re: Created BTRFS on external SSD - what now?

    Just out of curiosity:

    If this is an external USB drive why not format it as xfs and then just plug it in when logged in as the user? It will mount under /run/media/david/<unique ID> using autofs

    You should then be good to go.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  5. #5
    Join Date
    Sep 2012
    Posts
    7,098

    Default Re: Created BTRFS on external SSD - what now?

    Quote Originally Posted by d3vnull View Post
    It will mount under /run/media/david/<unique ID>
    Is not it exactly what happens now?
    using autofs
    No, it is not autofs.

    In this case it looks more like confusion between permissions on mount point and mounted filesystem. Changing permissions of mount point does not affect permissions on mounted filesystem in any way (there was long thread to this effect recently). Nor is it clear what exactly "cannot write" means here. As usual, copy-paste of actual command used to "write" together with output and any error reported is worth three pages of description.

  6. #6

    Default Re: Created BTRFS on external SSD - what now?

    Quote Originally Posted by arvidjaar View Post
    Is not it exactly what happens now?

    No, it is not autofs.

    In this case it looks more like confusion between permissions on mount point and mounted filesystem. Changing permissions of mount point does not affect permissions on mounted filesystem in any way (there was long thread to this effect recently). Nor is it clear what exactly "cannot write" means here. As usual, copy-paste of actual command used to "write" together with output and any error reported is worth three pages of description.

    Fair enough, udisk2 service.

    I still believe in specifying the mount point in YaST is what caused the issue. I have never had an issue working with a USB device in YaST, not specifying the mount point, and allowing the system to mount it appropriately.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

  7. #7

    Default Re: Created BTRFS on external SSD - what now?

    Well, let me just get this of my chest, using btrfs for backup can have advantages over Xfs, Ext4, .... especially if combined with snapshots for keeping changes to files.

    I believe that your problem is:
    - you are trying to access the mount point as user - that will not work (due to permissions) without extra work, and it is also not a good idea to do that for number of reasons (security, you could not snapshot it, etc.)

    Here are couple of ways to solve it (create subvolume or sub-directory inside the partition/volume):
    1. create one or more subvolumes - so that you can snapshot them later if needed
    2. the subvolumes should be visible as directories under your mount point
    3. as root - change ownership to the subvolume(s) to yourself - now you should be able to write to them
      if not - create a directory in the subvolume(s) as root and change its ownership to yourself - you should be able to write into the directory you own as user
    4. to change file/directory ownership - use: chown


    Hope it helps,
    -T

    PS: When you are done and all is good, I would change the mount point ownership back to root.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Created BTRFS on external SSD - what now?

    A thought...

    You may need to understand the requirements of your chosen backup program...
    The backup app is likely going to run with elevated permissions so that all partitions can be read, else if for instance your backup app runs with your logged in User permissions, you might be able to backup only what your User can read.

    And,
    This means that what you can view in your File Manager might be different than your backup app.

    So,
    For your specific purposes,
    You may want to run your backup app to understand what it can "see" instead of relying on what you as the logged in User can see in your File Manager.

    The other thing to consider is whether you might want your external drive world-readable so that you're sure it can be used in any system no matter what permissions are set. From your current description, any backups written to your external drive might be readable only from your logged in User.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: Created BTRFS on external SSD - what now?

    Thanks for your your reply. Guess this needs a bit more research
    Will get back here once I know more. For now, it just works as a regular external partition/SSD.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •