BTRFS Mountpoint

Hello,
I have been creating snapshots no problem, however i came do run a snapshot today and it returned with the below message. i have run nc-datadir from the panel and it says the info is already there.

[ nc-snapshot ]
Maintenance mode enabled
Nextcloud is in maintenance mode - no apps have been loaded

/media/myCloudDrive/ncdata is not a BTRFS mountpoint or snapshot
Maintenance mode disabled

is your external hdd formatted in btrfs?

Hello, it would of been originally and i have taken snapshots 3 days ago. the only thing i have changed is i have plugged a usb stick in along side the drive but i have now removed this

so we’ll see what @OliverV or @nachoparker would have to add here :wink:

Anybody got any ideas of what the problem is. many thanks

Should heve read https://docs.nextcloudpi.com/en/how-to-configure-an-external-usb-drive-with-nextcloudpi/ before pluging in a 2nd usb drive.,
Also Search docs for Mounting an external drive.
Either use labels when formating your drives or disable nc-automount and mount your drives manually using fstab

2 Likes

Hi Oliver

Thank you for your reply and link.

My main drive (USBdrive) is formatted in BTRFS as was taking snapshots no problem until i plugged in the USB stick, before this was plugged in i did give this a label of Futures.
Strange thing is though when looking i could see the Futures label under media and it was also called USBdrive.
The original USBdrive with all my data on had now been named USBdrive1. Obviously when i removed the USB stick then the original drive label returned back to USBdrive.
Any ideas on getting the snapshot facility to work again with formatting the drive again as it has all the data on.

Thanks

Edit your config.php to point datadirectory to
/media/LABEL instead of /media/USBdrive
which is just a symlink created by nc-automount

Hi Oliver,

when i look in /media it shows myCloudDrive and also USBdrive however i only have 1 drive plugged in so it is named twice. I have edited the config file and it still says that it is not a BTRFS mountpoint. Having removed the drive and checked it, it says that the drive is setup in BTRFS. I have renamed the config file back now to the below and it still makes no difference.
‘datadirectory’ => ‘/media/USBdrive/ncdata’,

Any ideas.

As mentioned already
/media/USBdrive
is just a symbolic link created by nc-automount
Youcan confirm and see that by doing

sudo ls --lh /media/

If you change
‘datadirectory’ => ‘/media/USBdrive/ncdata’,
into
‘datadirectory’ => ‘/media/LABEL/ncdata’,

That will avoid breaking your config when you plug in a second usb, it doesnt matter if the drive is formatted as btrfs or ext4.

Hi Oliver,

Thank you for your reply and i understand what you are saying now, however, even if i rename the label i understand that if a 2nd drive is plugged in it will be fine but i still can’t take snapshots. So is there no way of fixing this part?

snapshots only work with btrfs
have look at this tutorial for basics.