Announcement

Collapse
No announcement yet.

BTRFS Subvol Manager problems

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

    BTRFS Subvol Manager problems

    Today I tried to use Oshunluvr's btrfs service menu for Dolphin to send snapshots of @ and @home to an external hard drive for backup. I mounted both the btrfs drive to /mnt and the backup drive to /backup. Then I went to the snapshot folder, clicked on the snapshot I wanted to send, and then clicked on Send a read-only file. To my surprise, I got an error message saying that the file selected was not a read-only subvolume snapshot. Yet I followed the snapshot indications correctly, marked it read-only, and the snapshot file has a 'ro' at the end. I made two new snapshots and tried the same thing, with the same results. So tried to to change the setting using the Modify read/write setting on the menu, but got another error message saying the Modify_subvolume file couldn't be found! I checked the path, and sure enough, it was there. Any suggestions?

    #2
    did you take the snapshot originally with the "take a read only snapshot" choice in the service menu ?

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #3
      Yes, and the snapshot filename ends with 'ro'.

      Comment


        #4
        open a konsole and enter
        Code:
        findmnt
        and lets see how the mounts look , copy and paste the output in code tags (the # button)

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          Here it is:

          Code:
          TARGET                                SOURCE      FSTYPE  OPTIONS
          /                                     /dev/sda1[/@]
          │                                                 btrfs   rw,relatime,space_cache,subvol
          ├─/sys                                sysfs       sysfs   rw,nosuid,nodev,noexec,relatim
          │ ├─/sys/kernel/security              securityfs  securit rw,nosuid,nodev,noexec,relatim
          │ ├─/sys/fs/cgroup                    tmpfs       tmpfs   ro,nosuid,nodev,noexec,mode=75
          │ │ ├─/sys/fs/cgroup/unified          cgroup      cgroup2 rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/systemd          cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/rdma             cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/cpuset           cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/blkio            cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/cpu,cpuacct      cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/memory           cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/freezer          cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/perf_event       cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/pids             cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ ├─/sys/fs/cgroup/hugetlb          cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ │ └─/sys/fs/cgroup/devices          cgroup      cgroup  rw,nosuid,nodev,noexec,relatim
          │ ├─/sys/fs/pstore                    pstore      pstore  rw,nosuid,nodev,noexec,relatim
          │ ├─/sys/kernel/debug                 debugfs     debugfs rw,relatime
          │ ├─/sys/fs/fuse/connections          fusectl     fusectl rw,relatime
          │ └─/sys/kernel/config                configfs    configf rw,relatime
          ├─/proc                               proc        proc    rw,nosuid,nodev,noexec,relatim
          │ └─/proc/sys/fs/binfmt_misc          systemd-1   autofs  rw,relatime,fd=25,pgrp=1,timeo
          │   └─/proc/sys/fs/binfmt_misc        binfmt_misc binfmt_ rw,relatime
          ├─/dev                                udev        devtmpf rw,nosuid,relatime,size=814749
          │ ├─/dev/pts                          devpts      devpts  rw,nosuid,noexec,relatime,gid=
          │ ├─/dev/shm                          tmpfs       tmpfs   rw,nosuid,nodev
          │ ├─/dev/mqueue                       mqueue      mqueue  rw,relatime
          │ └─/dev/hugepages                    hugetlbfs   hugetlb rw,relatime,pagesize=2M
          ├─/run                                tmpfs       tmpfs   rw,nosuid,noexec,relatime,size
          │ ├─/run/lock                         tmpfs       tmpfs   rw,nosuid,nodev,noexec,relatim
          │ ├─/run/user/1000                    tmpfs       tmpfs   rw,nosuid,nodev,relatime,size=
          │ └─/run/user/118                     tmpfs       tmpfs   rw,nosuid,nodev,relatime,size=
          ├─/home                               /dev/sda1[/@home]
          │                                                 btrfs   rw,relatime,space_cache,subvol
          └─/mnt                                /dev/sda1   btrfs   rw,relatime,space_cache,subvol

          Comment


            #6
            I do not see the /backup mount ?

            VINNY
            i7 4core HT 8MB L3 2.9GHz
            16GB RAM
            Nvidia GTX 860M 4GB RAM 1152 cuda cores

            Comment


              #7
              I hadn't mounted it. Here is the same code with both mounted.

              TARGET SOURCE FSTYPE OPTIONS
              / /dev/sda1[/@]
              │ btrfs rw,relatime,space_cache,subvol
              ├─/sys sysfs sysfs rw,nosuid,nodev,noexec,relatim
              │ ├─/sys/kernel/security securityfs securit rw,nosuid,nodev,noexec,relatim
              │ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=75
              │ │ ├─/sys/fs/cgroup/unified cgroup cgroup2 rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ │ └─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatim
              │ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatim
              │ ├─/sys/kernel/debug debugfs debugfs rw,relatime
              │ ├─/sys/fs/fuse/connections fusectl fusectl rw,relatime
              │ └─/sys/kernel/config configfs configf rw,relatime
              ├─/proc proc proc rw,nosuid,nodev,noexec,relatim
              │ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeo
              │ └─/proc/sys/fs/binfmt_misc binfmt_misc binfmt_ rw,relatime
              ├─/dev udev devtmpf rw,nosuid,relatime,size=814749
              │ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=
              │ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev
              │ ├─/dev/mqueue mqueue mqueue rw,relatime
              │ └─/dev/hugepages hugetlbfs hugetlb rw,relatime,pagesize=2M
              ├─/run tmpfs tmpfs rw,nosuid,noexec,relatime,size
              │ ├─/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatim
              │ ├─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime,size=
              │ └─/run/user/118 tmpfs tmpfs rw,nosuid,nodev,relatime,size=
              ├─/home /dev/sda1[/@home]
              │ btrfs rw,relatime,space_cache,subvol
              ├─/mnt /dev/sda1 btrfs rw,relatime,space_cache,subvol
              └─/backup /dev/sdb1 btrfs rw,relatime,space_cache,subvol
              Last edited by oldgeek; Jul 26, 2019, 07:13 PM.

              Comment


                #8
                Code:
                TARGET SOURCE FSTYPE OPTIONS
                / /dev/sda1[/@]
                │ btrfs rw,relatime,space_cache,subvol
                ├─/sys sysfs sysfs rw,nosuid,nodev,noexec,relatim
                │ ├─/sys/kernel/security securityfs securit rw,nosuid,nodev,noexec,relatim
                │ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=75
                │ │ ├─/sys/fs/cgroup/unified cgroup cgroup2 rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ │ └─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatim
                │ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatim
                │ ├─/sys/kernel/debug debugfs debugfs rw,relatime
                │ ├─/sys/fs/fuse/connections fusectl fusectl rw,relatime
                │ └─/sys/kernel/config configfs configf rw,relatime
                ├─/proc proc proc rw,nosuid,nodev,noexec,relatim
                │ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=25,pgrp=1,timeo
                │ └─/proc/sys/fs/binfmt_misc binfmt_misc binfmt_ rw,relatime
                ├─/dev udev devtmpf rw,nosuid,relatime,size=814749
                │ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=
                │ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev
                │ ├─/dev/mqueue mqueue mqueue rw,relatime
                │ └─/dev/hugepages hugetlbfs hugetlb rw,relatime,pagesize=2M
                ├─/run tmpfs tmpfs rw,nosuid,noexec,relatime,size
                │ ├─/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatim
                │ ├─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime,size=
                │ └─/run/user/118 tmpfs tmpfs rw,nosuid,nodev,relatime,size=
                ├─/home /dev/sda1[/@home]
                │ btrfs rw,relatime,space_cache,subvol
                ├─/mnt /dev/sda1 btrfs rw,relatime,space_cache,subvol
                └─/backup /dev/sdb1 btrfs rw,relatime,space_cache,subvol

                Comment


                  #9
                  Originally posted by oldgeek View Post
                  To my surprise, I got an error message saying that the file selected was not a read-only subvolume snapshot. Yet I followed the snapshot indications correctly, marked it read-only, and the snapshot file has a 'ro' at the end.
                  "Yet I followed the snapshot indications correctly, marked it read-only, " I do not understand this , what "indications" and how did you "mark" it read only?
                  if you used the "take a read only subvolume snapshot" there's no marking to do , and having a .ro at the end dose not do anything.
                  Originally posted by oldgeek View Post
                  I made two new snapshots and tried the same thing, with the same results. So tried to to change the setting using the Modify read/write setting on the menu, but got another error message saying the Modify_subvolume file couldn't be found! I checked the path, and sure enough, it was there. Any suggestions?
                  what menu is this "Modify read/write" in/on ?

                  go right click one of your snapshots and use the "detailed subvolume information" and see if the "read only" flag is set .
                  or in a konsole
                  Code:
                  vinny@vinny-Bonobo-Extreme:/media/vinny/fe385e89-57a5-4632-9823-043a70b67c65/snapshots$ sudo  btrfs su sh @_ro_190726-145951/
                  [sudo] password for vinny: 
                  snapshots/@_ro_190726-145951
                         Name:                   @_ro_190726-145951
                         UUID:                   ada681e0-b7f9-4f42-9579-a152a15b6a20
                         Parent UUID:            e709b6b0-9247-8f4e-b952-22cc36095cd7
                         Received UUID:          -
                         Creation time:          2019-07-26 15:00:36 -0400
                         Subvolume ID:           304
                         Generation:             79328
                         Gen at creation:        79328
                         Parent ID:              5
                         Top level ID:           5
                         [COLOR=#ff0000]Flags:                  readonly[/COLOR]
                         Snapshot(s):
                  of course use the name of your subvolume snapshot (by the way , the name of mine is how the service menu names a read only snapshot by default if you do not rename it )

                  VINNY
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    What I meant was that I clicked on @, brought up the BTRFS manager menu, and clicked on 'Make a subvolume snapshot.' When that popped up, I changed 'read/write' to 'read only'. There is no command 'take a read-only subvolume snapshot' on the manager menu, just 'send a read-only subvolume snapshot, which I assume is the command for sending a read-only snapshot to an external hard disk. When I click on the snapshots and select 'detailed subvolume information' there is a hyphen in the flag indicator. The send command produces a filename with and -ro at the end, which I presume means that it is read only. However, apparently the setting of the snapshot stays at the read/write setting during this process, which I presume is why I get the hyphen at the flag indicator. When I try to modify the setting using the 'modify subvolume read/write setting' on the menu of the btrfs subvolume manger, I get the error message saying the 'modify subvolume file' can't be found. I looked into the 'subvol_manager-scripts' folder and found the 'modify-subvolume' file. I don't know why this script can't be found when I select the read-only choice on the snapshot making tool, but obviously I am not making a read-only snapshot despite the fact that I seem to have gone through the process correctly. I hope this explanation is clearer.

                    Comment


                      #11
                      so you do not see this ,,,,,,,,



                      if no something is wrong with your script setup .

                      post the output of

                      Code:
                      ls -la ~/.local/share/kservices5/ServiceMenus/
                      and

                      Code:
                      ls -la ~/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/
                      VINNY
                      i7 4core HT 8MB L3 2.9GHz
                      16GB RAM
                      Nvidia GTX 860M 4GB RAM 1152 cuda cores

                      Comment


                        #12
                        My service menu does not include the first and the fourth option yours shows. So no 'take a read-only snapshot'. However, when I click on the snapshot option, I can choose between read/write and read only. I chose read only, with the results I've described before. You apparently have a different version--what is the most up-to-date?
                        As for the ls commands, here they are:

                        steve@steve-H55H-M:~$ ls -la ~/.local/share/kservices5/ServiceMenus/
                        total 8
                        drwxrwxr-x 1 steve steve 132 Kun 20 14:24 .
                        drwxrwxr-x 1 steve steve 480 Kun 19 12:57 ..
                        -rw-rw-r-- 1 steve steve 1279 Kun 20 14:18 subvol_manager.desktop
                        -rw-rw-r-- 1 steve steve 1704 Dait 7 2018 subvol_manager-READ_ME
                        drwxrwxr-x 1 steve steve 390 Kun 22 20:19 subvol_manager-script

                        and

                        steve@steve-H55H-M:~$ ls -la ~/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/
                        total 64
                        drwxrwxr-x 1 steve steve 390 Kun 22 20:19 .
                        drwxrwxr-x 1 steve steve 132 Kun 20 14:24 ..
                        -rw------- 1 steve steve 77 Dait 7 2018 .directory
                        -rw-rw-r-- 1 steve steve 2138 Dait 28 2017 folder-del.svg
                        -rw-rw-r-- 1 steve steve 2102 Dait 7 2018 folder-receive.svg
                        -rw-rw-r-- 1 steve steve 3279 Dait 6 2018 folder-ro_dup.svg
                        -rw-rw-r-- 1 steve steve 2776 Dait 6 2018 folder-ro.svg
                        -rw-rw-r-- 1 steve steve 4803 Dait 6 2018 folder-rw_dup.svg
                        -rw-rw-r-- 1 steve steve 4261 Dait 6 2018 folder-rw.svg
                        -rw-rw-r-- 1 steve steve 2087 Dait 7 2018 folder-send.svg
                        -rw-rw-r-- 1 steve steve 2824 Dait 28 2017 folder-what.svg
                        -rwxrwxr-x 1 steve steve 1431 Dait 7 2018 subvol_delete
                        -rwxrwxr-x 1 steve steve 967 Dait 7 2018 subvol_info
                        -rw-rw-r-- 1 steve steve 2611 Dait 7 2018 subvol_modify
                        -rwxrwxr-x 1 steve steve 2310 Dait 7 2018 subvol_send
                        -rwxrwxr-x 1 steve steve 1932 Kun 22 20:19 subvol_snapshot

                        Any help? By the way, I appreciate the time and effort you are spending on this consultation. That's why I love this forum.

                        Comment


                          #13
                          OK the difference between us is I'm using an older ver of the scripts , give me I bit to get the newest ver in and test , I do see one problem in your scripts however , the subvol_modify's permissions are wrong , they should be the same as the rest .

                          something elce is wrong @hear , the BTRFS_Subvolume_Manager_ServiceMenu_v1.0.1.tar.gz I just DL'd from hear https://store.kde.org/p/1214134/ dose not have the .svg images in it ? ,,, @oshunluvr ,,,,HELP

                          I'm going to see if any of the archived versions look better , yes the v1.0 looks complete and the same as yours will try it and get back to ya

                          VINNY
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            I'll be waiting with an open keyboard...

                            Comment


                              #15
                              OK , we can fix this , I will assume you are using the v1.0 of the scripts as it has the .svg files you have

                              the first thing is to go to ~/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/ rite click the "subvol_modify" script >propertys>permissions and check the "is executable" box . it's unpacking without it.

                              next open the ~/.local/share/kservices5/ServiceMenus/subvol_manager.desktop file with kate and edit as follows

                              the section
                              Code:
                              [Desktop Action modify]
                              Icon=edit-select-invert
                              Name=Modify Subvolume Read/Write Setting
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/subvol_verify %U
                              to
                              Code:
                              [Desktop Action modify]
                              Icon=edit-select-invert
                              Name=Modify Subvolume Read/Write Setting
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/subvol_modify %U
                              and
                              Code:
                              [Desktop Action sendreceive]
                              Icon=edit-redo
                              Name=Send a Read-Only Subvolume Snapshot
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/send_receive_subvol %U
                              to
                              Code:
                              [Desktop Action sendreceive]
                              Icon=edit-redo
                              Name=Send a Read-Only Subvolume Snapshot
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/subvol_send %U
                              and
                              Code:
                              [Desktop Action deletesubvol]
                              Icon=user-trash-full
                              Name=Permanently Delete a Subvolume
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/delete_subvol %U
                              to
                              Code:
                              [Desktop Action deletesubvol]
                              Icon=user-trash-full
                              Name=Permanently Delete a Subvolume
                              Exec=$HOME/.local/share/kservices5/ServiceMenus/subvol_manager-scripts/subvol_delete %U
                              basically what is going on is some typos the names in the desktop file don't mach the names of the scripts ,,,,,so cant find them .

                              it still dose not set the read only flag on taking the snapshot corectly (I'll investigate this some more) but the "modify subvolume read/write setting" works now so,,,,

                              VINNY
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment

                              Working...
                              X