USB Partition
Re: USB Partition
I've run the above script to resize a 16GB stick and when I check in Gparted, the btrfs partition has indeed filled the empty space. However, when I boot using the resized stick, the disk utility tells me there is only 3.2GB total file system capacity and only 658MB available. I am also getting disk space warnings.
Any ideas why the whole btrfs partition isn't being recognised?
Any ideas why the whole btrfs partition isn't being recognised?
-
- Posts: 19
- Joined: Mon Mar 28, 2011 1:37 am
- Location: Huddersfield, UK
Re: USB Partition
having the same problem here only on a 500gb hdd. resized to 500gb but showing as 3.2gb with 24mb free space. keep getting free space warnings too. am puzzled.
Re: USB Partition
I followed the instructions too & got the same result. I thought it was just me being too stoopid to follow instructions. In the end I just changed to the ext4 version & used gparted on another linux machine to resize it.
Re: USB Partition
Would it be feasible to write the ext4 image to a USB stick, resize the partition using Gparted to fill the empty space, then use the 'btrfs-convert' tool to convert it to btrfs?
As mentioned above, resizing the btrfs partition appears to work (from a Gparted perspective) but the Disk Usage Analyser still shows the unresized partition properties - and there are copious warnings about the root filesystem being almost out of space. Is there a config file somewhere that needs editing before the full btrfs partition is available?
I don't know much about btrfs and any help would be appreciated.
As mentioned above, resizing the btrfs partition appears to work (from a Gparted perspective) but the Disk Usage Analyser still shows the unresized partition properties - and there are copious warnings about the root filesystem being almost out of space. Is there a config file somewhere that needs editing before the full btrfs partition is available?
I don't know much about btrfs and any help would be appreciated.
Re: USB Partition
Looks like the resize isn't complete. I resize the btrfs partition on 4gb sticks to fill the space on 8gb and the free space is correct. there could still be some free space issues with btrfs, but it still should show the free space correct after the initial resize etc. you did resize both the partition (when not mounted), then the underlying btrfs (while it is mounted) ?Jonathan Bowley wrote:having the same problem here only on a 500gb hdd. resized to 500gb but showing as 3.2gb with 24mb free space. keep getting free space warnings too. am puzzled.
could I ask you try it again and paste the output from my resize tool. Please use a recent linux release to do it. Ubuntu natty live cd would suffice.
Re: USB Partition
So, if I have this right, I need to resize the partition using 'sudo ./resizebtrfs.sh /dev/sdb' - sdb being the unmounted device I want to resize.BuZz wrote:Looks like the resize isn't complete.
After doing this I need boot from the device with the resized partition and run 'sudo btrfsctl -r max /'
I think I missed out a secondary step because this thread seems to imply that the shell script will do it all.
Last edited by gegs on Tue Apr 05, 2011 1:53 pm, edited 1 time in total.
Re: USB Partition
using resizebtrfs.sh you dont need to do anything apart from that command. it resizes the underlying partition, then mounts and resizes the btrfs to fill the larger partition. shouldn't need anything else. not saying there may not be bugs mind 

Re: USB Partition
As I think my posts and another couple illustrate, this isn't happening as it should. The btrfs partition does fill the unused space but it is not recognised as the root file system (hence the out of space errors and erroneous disk capacity info on 'disk usage analyser')BuZz wrote:using resizebtrfs.sh you dont need to do anything apart from that command. it resizes the underlying partition, then mounts and resizes the btrfs to fill the larger partition. shouldn't need anything else. not saying there may not be bugs mind
Re: USB Partition
btrfs has a number of "space" related issues, some of them quite complicated. Also information given on disk usage analyzer may not be actually 100% correct - https://btrfs.wiki.kernel.org/index.php ... ts_left.21 and https://btrfs.wiki.kernel.org/index.php ... e_space.3F
To give some more advice, I need real numbers/data to look at, such as the output from
btrfs fi df /
df -h
parted /dev/device print
To give some more advice, I need real numbers/data to look at, such as the output from
btrfs fi df /
df -h
parted /dev/device print
Re: USB Partition
Thanks Buzz, I'll check this out when my Joggler is at hand.
I suspect you're right that the system is just misrepresenting the size and available space of the system volume because Gparted can see it no problem.
Strangely enough, this is only a problem with my USB stick. I created a FAT32 partition towards the end of a portable hard disk installation and resized the preceding (non-compressed) btrfs partition to 50GB. The disk usage analyzer doesn't misrepresent the available space and I've never had root file system 'out of space' error messages.
I suspect you're right that the system is just misrepresenting the size and available space of the system volume because Gparted can see it no problem.
Strangely enough, this is only a problem with my USB stick. I created a FAT32 partition towards the end of a portable hard disk installation and resized the preceding (non-compressed) btrfs partition to 50GB. The disk usage analyzer doesn't misrepresent the available space and I've never had root file system 'out of space' error messages.
Re: USB Partition
I had problems with the script also resizing on an Ubuntu 10.10 install but it turned out I didn't have btrfs-tools installed, after this all is good, thanks !
Re: USB Partition
yeh it needs btrfs-tools and also parted.
Re: USB Partition
Being curious, I downloaded the 1.9 image and resized it using the shell script - and the full btrfs volume is now recognised. Fantastic!
Re: USB Partition
Joggler Gremlins!