* Grow btrfs partition & filesystem backwards @ 2011-11-09 4:23 Jordan Windsor 2011-11-09 8:50 ` Ernst Sjöstrand 0 siblings, 1 reply; 6+ messages in thread From: Jordan Windsor @ 2011-11-09 4:23 UTC (permalink / raw) To: linux-btrfs Hello, I was wondering how I would go about growing a btrfs filesystem backwards, I don't have any space to store the files temporally, I'd need to do it in place. Thanks. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Grow btrfs partition & filesystem backwards 2011-11-09 4:23 Grow btrfs partition & filesystem backwards Jordan Windsor @ 2011-11-09 8:50 ` Ernst Sjöstrand 2011-11-09 12:40 ` Billy Crook 0 siblings, 1 reply; 6+ messages in thread From: Ernst Sjöstrand @ 2011-11-09 8:50 UTC (permalink / raw) To: Jordan Windsor; +Cc: linux-btrfs Gparted can do that, it just takes a very long time because it moves everything back first. Regards //Ernst On Wed, Nov 9, 2011 at 05:23, Jordan Windsor <jordanw2@gmail.com> wrote= : > Hello, > I was wondering how I would go about growing a btrfs filesystem > backwards, I don't have any space to store the files temporally, I'd > need to do it in place. > Thanks. > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs= " in > the body of a message to majordomo@vger.kernel.org > More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht= ml > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Grow btrfs partition & filesystem backwards 2011-11-09 8:50 ` Ernst Sjöstrand @ 2011-11-09 12:40 ` Billy Crook 2011-11-09 13:36 ` Chris Mason 0 siblings, 1 reply; 6+ messages in thread From: Billy Crook @ 2011-11-09 12:40 UTC (permalink / raw) To: Ernst Sjöstrand; +Cc: Jordan Windsor, linux-btrfs I think the biggest point of contention is that with all the stuff going on in the background in btrfs, its difficult to be sure that the resize operation has completed. With grows, you don't have to worry. With shrinks, if you truncate the block device too soon, you will corrupt the filesystem. 2011/11/9 Ernst Sj=F6strand <ernstp@gmail.com>: > Gparted can do that, it just takes a very long time because it moves > everything back first. > > Regards > //Ernst > > On Wed, Nov 9, 2011 at 05:23, Jordan Windsor <jordanw2@gmail.com> wro= te: >> Hello, >> I was wondering how I would go about growing a btrfs filesystem >> backwards, I don't have any space to store the files temporally, I'd >> need to do it in place. >> Thanks. >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-btrf= s" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs= " in > the body of a message to majordomo@vger.kernel.org > More majordomo info at =A0http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Grow btrfs partition & filesystem backwards 2011-11-09 12:40 ` Billy Crook @ 2011-11-09 13:36 ` Chris Mason 2011-11-09 18:58 ` Goffredo Baroncelli 0 siblings, 1 reply; 6+ messages in thread From: Chris Mason @ 2011-11-09 13:36 UTC (permalink / raw) To: Billy Crook; +Cc: Ernst Sjöstrand, Jordan Windsor, linux-btrfs The only choice for an online operation is to make a new partition in front of the old one and just add that as a second disk in btrfs. The slow method of shifting the bytes down is probably a better long term choice. -chris On Wed, Nov 09, 2011 at 06:40:06AM -0600, Billy Crook wrote: > I think the biggest point of contention is that with all the stuff > going on in the background in btrfs, its difficult to be sure that th= e > resize operation has completed. With grows, you don't have to worry. > With shrinks, if you truncate the block device too soon, you will > corrupt the filesystem. >=20 > 2011/11/9 Ernst Sj=F6strand <ernstp@gmail.com>: > > Gparted can do that, it just takes a very long time because it move= s > > everything back first. > > > > Regards > > //Ernst > > > > On Wed, Nov 9, 2011 at 05:23, Jordan Windsor <jordanw2@gmail.com> w= rote: > >> Hello, > >> I was wondering how I would go about growing a btrfs filesystem > >> backwards, I don't have any space to store the files temporally, I= 'd > >> need to do it in place. > >> Thanks. > >> -- > >> To unsubscribe from this list: send the line "unsubscribe linux-bt= rfs" in > >> the body of a message to majordomo@vger.kernel.org > >> More majordomo info at =A0http://vger.kernel.org/majordomo-info.ht= ml > >> > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-btr= fs" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at =A0http://vger.kernel.org/majordomo-info.htm= l > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs= " in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Grow btrfs partition & filesystem backwards 2011-11-09 13:36 ` Chris Mason @ 2011-11-09 18:58 ` Goffredo Baroncelli 2011-11-09 19:26 ` Chris Mason 0 siblings, 1 reply; 6+ messages in thread From: Goffredo Baroncelli @ 2011-11-09 18:58 UTC (permalink / raw) To: Chris Mason, Billy Crook, chris.mason Cc: Ernst Sjöstrand, Jordan Windsor, linux-btrfs On Wednesday, 09 November, 2011 08:36:24 Chris Mason wrote: > The only choice for an online operation is to make a new partition in > front of the old one and just add that as a second disk in btrfs. >=20 > The slow method of shifting the bytes down is probably a better long > term choice. >=20 > -chris Hi Chris, does the chunk tree be able to map the sectors "before" ? If so we shou= ld only=20 "shift down" the map logical->physical in the chunk tree/device tree. The only exception should be the superblock which has to be moved. At the mount time we should pass a parameter which set how the data sho= uld be=20 moved backward. Then the kernel remap the chunk tree/device tree. I don't know if the gains is greater than the work, but from a theoreti= cal=20 point of view, it should be doable.. >=20 > On Wed, Nov 09, 2011 at 06:40:06AM -0600, Billy Crook wrote: > > I think the biggest point of contention is that with all the stuff > > going on in the background in btrfs, its difficult to be sure that = the > > resize operation has completed. With grows, you don't have to worr= y. > > With shrinks, if you truncate the block device too soon, you will > > corrupt the filesystem. > >=20 > > 2011/11/9 Ernst Sj=F6strand <ernstp@gmail.com>: > > > Gparted can do that, it just takes a very long time because it mo= ves > > > everything back first. > > >=20 > > > Regards > > > //Ernst > > >=20 > > > On Wed, Nov 9, 2011 at 05:23, Jordan Windsor <jordanw2@gmail.com>= wrote: > > >> Hello, > > >> I was wondering how I would go about growing a btrfs filesystem > > >> backwards, I don't have any space to store the files temporally, > > >> I'd > > >> need to do it in place. > > >> Thanks. > > >> -- > > >> To unsubscribe from this list: send the line "unsubscribe > > >> linux-btrfs" in the body of a message to > > >> majordomo@vger.kernel.org > > >> More majordomo info at http://vger.kernel.org/majordomo-info.ht= ml > > >=20 > > > -- > > > To unsubscribe from this list: send the line "unsubscribe > > > linux-btrfs" in the body of a message to majordomo@vger.kernel.or= g > > > More majordomo info at http://vger.kernel.org/majordomo-info.htm= l > >=20 > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-btr= fs" > > in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html >=20 > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs= " in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --=20 gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwi= nd.it> Key fingerprint =3D 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Grow btrfs partition & filesystem backwards 2011-11-09 18:58 ` Goffredo Baroncelli @ 2011-11-09 19:26 ` Chris Mason 0 siblings, 0 replies; 6+ messages in thread From: Chris Mason @ 2011-11-09 19:26 UTC (permalink / raw) To: Goffredo Baroncelli Cc: Billy Crook, Ernst Sjöstrand, Jordan Windsor, linux-btrfs On Wed, Nov 09, 2011 at 07:58:44PM +0100, Goffredo Baroncelli wrote: > On Wednesday, 09 November, 2011 08:36:24 Chris Mason wrote: > > The only choice for an online operation is to make a new partition in > > front of the old one and just add that as a second disk in btrfs. > > > > The slow method of shifting the bytes down is probably a better long > > term choice. > > > > -chris > > Hi Chris, > > does the chunk tree be able to map the sectors "before" ? If so we should only > "shift down" the map logical->physical in the chunk tree/device tree. > > The only exception should be the superblock which has to be moved. > > At the mount time we should pass a parameter which set how the data should be > moved backward. Then the kernel remap the chunk tree/device tree. > > I don't know if the gains is greater than the work, but from a theoretical > point of view, it should be doable.. Agreed, if we wanted to sit down and write a tool, it wouldn't be that complex. The only tricky part is maintaining alignment and position of the super blocks. -chris ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-09 19:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-09 4:23 Grow btrfs partition & filesystem backwards Jordan Windsor 2011-11-09 8:50 ` Ernst Sjöstrand 2011-11-09 12:40 ` Billy Crook 2011-11-09 13:36 ` Chris Mason 2011-11-09 18:58 ` Goffredo Baroncelli 2011-11-09 19:26 ` Chris Mason
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox