Thread
:
[HowTo][WIP] use real sdcard as home-partition and/or for android data
View Single Post
bob_bipbip
2014-01-25 , 14:24
Posts: 33 | Thanked: 25 times | Joined on Sep 2011 @ grenoble
#
29
ok, so someone here asked me how i have made all these subvolume ****, here is a exact copy of the pm i replied to:
ok, so here it goes.
first, i have to say that my jolla have a problem. sd card never mounted in the default folder (/run/user/100000/media/sdcard) so, i don't know how it will works on a "correct" jolla. but whatever, i "don't think" there will be more problem. still ...
second, i'm seeing a lot of misconception about btrfs. everyone is speeking about /dev/mmcblk1p1. btrfs do NOT need classical partition. everything you must heard about is just /dev/mmcblk1, NOT ....p1.
so first, format it in the right way:
mkfs.btrfs
-f
/dev/mmcblk1
yeah right, WITHOUT any p1. direct from the block
(the "-f" is not mandatory, it useful when you have problem because the device don't want to release it or something, whatever. try first without, if it works congrats, if you need it, use it)
we could check if it is a real btfrs file system:
btrfs filesystem show /dev/mmcblk1
then, you will be forced to mount the entire "disk" in a folder to create the subvolume:
mkdir /mnt/microsd
mount /dev/mmcblk1 /mnt/microsd/
we create can now create all the subvolume
btrfs subvolume create /mnt/microsd/Desktop
btrfs subvolume create /mnt/microsd/Documents
btrfs subvolume create /mnt/microsd/Downloads
btrfs subvolume create /mnt/microsd/Music
btrfs subvolume create /mnt/microsd/Public
btrfs subvolume create /mnt/microsd/Templates
btrfs subvolume create /mnt/microsd/Videos
btrfs subvolume create /mnt/microsd/sdcard
btrfs subvolume create /mnt/microsd/Pictures
to check if it's correct:
btrfs subvolume list /mnt/microsd/
now, you must copy all data to the new directorys:
cp -r -a -v
/data/sdcard/
/mnt/microsd/sdcard
cp /home/nemo/Pictures/Jolla/* /mnt/microsd/Pictures/Jolla/
cp /home/nemo/Video/Jolla/* /mnt/microsd/Videos/Jolla/
cp /home/nemo/Videos/Jolla/* /mnt/microsd/Videos/
(if you already have any music or something to those old directory:
cp /home/nemo/Music/*
etc ....)
then, we can mount
as you can see, the compress argument is here. btrfs is able to compress "on the fly", and, more, if the data is incompressible, it remain the same. afterward, btrfs as a flaw, it's "compress all the volume/subvolume or nothing" that why i mantioned it only time
mount -o subvol=sdcard,compress /dev/mmcblk1
/data/sdcard/
mount -o subvol=Videos /dev/mmcblk1 /home/nemo/Videos/
mount -o subvol=Desktop /dev/mmcblk1 /home/nemo/Desktop/
mount -o subvol=Documents /dev/mmcblk1 /home/nemo/Documents/
mount -o subvol=Downloads /dev/mmcblk1 /home/nemo/Downloads/
mount -o subvol=Music /dev/mmcblk1 /home/nemo/Music/
mount -o subvol=Pictures /dev/mmcblk1 /home/nemo/Pictures/
mount -o subvol=Public /dev/mmcblk1 /home/nemo/Public/
mount -o subvol=Templates /dev/mmcblk1 /home/nemo/Templates/
Voila.
Pardon my bad english
EDIT1:
there were some mistake, the green come from below, wich is ok, the blue is the true good correction.
sorry again
Last edited by bob_bipbip; 2014-01-25 at
18:46
.
Quote & Reply
|
The Following 3 Users Say Thank You to bob_bipbip For This Useful Post:
J4ZZ
,
meemorph
,
Thoke
bob_bipbip
View Public Profile
Send a private message to bob_bipbip
Find all posts by bob_bipbip