Page 1 of 7 123 ... LastLast
Results 1 to 10 of 61

Thread: resize btrfs partition

  1. #1
    Join Date
    Apr 2013
    Location
    Modra, Slovakia
    Posts
    265

    Default resize btrfs partition

    I wanna resize too btrfs partition shrink home and then move it ( change the cylinder positions) so I can enlarge root parition (/home partition si right after /root physicaly in HDD). And what's the main problem/question is that physical moving, if it's possible and how to achieve that?
    13.2 KDE 64bit tumbleweed
    Lenovo G500s, Thinkpad R500

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: resize btrfs partition

    btrfs is the file system not a partition. Partitions are just containers that contain file system. Thus any partition tools can be used to move and resize. The trick would be the extending of the btrfs file system in a larger partition You will have to dig into the btrfs tools to find out about that.

  3. #3
    Join Date
    Sep 2013
    Location
    New York
    Posts
    198

    Default Re: resize btrfs partition

    btrfs filesystem resize -500m to shrink orbtrfs filesystem resize +500m to expand

  4. #4
    Join Date
    Apr 2013
    Location
    Modra, Slovakia
    Posts
    265

    Default Re: resize btrfs partition

    Yeah I know that command, but I mean like if I shrink (2) could I enlarge the 1, - will the 2 move it's postition physicaly from cylinder e.g 50000 to 55000 , cause now 1 is : e.g 30000-40000 and 2 is:40000 - 50000 ? so I can be after this op\eration 40000-55000 , you know what i mean. i.e wont it do that 2 will shnrik but from 50000-60000 it'l shrink to 50000-55000 so I can't enlarge the 1
    13.2 KDE 64bit tumbleweed
    Lenovo G500s, Thinkpad R500

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: resize btrfs partition

    That is still just the files system you need to first change the partition size and locations. Remember partitions are containers of file system Partitions and file systems are NOT the same thing.

    SO first you need to reduce the file system in a partition you are going to reduce. then you need to expand any file system for any partition you make larger.

  6. #6
    Join Date
    Sep 2013
    Location
    New York
    Posts
    198

    Default Re: resize btrfs partition

    you can try using GParted

  7. #7
    Join Date
    Sep 2013
    Location
    New York
    Posts
    198

    Default Re: resize btrfs partition

    just an FYI, I am pretty sure GParted will work
    BUT be VERY VERY VERY careful not to touch any partitions involved in boot process.
    also you will need to get the gparted CD and boot from it.

    what I think your steps would be (and I tried this in a VM but not with /home as I do not have one):
    1. boot from gparted CD
    2. identify your "/" "/boot" "/home" partitions
    3. shrink your /home partition to desired size
    4. move your home partition as needed
    5. expand / partition as need

    do each steps 3,4,5 in order applying changes after each steps so if something go wrong all is not lost
    and as always BACKUP FIRST BACKUP FIRST BACKUP FIRST :-)

    PS>> not sure if it applies to you but it is not recommended to move any windows partitions as it will affect the boot process

  8. #8
    Join Date
    Apr 2013
    Location
    Modra, Slovakia
    Posts
    265

    Default Re: resize btrfs partition

    thats what I thought , so if I boot from /boot parittion so don't move in any way, but can I move /root then? I mean partitions are recognized in grub by id (whole filesys is on that partition)
    13.2 KDE 64bit tumbleweed
    Lenovo G500s, Thinkpad R500

  9. #9
    Join Date
    Sep 2013
    Location
    New York
    Posts
    198

    Default Re: resize btrfs partition

    Quote Originally Posted by roberto68 View Post
    thats what I thought , so if I boot from /boot parittion so don't move in any way, but can I move /root then? I mean partitions are recognized in grub by id (whole filesys is on that partition)
    I am not sure about /root.
    everywhere I looked it is not recommended to move any windows partition and any partition used in boot. as I am not proficient with Linux File system much I personally would not try it, but I am pretty sure you can recover using emergency boot CD or something and re-point grub to the /root partition as needed.

  10. #10
    Join Date
    Apr 2013
    Location
    Modra, Slovakia
    Posts
    265

    Default Re: resize btrfs partition

    actually my situation changed alittle bit, enough said I'll rater post this
    Code:
     df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6        26G   13G   13G  51% /
    devtmpfs        1.9G   44K  1.9G   1% /dev
    tmpfs           1.9G  2.1M  1.9G   1% /dev/shm
    tmpfs           1.9G  5.2M  1.9G   1% /run
    tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
    tmpfs           1.9G  5.2M  1.9G   1% /var/lock
    tmpfs           1.9G  5.2M  1.9G   1% /var/run
    /dev/sda7        28G   22G  4.4G  83% /home
    /dev/sda12      585M  246M  297M  46% /boot
    /dev/sda1       197G   99G   88G  53% /run/media/robert/data
    so I want/need to move /boot partition and then resize /home (to ease pain in the future put the /boot before /home so I can easily enlarge the /home in the future) and then use Live CD to locate grub to find that /boot parition. I suppose that'd be like proper solution
    13.2 KDE 64bit tumbleweed
    Lenovo G500s, Thinkpad R500

Page 1 of 7 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •