Re: shrinking btrfs (was Re: Boot problems after adding 2 new disks)

2019-02-23 Thread Andrew Greig via luv-main

Hi,

I have used gparted to clear the partition sdc2 in preparation for the 
addition to the btrfs RAID type set up.


It does not have a label such as sdc2 and is reported by gparted as 
"unallocated"


Is that the correct description for the purpose? as my machine no longer 
boots.


It enters an emergency stage where I can press CTRL+D to continue and 
then see the logs with another command, but it just tries to enter 
default mode and repeats.


Also, I note for the first time that UEFI is mentioned in the boot 
selections.


I have travelled, so far, without UEFI , although the M/B has UEFI setup 
option on the startup screen.


Lost again

Thanks

Andrew




,On 24/2/19 4:08 pm, Craig Sanders via luv-main wrote:

On Sun, Feb 24, 2019 at 03:15:19PM +1100, Andrew Greig wrote:

This should be my last message on this issue (I sincerely hope so as I have
probably redefined the meaning of "needy")

I lost the message related to the setting up of one btrfs drive and then
using the force (-f) feature to get it to add the device to the array

i don't know which message you're referring to. i already re-sent one to you,
but it seems that wasn't the right one. you can find all messages in this
thread in the LUV archives at:

https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


Re: shrinking btrfs (was Re: Boot problems after adding 2 new disks)

2019-02-23 Thread Andrew Greig via luv-main

That was a great help, thanks for directing me there.

On 24/2/19 4:08 pm, Craig Sanders via luv-main wrote:


i don't know which message you're referring to. i already re-sent one to you,
but it seems that wasn't the right one. you can find all messages in this
thread in the LUV archives at:

https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


Re: shrinking btrfs (was Re: Boot problems after adding 2 new disks)

2019-02-23 Thread Craig Sanders via luv-main
On Sun, Feb 24, 2019 at 03:15:19PM +1100, Andrew Greig wrote:
> This should be my last message on this issue (I sincerely hope so as I have
> probably redefined the meaning of "needy")
>
> I lost the message related to the setting up of one btrfs drive and then
> using the force (-f) feature to get it to add the device to the array

i don't know which message you're referring to. i already re-sent one to you,
but it seems that wasn't the right one. you can find all messages in this
thread in the LUV archives at:

https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


Re: shrinking btrfs (was Re: Boot problems after adding 2 new disks)

2019-02-23 Thread Andrew Greig via luv-main

Hi Craig,

This should be my last message on this issue (I sincerely hope so as I 
have probably redefined the meaning of "needy")


I lost the message related to the setting up of one btrfs drive and then 
using the force (-f) feature to get it to add the device to the array


run
sudo umount /dev/sdc1

prior to the force flag  it was sudo umount /dev/sdb1 /dev/sdc1

then use gparted to blitz the partitions -- so only blitz /dev/sdc1 ??

but If I Recall you said the -f could be used with /dev/sdb1 live and mounted

I am guessing, really, would the -f be placed here

btrfs device add -f /dev/sdc1/
btrfs balance start -dconvert=raid1 -mconvert=raid1 /

I am ready to jump on this if the above is correct.

Many thanks
Andrew


 



On 24/2/19 11:47 am, Craig Sanders via luv-main wrote:

[ you accidentally sent this Q as private mail. replying back to the luv-main
list ]

On Sun, Feb 24, 2019 at 08:33:25AM +1100, pushin.linux wrote:

Hi Craig,I was wondering if btrfs allows "shrinking" a patition to create
free space, and if swap at the end of an SSD was better than at the start of
a standard SATA drive

that's the kind of question that a search engine like google or
duckduckgo is good for. Also Q sites like https://askubuntu.com/ or
https://unix.stackexchange.com/

