My main partition, on which I have installed Kubuntu 14.04 with the btrfs FS, is on /dev/sda
I inserted an 8GB flash drive and attempted to format it with kparted. However, kparted did NOT have the btrfs as an option. XFS was there, but not btrfs.
So, I resorted to the CLI and mkfs.btrfs to format the 8GB stick. The "-f" switch was needed to forced the overwrite of the 500MB Verbatin_Store'n_GO partition, the first time I did it. After that, I did not have to.
Code:
:~$ sudo mkfs.btrfs /dev/sdb
WARNING! - Btrfs v3.12 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using
Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
fs created label (null) on /dev/sdb
nodesize 16384 leafsize 16384 sectorsize 4096 size 7.46GiB
Code:
sudo mount /dev/sdb /mnt
I umounted and mounted and umounted several times to see that the files I copied on it remained.
Code:
[FONT=courier new]:~$ sudo mount /dev/sdb /mnt[/FONT] :~$ [FONT=courier new]vdir /mnt[/FONT] total 0
Code:
:~$ [FONT=courier new]vdir /mnt[/FONT] total 64 -rw-rw-r-- 1 root root 1312 Jan 24 12:08 brtfs-find-root.txt -rw-rw-r-- 1 root root 2268 Jan 24 12:11 brtfs-image.txt -rw-rw-r-- 1 root root 1339 Jan 24 12:12 brtfs-map-logical.txt -rw-rw-r-- 1 root root 1358 Jan 24 12:16 btrfsck-dont-use.txt -rw-rw-r-- 1 root root 1431 Jan 24 12:07 btrfs-convert.txt -rw-rw-r-- 1 root root 1104 Jan 24 14:10 btrfs-create.txt -rw-rw-r-- 1 root root 1414 Jan 24 12:13 btrfs-show-super.txt -rw-rw-r-- 1 root root 1217 Jan 24 12:16 btrfstune.txt -rw-rw-r-- 1 root root 24800 Jan 24 12:04 btrfs.txt -rw-rw-r-- 1 root root 1119 Jan 24 12:14 btrfs-zero-log.txt :~$[FONT=courier new] sudo umount /mnt[/FONT] :~$ [FONT=courier new]sudo mount /dev/sdb /mnt[/FONT] :~$[FONT=courier new] vdir /mnt[/FONT] total 64 -rw-rw-r-- 1 root root 1312 Jan 24 12:08 brtfs-find-root.txt -rw-rw-r-- 1 root root 2268 Jan 24 12:11 brtfs-image.txt -rw-rw-r-- 1 root root 1339 Jan 24 12:12 brtfs-map-logical.txt -rw-rw-r-- 1 root root 1358 Jan 24 12:16 btrfsck-dont-use.txt -rw-rw-r-- 1 root root 1431 Jan 24 12:07 btrfs-convert.txt -rw-rw-r-- 1 root root 1104 Jan 24 14:10 btrfs-create.txt -rw-rw-r-- 1 root root 1414 Jan 24 12:13 btrfs-show-super.txt -rw-rw-r-- 1 root root 1217 Jan 24 12:16 btrfstune.txt -rw-rw-r-- 1 root root 24800 Jan 24 12:04 btrfs.txt -rw-rw-r-- 1 root root 1119 Jan 24 12:14 btrfs-zero-log.txt :~$ sudo umount /mnt
So, don't expect to use btrfs on a flash drive the way you would EXT4.
Then I started exploring the "btrfs device add" command, which complained of an existing filesystem. Adding the "-f" switch forced the process.
Code:
:~$ sudo btrfs device add /dev/sdb /home -f
Code:
:~$ sudo btrfs fi show /
Label: none uuid: ddf94bee-0a35-4c66-87b7-857db8d21a0c
Total devices 2 FS bytes used 90.90GiB
devid 1 size 336.66GiB used 129.06GiB path /dev/sda4
devid 2 size 7.46GiB used 0.00 path /dev/sdb
I didn't want to run a balance operation because I didn't want to take the time.
When I mounted /dev/sdb I saw the two standard subvolumes, @ and @home:
Code:
:~$ [FONT=courier new]sudo mount /dev/sdb /mnt[/FONT] jerry@jerry-Aspire-V3-771:~$ vdir /mnt total 0 drwxr-xr-x 1 root root 262 Feb 1 08:49 @ drwxr-xr-x 1 root root 66 Feb 4 14:43 @home
The btrfs space and usage command showed:
Code:
:~$[FONT=courier new] sudo btrfs fi df /[/FONT] Data, single: total=121.00GiB, used=90.50GiB System, DUP: total=32.00MiB, used=16.00KiB Metadata, DUP: total=4.00GiB, used=411.53MiB
Code:
:~$[FONT=courier new] sudo btrfs subvolume list /[/FONT] ID 257 gen 25251 top level 5 path @ ID 258 gen 25251 top level 5 path @home ID 1021 gen 21638 top level 257 path .snapshots ID 1022 gen 25177 top level 5 path @home/.snapshots :~$ sudo btrfs subvolume list /home ID 257 gen 25251 top level 5 path @ ID 258 gen 25251 top level 5 path @home ID 1021 gen 21638 top level 5 path @/.snapshots ID 1022 gen 25177 top level 258 path .snapshots
The fi show command still showed the same devid's.
Code:
:~$ [FONT=courier new]sudo btrfs fi show /[/FONT]
Label: none uuid: ddf94bee-0a35-4c66-87b7-857db8d21a0c
Total devices 2 FS bytes used 90.90GiB
devid 1 size 336.66GiB used 129.06GiB path /dev/sda4
devid 2 size 7.46GiB used 0.00 path /dev/sdb
Btrfs v3.12
:~$ [FONT=courier new]sudo btrfs fi show /home[/FONT]
Label: none uuid: ddf94bee-0a35-4c66-87b7-857db8d21a0c
Total devices 2 FS bytes used 90.90GiB
devid 1 size 336.66GiB used 129.06GiB path /dev/sda4
devid 2 size 7.46GiB used 0.00 path /dev/sdb
Btrfs v3.12
Code:
:~$ [FONT=courier new]sudo btrfs device delete /dev/sdb /home[/FONT]
:~$ [FONT=courier new]sudo btrfs fi show /home[/FONT]
Label: none uuid: ddf94bee-0a35-4c66-87b7-857db8d21a0c
Total devices 1 FS bytes used 90.90GiB
devid 1 size 336.66GiB used 129.06GiB path /dev/sda4
The device add command destroys the existing device formatting and replaces it. The device delete command removes the formatting:
Code:
:~$[FONT=courier new] sudo mount /dev/sdb /mnt[/FONT] NTFS signature is missing. Failed to mount '/dev/sdb': Invalid argument The device '/dev/sdb' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
I have a 7 port active USB device that could hold SEVEN 128GB flash drives!

Or, I have a 350GB USB HD that hasn't been used in a while.... mmmm ....



Leave a comment: