Originally posted by GreyGeek
View Post
Code:
vdir /mnt/@home/jerry
VINNY
vdir /mnt/@home/jerry
vdir /mnt/@home/jerry
jerry@jerry-Aspire-7739:~$ sudo su - root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau / [/B] ID 257 gen 62380 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path <FS_TREE>/@ ID 258 gen 62380 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path <FS_TREE>/@home root@jerry-Aspire-7739:~# [B]cat /etc/fstab [/B] # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda4 during installation UUID=215f0509-7e55-475f-b438-78cf100cfc75 / btrfs defaults,subvol=@ 0 1 # /home was on /dev/sda4 during installation UUID=215f0509-7e55-475f-b438-78cf100cfc75 /home btrfs defaults,subvol=@home 0 2 root@jerry-Aspire-7739:~# [B]mount /dev/sda4 /mnt [/B] root@jerry-Aspire-7739:~#[B] vdir /mnt [/B] total 0 drwxr-xr-x 1 root root 226 Jul 6 15:46 @ drwxr-xr-x 1 root root 30 Jul 5 17:52 @home root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau /mnt[/B] ID 257 gen 62385 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path @ ID 258 gen 62384 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path @home root@jerry-Aspire-7739:~# [B]btrfs subvol show /[/B] / Name: @ uuid: a6c08390-1f77-8148-ae75-e548a012dc06 Parent uuid: - Creation time: 2014-12-31 18:51:27 Object ID: 257 Generation (Gen): 62386 Gen at creation: 6 Parent: 5 Top Level: 5 Flags: - Snapshot(s): root@jerry-Aspire-7739:~# [B]btrfs subvol show /home[/B] /home Name: @home uuid: 32f6399a-344a-aa40-8aca-c4ea86ded7b6 Parent uuid: - Creation time: 2014-12-31 18:51:28 Object ID: 258 Generation (Gen): 62384 Gen at creation: 9 Parent: 5 Top Level: 5 Flags: - Snapshot(s): root@jerry-Aspire-7739:~# [B]btrfs subvol snapshot /mnt/@ /mnt/@_snapshot[/B] Create a snapshot of '/mnt/@' in '/mnt/@_snapshot' root@jerry-Aspire-7739:~# [B]btrfs subvol snapshot /mnt/@home /mnt/@home_snapshot[/B] Create a snapshot of '/mnt/@home' in '/mnt/@home_snapshot' root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau /[/B] ID 257 gen 62388 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path <FS_TREE>/@ ID 258 gen 62389 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path <FS_TREE>/@home ID 469 gen 62388 parent 5 top level 5 uuid 4046a1af-bc1d-4f47-96dd-613ebf40cb23 path <FS_TREE>/@_snapshot ID 470 gen 62389 parent 5 top level 5 uuid 365c2407-a713-8549-a9a5-4ed3141e2ac2 path <FS_TREE>/@home_snapshot
sudo mv /mnt/@ /mnt/@_badroot sudo mv /mnt/@_snapshot /mnt/@
jerry@jerry-Aspire-7739:~$ sudo su - root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau / [/B] ID 257 gen 62380 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path <FS_TREE>/@ ID 258 gen 62380 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path <FS_TREE>/@home root@jerry-Aspire-7739:~# [B]cat /etc/fstab [/B] # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda4 during installation UUID=215f0509-7e55-475f-b438-78cf100cfc75 / btrfs defaults,subvol=@ 0 1 # /home was on /dev/sda4 during installation UUID=215f0509-7e55-475f-b438-78cf100cfc75 /home btrfs defaults,subvol=@home 0 2 root@jerry-Aspire-7739:~# [B]mount /dev/sda4 /mnt [/B] root@jerry-Aspire-7739:~#[B] vdir /mnt [/B] total 0 drwxr-xr-x 1 root root 226 Jul 6 15:46 @ drwxr-xr-x 1 root root 30 Jul 5 17:52 @home root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau /mnt[/B] ID 257 gen 62385 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path @ ID 258 gen 62384 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path @home root@jerry-Aspire-7739:~# [B]btrfs subvol show /[/B] / Name: @ uuid: a6c08390-1f77-8148-ae75-e548a012dc06 Parent uuid: - Creation time: 2014-12-31 18:51:27 Object ID: 257 Generation (Gen): 62386 Gen at creation: 6 Parent: 5 Top Level: 5 Flags: - Snapshot(s): root@jerry-Aspire-7739:~# [B]btrfs subvol show /home[/B] /home Name: @home uuid: 32f6399a-344a-aa40-8aca-c4ea86ded7b6 Parent uuid: - Creation time: 2014-12-31 18:51:28 Object ID: 258 Generation (Gen): 62384 Gen at creation: 9 Parent: 5 Top Level: 5 Flags: - Snapshot(s): root@jerry-Aspire-7739:~# [B]btrfs subvol snapshot /mnt/@ /mnt/@_snapshot[/B] Create a snapshot of '/mnt/@' in '/mnt/@_snapshot' root@jerry-Aspire-7739:~# [B]btrfs subvol snapshot /mnt/@home /mnt/@home_snapshot[/B] Create a snapshot of '/mnt/@home' in '/mnt/@home_snapshot' root@jerry-Aspire-7739:~# [B]btrfs subvol list -pau /[/B] ID 257 gen 62388 parent 5 top level 5 uuid a6c08390-1f77-8148-ae75-e548a012dc06 path <FS_TREE>/@ ID 258 gen 62389 parent 5 top level 5 uuid 32f6399a-344a-aa40-8aca-c4ea86ded7b6 path <FS_TREE>/@home ID 469 gen 62388 parent 5 top level 5 uuid 4046a1af-bc1d-4f47-96dd-613ebf40cb23 path <FS_TREE>/@_snapshot ID 470 gen 62389 parent 5 top level 5 uuid 365c2407-a713-8549-a9a5-4ed3141e2ac2 path <FS_TREE>/@home_snapshot
sudo mv /mnt/@ /mnt/@_badroot sudo mv /mnt/@_snapshot /mnt/@
stuart@office:~$ ll /mnt/samsung total 0 drwxr-xr-x 1 root root 382 May 28 12:21 @Kubuntu_14_04 drwxr-xr-x 1 root root 48 Jan 25 16:21 @Kubuntu_14_04_home drwxr-xr-x 1 root root 48 Jan 25 16:21 @Kubuntu_14_04_home_ro drwxr-xr-x 1 root root 382 Apr 8 14:16 @Kubuntu_14_04_ro drwxr-xr-x 1 root root 284 Jun 21 10:56 @Kubuntu_15_04 drwxr-xr-x 1 root root 32 Jun 1 14:40 @Kubuntu_15_04_home drwxr-xr-x 1 root root 0 May 9 08:51 snapshots drwxr-x--- 1 stuart stuart 0 Feb 21 07:14 @stuart
Comment