Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
error accessing btrfs subvolumes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
deathraccoon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2015
Posts: 90

PostPosted: Sat Sep 19, 2015 10:53 pm    Post subject: error accessing btrfs subvolumes Reply with quote

I reinstalled my system and thought to try btrfs. I followed the handbook, my deviation being that I don't use raid. The installation went off without a hitch, however I am unable to make snapshots of my subvolume.

Code:
sudo btrfs subvolume snapshot /activeroot /mnt/backup/root


returns:

Code:
ERROR: error accessing '/activeroot


here is my fstab:
Code:

  GNU nano 2.3.6                                          File: /etc/fstab                                                                                         

LABEL=BTROOT    /mnt/newmirror          btrfs   defaults,noatime,compress=lzo,autodefrag                        0 0
LABEL=BTROOT    /                       btrfs   defaults,noatime,compress=lzo,autodefrag,subvol=activeroot      0 0
LABEL=BTROOT    /home                   btrfs   defaults,noatime,compress=lzo,autodefrag,subvol=home            0 0

LABEL=BOOT      /boot                   btrfs   defaults,noatime                                                0 0

none            /var/tmp/portage        tmpfs   size=12G                                                        0 0
tmpfs           /tmp                    tmpfs   size=8G                                                         0 0



advice?
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1733
Location: St. Wendel

PostPosted: Sun Sep 20, 2015 12:13 am    Post subject: Reply with quote

You can't cross mount boundaries with snapshots. Mount the real btrfs root somewhere and make the Snapshot beneath there.

Bye
Py
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3687
Location: Hamburg

PostPosted: Sun Sep 20, 2015 7:29 am    Post subject: Reply with quote

I'm interested in your experiences.

At my server (hardened kernel 4.1.6) I experienced few times a data loss within BTRFS subvolumes. I switched back to EXT4 w/o analyzing the root cause however.
Back to top
View user's profile Send private message
cal22cal
n00b
n00b


Joined: 19 Jan 2006
Posts: 36

PostPosted: Thu Sep 24, 2015 12:44 pm    Post subject: Reply with quote

Guess the command should be
Code:
sudo btrfs subvolume snapshot /mnt/newmirror/activeroot   /mnt/newmirror/snap-activeroot

In case really want to backup to the other partition or device,
the send/receive options should be used.

The easiest way should look up some backup script available from git.
Back to top
View user's profile Send private message
deathraccoon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2015
Posts: 90

PostPosted: Sat Sep 26, 2015 10:57 pm    Post subject: Reply with quote

pardon, but doesn't my root subvolume need to say mounted at /
Back to top
View user's profile Send private message
deathraccoon
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2015
Posts: 90

PostPosted: Sun Sep 27, 2015 12:09 am    Post subject: Reply with quote

I am trying to delete a subvolume.
Code:
btrfs subvolume list .
ID 257 gen 20007 top level 5 path activeroot
ID 258 gen 20007 top level 5 path home
ID 513 gen 19947 top level 257 path activeroot/mnt/bakcup
ID 514 gen 19955 top level 257 path activeroot/mnt/backcup
ID 515 gen 19956 top level 514 path activeroot/mnt/backcup/root/home


btrfs subvolume delete... returns this:
[/code]btrfs subvolume delete activeroot/mnt/backup
ERROR: error accessing 'activeroot/mnt/backup
Code:
Back to top
View user's profile Send private message
cal22cal
n00b
n00b


Joined: 19 Jan 2006
Posts: 36

PostPosted: Sun Sep 27, 2015 4:17 am    Post subject: Reply with quote

A more clear picture about how the FS arranged
https://btrfs.wiki.kernel.org/index.php/SysadminGuide
root is your activeroot subvolume and mount to /
Wish you have not changed the btrfs subvolume default
your fstab
Code:
LABEL=BTROOT /mnt/newmirror  btrfs   defaults,noatime,compress=lzo,autodefrag                        0 0
LABEL=BTROOT /               btrfs   defaults,noatime,compress=lzo,autodefrag,subvol=activeroot      0 0

tells automount the subvolid=0 to /mnt/newmirror
Code:
ls -l  /mnt/newmirror

It should looks like
Code:
.... activeroot
.... home

You have created sanpshot in side the subvol of activeroot, not as the same level of activeroot.
Code:
btrfs subvolume delete activeroot/mnt/backup
ERROR: error accessing 'activeroot/mnt/backup

Sorry, no idea about that :cry:
Might be boot up by livecd can rescue that. Backup to external media before doing so.
Edit:-
Try to
Code:
 btrfs subvolume delete /mnt/newmirror/activeroot/mnt/backup

might work
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum