We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

btrfs balancing preparation

asked 2015-05-08 14:03:37 +0300

bennypr0fane gravatar image

updated 2015-06-15 04:12:46 +0300

Hello, my phone has the BTRFS disease, it's totally out of space. This caused the 1.1.4 update to fail badly, I can't use the GUI anymore and I'm stuck with ssh access. Apparently, to prepare for performing the balance operation, I need to clear as much space as possible.

However, what meager knowledge of the Linux command line I have will only get me so far in tracking down the largest space hogs and efficiently getting rid of them. Could I get some command line help from the pros for

  1. quickly finding largest and unneeded files and
  2. deleting them in bulk wherever possible?

Otherwise this will literally take me weeks to get done, and it'd be quicker and less effort to send it in for repair.

EDIT: Now I performed the balance operations twice, and apparently after the 2nd one I have less space left than after the first, is that normal?

[root@Jolla nemo]# btrfs balance start / Done, had to relocate 22 out of 22 chunks [root@Jolla nemo]# btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387 Total devices 1 FS bytes used 6.48GiB devid 1 size 13.75GiB used 9.12GiB path /dev/mmcblk0p28 Btrfs v3.16 [root@Jolla nemo]# btrfs balance start / Done, had to relocate 12 out of 12 chunks [root@Jolla nemo]# btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387 Total devices 1 FS bytes used 6.49GiB devid 1 size 13.75GiB used 10.13GiB path /dev/mmcblk0p28 Btrfs v3.16

edit retag flag offensive close delete

Comments

Do you have any important files in the phone? If so, you can copy some of them to your pc using ssh or to the sdcard. For sure you can recover the backups you created and the contacts (there is an all.vcf file in your home folder) but I don't know much more about sailfish, sorry.

c.la ( 2015-05-08 14:51:00 +0300 )edit
1

You can find out where the largest files are with:

du -sh *

Best as devel-su and from the root directory.

heubergen ( 2015-05-08 17:05:47 +0300 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2015-05-08 17:00:51 +0300

casanunda gravatar image

updated 2015-05-08 17:06:58 +0300

Typical large Folders are the Pictures ("/home/nemo/Pictures") and Videos ("/home/nemo/Videos") folders. Even the stock Videos from Jolla take up several hundred MB of space.

If you have made system backups, the can include a lot of space (my /home/nemo/.vault/ folder contains 770MB right now. IF you have already copied your backups to SD card before, you can delete / empty this complete folder. If you have not, there is a how-to somewhere here (EDIT: https://together.jolla.com/question/53/how-user-can-take-backups-out-of-device/?answer=57#post-id-57 ) showing how you can manually copy the backup.It is best to use "tar" command for that because it is necessary to keep all file permissions intact - otherwise you will get problems when you try to use the backup.

# tar cf $XDG_RUNTIME_DIR/media/sdcard/xxxxxxx/vault.tar -C $HOME .vault

should do the trick, where "xxxxxxx" is the number assigned to your actual SD card.

Other large folders and files are often found in Android app folders (e.g. if you have Here Maps installed and downloaded map data etc...)

Depending on your usage, /home/nemo/Downloads folder might contain a lot of unneeded files.

edit flag offensive delete publish link more

Comments

Would you say it's safe (as in, not breaking system functionality) to delete all contents of the /home/nemo/android_storage folder? It seems to be the largest one.

bennypr0fane ( 2015-06-14 20:20:44 +0300 )edit

Now I performed the balance operations twice, and apparently after the 2nd one I have less space left than after the first, is that normal? [root@Jolla nemo]# btrfs balance start / Done, had to relocate 22 out of 22 chunks [root@Jolla nemo]# btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387 Total devices 1 FS bytes used 6.48GiB devid 1 size 13.75GiB used 9.12GiB path /dev/mmcblk0p28 Btrfs v3.16 [root@Jolla nemo]# btrfs balance start / Done, had to relocate 12 out of 12 chunks [root@Jolla nemo]# btrfs fi show ERROR: unable get label Inappropriate ioctl for device Label: 'sailfish' uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387 Total devices 1 FS bytes used 6.49GiB devid 1 size 13.75GiB used 10.13GiB path /dev/mmcblk0p28 Btrfs v3.16

bennypr0fane ( 2015-06-15 04:11:43 +0300 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2015-05-08 14:03:37 +0300

Seen: 1,469 times

Last updated: Jun 15 '15