![루프 드라이브의 소스를 마운트 지점으로 이동하면 파일 시스템 뒤에서 무슨 일이 발생합니까?](https://linux55.com/image/223170/%EB%A3%A8%ED%94%84%20%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B8%8C%EC%9D%98%20%EC%86%8C%EC%8A%A4%EB%A5%BC%20%EB%A7%88%EC%9A%B4%ED%8A%B8%20%EC%A7%80%EC%A0%90%EC%9C%BC%EB%A1%9C%20%EC%9D%B4%EB%8F%99%ED%95%98%EB%A9%B4%20%ED%8C%8C%EC%9D%BC%20%EC%8B%9C%EC%8A%A4%ED%85%9C%20%EB%92%A4%EC%97%90%EC%84%9C%20%EB%AC%B4%EC%8A%A8%20%EC%9D%BC%EC%9D%B4%20%EB%B0%9C%EC%83%9D%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
루프 드라이브의 소스를 마운트 지점으로 이동하고 마운트 해제했습니다. 그러면 소스가 사라집니다.
소스를 마운트 지점(또는 다른 위치)으로 이동한 후에는 소스가 삭제된 것으로 나타납니다.
$ losetup --all
/dev/loop0: []: (/mnt/storage/test.iso (deleted))
다음을 통해 확인할 때 이전에 소스가 차지했던 공간이 해제되지 않습니다 df -h
.
# Original Used Space
$ df -h|grep storage
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgtank-lvtest ext4 100M 128K 100M 1% /mnt/storage
# After Creating the File and Mounting
$ dd if=/dev/zero of=/mnt/storage/test.iso bs=64M count=1
1+0 records in
1+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 0.0405464 s, 1.7 GB/s
$ losetup -f test.iso
$ mkdir test
$ mount /dev/loop0 test
$ df -h|grep storage
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgtank-lvtest ext4 100M 64M 36M 64% /mnt/storage
# After Moving the File and Umounting
$ mv test.iso test
$ umount test
$ df -h|grep storage
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgtank-lvtest ext4 100M 64M 36M 64% /mnt/storage
여기에 두 가지 질문이 있습니다.
- 왜 losstup을 통해
mv
파일을 다른 파일 시스템에 복사 할 수 있나요?in used
- 제거 후 파일은 어디로 가나요?