제목 그대로다. Btrfs Default Subvolume, 보다 적절한 표현으로 Top Level Subvolume 의 ID 는 0 인가, 5 인가?
Btrfs Wiki 에는 이런 표현이 있다.
A Btrfs filesystem has a default subvolume, which is initially set to be the top-level subvolume and which is mounted if no subvol or subvolid option is specified.
Btrfs SysadminGuide
Changing the default subvolume with btrfs subvolume default will make the top level of the filesystem inaccessible, except by use of the subvol=/ or subvolid=5 mount options.
그러면 id 는 5가 맞는데, 5 대신에 0 을 대입해도 결과는 같다.
즉, 다음 두 결과는 같다.
# mount /dev/sda3 /mnt/ -o subvolid=5 # ll /mnt drwxr-xr-x 1 root root 224 May 22 17:05 '@'/ drwxr-xr-x 1 root root 16 May 22 17:05 '@home'/ drwxr-xr-x 1 root root 0 May 22 16:47 '@opt'/ drwxr-xr-x 1 root root 108 May 22 16:59 '@var'/ # umount /mnt # mount /dev/sda3 /mnt/ -o subvolid=0 # ll /mnt drwxr-xr-x 1 root root 224 May 22 17:05 @ drwxr-xr-x 1 root root 16 May 22 17:05 @home drwxr-xr-x 1 root root 0 May 22 16:47 @opt drwxr-xr-x 1 root root 108 May 22 16:59 @var
아마도, 원래는 0 이었다가 나중에 5 로 바꾼 모양이다. 호환을 위해서 0 은 그대로 놔둔게 아닐까.. 짐작을 해본다.
Top id 가 0 이라는 글을 보고 의아해했는데, 둘 다 작동하니, 이런 근거없는 추측만 할 밖에. (살짝 찾아봤지만, 관련된 글을 찾지는 못했다.)
그냥 5로만 알고 있으면 되겠다.