It's been years since I used btrfs for anything real (i use ZFS), so I
searched for "shrink btrfs partition" and found that it is possible.  But
first you need to know that resizing ANY filesystem always involves two steps:
resizing the fs itself, and resizing the partition that it's on. and the order
of those two steps depends on whether you are shrinking or enlarging the fs.
to shrink an fs, you first shrink the fs itself and then the partition. to
enlarge, you first enlarge the partition and then the fs.


For single-disk btrfs like on your root fs, it's fairly easy, just boot with
the "gparted live" CD/USB[1] and tell it to resize your root btrfs partition
(sda2, i think).  That will resize both the fs and the partition.

For a btrfs pool with multiple partitions/disks, it's more complicated
because gparted operates on individual drives so it doesn't resize all of the
drives/partitions in a btrfs fs at once. You have to resize each partition in
the btrfs pool separately. e.g. if you wanted to resize your /data filesystem,
you'd first have to run "gparted /dev/sdb", resize sdb2, and then "gparted
/dev/sdc" and be careful to change sdc2 to EXACTLY the same size as sdb1.



Personally, for a relatively trivial 4 or 8GB of swap space, i don't think
it's worth the bother or the risk - messing with partitions is always a risk,
it is very easy to make a mistake and that leads to data loss.

swap *IS* faster on an SSD (everything is faster on an SSD), but when you get
24GB RAM installed your system isn't going to be swapping much - it certainly
won't be thrashing stuff in and out of swap and causing performance problems.
swap usage will be occasional data + code that hasn't been in use for a while.



[1] https://gparted.org/

the gparted web site also has lots of useful info about partitioning and
filesystems, so is a good place to learn the whys and wherefores of all this
stuff.

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main


shrinking btrfs (was Re: Boot problems after adding 2 new disks)

2019-02-23 Thread Craig Sanders via luv-main
[ you accidentally sent this Q as private mail. replying back to the luv-main
list ]

On Sun, Feb 24, 2019 at 08:33:25AM +1100, pushin.linux wrote:
> Hi Craig,I was wondering if btrfs allows "shrinking" a patition to create
> free space, and if swap at the end of an SSD was better than at the start of
> a standard SATA drive

that's the kind of question that a search engine like google or
duckduckgo is good for. Also Q sites like https://askubuntu.com/ or
https://unix.stackexchange.com/

It's been years since I used btrfs for anything real (i use ZFS), so I
searched for "shrink btrfs partition" and found that it is possible.  But
first you need to know that resizing ANY filesystem always involves two steps:
resizing the fs itself, and resizing the partition that it's on. and the order
of those two steps depends on whether you are shrinking or enlarging the fs.
to shrink an fs, you first shrink the fs itself and then the partition. to
enlarge, you first enlarge the partition and then the fs.


For single-disk btrfs like on your root fs, it's fairly easy, just boot with
the "gparted live" CD/USB[1] and tell it to resize your root btrfs partition
(sda2, i think).  That will resize both the fs and the partition.

For a btrfs pool with multiple partitions/disks, it's more complicated
because gparted operates on individual drives so it doesn't resize all of the
drives/partitions in a btrfs fs at once. You have to resize each partition in
the btrfs pool separately. e.g. if you wanted to resize your /data filesystem,
you'd first have to run "gparted /dev/sdb", resize sdb2, and then "gparted
/dev/sdc" and be careful to change sdc2 to EXACTLY the same size as sdb1.



Personally, for a relatively trivial 4 or 8GB of swap space, i don't think
it's worth the bother or the risk - messing with partitions is always a risk,
it is very easy to make a mistake and that leads to data loss.

swap *IS* faster on an SSD (everything is faster on an SSD), but when you get
24GB RAM installed your system isn't going to be swapping much - it certainly
won't be thrashing stuff in and out of swap and causing performance problems.
swap usage will be occasional data + code that hasn't been in use for a while.



[1] https://gparted.org/

the gparted web site also has lots of useful info about partitioning and
filesystems, so is a good place to learn the whys and wherefores of all this
stuff.

craig

--
craig sanders 
___
luv-main mailing list
luv-main@luv.asn.au
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main