Jump to content


Photo

HPR - HPR1228: Utilizing Maximum Space on a Cloned BTRFS Partition


  • Please log in to reply
No replies to this topic

#1 BINREV SPYD3R

BINREV SPYD3R

    Live to Hack...Hack to Live.

  • Members
  • 2,399 posts

Posted 16 April 2013 - 07:00 PM

Utilizing Maximum Space on a Cloned BTRFS Partitionby FiftyOneFifty If you clone a disk to a disk, Clonezilla will increase(decrease) the size of each partition proportional to the relative sizeof the drives. I wanted to keep my / the same size and have no swap (new drive was SSD), so I did a partion to partion clone instead Created partions on the new SSDs with a GParted Live CD, 12Gb root (Ext4) and the remained for /home, (btrfs, because I planned to move to SSD from the start, and last summer only btrfs supported TRIM) After cloning /dev/sda1 to /dev/sdb1 and /dev/sda2 to /dev/sdb2 using Clonezilla, I inspected the new volumes with the GParted Live CD /dev/sdb2 had 40% unaccessable space, i.e., the usable space was the same size as the old /home volume GParted flagged the error and said I could correct it from themenu (Partition->Check) but btrfs doesn't support fschk, so itdidn't work Tried shrinking the volume in GParted and re-expanding it to take up the free space, also didn't work. Discovered 'btrfs utility' and that it was supported by the GParted Live CD Make a mount point sudo mkdir /media/btrfs Mount the btrfs volume sudo mount /dev/sdb2 /media/btrfs Use btrfs utility to expand the btrfs file system to the maximun size of the volume sudo btrfs filesystem resize max /media/btrfs Unmount the btrfs volume sudo umount /dev/sdb2 Rechecked /dev/sdb2 with GParted, I no longer had unaccessible space

Go to this episode




BinRev is hosted by the great people at Lunarpages!