우분투 : zfs 스냅 샷을 마운트하는 방법?


17

zfs 스냅 샷을 마운트하려고합니다. 너무 쉬워야하지만 ... 나는 할 수 없습니다. Ubuntu Server 11.10 Oneric, 커널 3.0.0-15-server를 사용하고 있습니다.

ppa 에서 설치된 ZFS 도 zfs-auto-snapshot을 사용하고 있습니다. 수동으로 생성 된 스냅 샷에서도 동일한 상황이 발생합니다.

ZFS 스냅 샷을 마운트하는 방법?

root@us1:/# zfs list -t snapshot
NAME                                                            USED  AVAIL  REFER  MOUNTPOINT
tank/www@zfs-auto-snap_hourly-2012-02-11-1917                   0      -   268K  -

root@us1:/# zfs mount tank/www@zfs-auto-snap_hourly-2012-02-11-1917 /mnt/snapshot/tank/www
too many arguments
usage:
        mount
        mount [-vO] [-o opts] <-a | filesystem>

For the property list, run: zfs set|get

For the delegated permission list, run: zfs allow|unallow

root@us1:/# zfs mount tank/www@zfs-auto-snap_hourly-2012-02-11-1917
cannot open 'tank/www@zfs-auto-snap_hourly-2012-02-11-1917': operation not applicable to datasets of this type

답변:


19

ZoL을 실행하려면 다음과 같이 일반 마운트 명령을 사용하십시오.

mount -t zfs tank/www@zfs-auto-snap_hourly-2012-02-11-1917 /mnt/snapshot/tank/www

다음과 같이 분리하십시오 :

umount /mnt/snapshot/tank/www

이것은 https://github.com/zfsonlinux/zfs/issues/173 에서 추적중인 버그입니다.


마운트 포인트 매개 변수를 변경하지 않고 ZFS 데이터 세트를 마운트하는
— 유용한

21

현재 ZoL (Linux on ZoL)은 이제 데이터 세트의 루트에있는 보이지 않는 (숨겨지지 않은) 보이지 않는 디렉토리를 통해 스냅 샷에 대한 읽기 전용 액세스를 지원합니다.

# ls -a /tank/test
./  ../  boot.tar  text.tar  text.tar.2
# cd /tank/test/.zfs/
# ls -a
./  ../  shares/  snapshot/

에서 snapshot디렉토리 당신은 모든 스냅 샷의 읽기 전용 복사본을 찾을 수 있습니다.

.zfs를 통해 볼 수 있습니다 zfs set snapdir=visible tank/test.

출처 : https://pthree.org/2012/12/19/zfs-administration-part-xii-snapshots-and-clones/

당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.