# UFS snapshots error



## Astronomer1 (Feb 4, 2014)

Hello all guru,
I wish to use snapshots on UFS. I've installed freebsd-snapshot utility from ports. Here is mounted devices:

```
/dev/ad4s1a on / (ufs, local, noatime, with quotas, soft-updates)
devfs on /dev (devfs, local, multilabel)
devfs on /vs/disk/78.24.220.17/dev (devfs, local, multilabel)
```
I do:

```
#snapshot make -g4 /:test
mount: /.snap/test.0 : Invalid argument
snapshot:ERROR: making UFS snapshot failed
```
In others my systems it is all ok. Where I'm doing wrong?
Help is highly needed.


----------



## usdmatt (Feb 4, 2014)

Do you get any more interesting information if you use the verbose flag as below.
(I'm guessing the verbose option goes with the other option rather than before `make`)


```
snapshot make -v -g4 /:test
```

Alternatively you can run the actual command to make a snapshot and see what gets output. (although the above should allow you to see any output from the mount command)


```
# mount -u -o snapshot /.snap/test /
-- then to remove it --
# rm -f /.snap/test
```


----------



## Astronomer1 (Feb 4, 2014)

I tried `mount -u -o snapshot /.snap/test /` and get:

```
mount: /.snap/test : Invalid argument
```

Can the noatime parameter be a problem on a mounted file system?


----------



## usdmatt (Feb 4, 2014)

I wouldn't expect noatime to affect snapshots, and I can find no references in man pages or otherwise that would suggest it can.
I'm all out of ideas.

I was hoping that the `mount` command would output an error that gave some reasonable indication of what is wrong.


----------



## kpa (Feb 4, 2014)

Just to rule out the obvious, is there a /.snap directory with the correct permissions?


```
firewall ~ % ls -ld /.snap
drwxrwxr-x  2 root  operator  512 Nov 23 18:40 /.snap
firewall ~ %
```


----------



## usdmatt (Feb 4, 2014)

I did try the following tests and was unable to replicate the 'Invalid argument' error:

Missing .snap directory (with default root:wheel permissions the command worked fine):

```
# mount -u -o snapshot /.snap/test /
mount: /.snap/test : No such file or directory
```

Snapshot with same name as an existing one:

```
# mount -u -o snapshot /.snap/test /
mount: /.snap/test : File exists
```

Hitting 20 snapshot limit:

```
# mount -u -o snapshot /.snap/test21 /
mount: /.snap/test21 : No space left on device
```


----------



## Astronomer1 (Feb 5, 2014)

Mine is:

```
drwxrwxr-x  2 root  operator  512 Nov 23 18:40 /.snap
```

Maybe another ideas? Help is very needed, this server cannot be backed up by copying...

Maybe snapshot kernel support is absent? This is 8.3 version.

Oh, forgot to say, this system has a jail. Is it important for snapshots?


----------



## stickboy (Jan 20, 2015)

Running
`mksnap_ffs / /.snap/test`

might give you a better error message.  For me, it explained to me that:



> Snapshots are not yet supported when running with journaled soft updates: Operation not supported



(It looks like you're not using journaling, though, so that's not the cause for your case.)


----------

