Re: growfs(8) to lower offset
On Tue, Nov 06, 2018 at 09:18:27AM -0500, David Higgs wrote: > > As the FAQ entry states, you can use growfs(8) if the empty space > > is after the existing partition, not prior. You can only grow a > > partition "down", never "up". What you want to do would require the > > following steps: > > > > 1. Create a new partition on the free space > > 2. Move all data to the new partition > > 3. Remove the existing /project partition > > 4. Use growfs(8) on the new partition to include the space from the old > >/project partition > > You appear to be right - I see it now. I had not read closely enough, > and had focused more on what I could change with the 'm' disklabel(8) > command. It would be nice if this info were made explicit in the > growfs(8) man page as well. > > I had already successfully rearranged some partitions using the method > you propose, but unfortunately the amount of data in /project is > slightly too big to be easily shifted into my remaining free space. > I'll try to compress it or temporarily move the data off-system. > I use growfs a lot. I try to plan ahead of time to put partitions that I can sacrifice when I desperately need to possibly grow something like /usr/local or some other important partition. Sometimes I have a partition for the PKG_CACHE when I need to avoid downloading the packages twice for another computer. This is a partition, for me, that I can sacrifice and use to grow the preceding partition. Buy a bigger disk is not always a practical answer. If you haven't already done it, taking a picture of disklabel, fstab and df never hurt. Easier than writing it down. Well, I've been in your position pulling out hairs many times. Worst case is having a small useless partition stuck in the middle somewhere. Good Luck, Chris Bennett
Re: growfs(8) to lower offset
On Tue, Nov 6, 2018 at 8:58 AM Bruno Flueckiger wrote: > > On 05.11.18 19:47, David Higgs wrote: > > I read both the FAQ section and the growfs(8) man page but I am not > > yet confident that what I want to do is supported / safe. > > > > http://www.openbsd.org/faq/faq14.html#GrowPartition > > > > I started with a number of partitions and a bunch of free space. I > > later needed the free space and allocated a /project partition that > > went to the end of my disk. More recently, I emptied the /data > > partition immediately prior. Now I would like to use growfs(8) to > > merge this unused space with the /project partition without losing any > > of the existing data. > > > > See disklabel output below. I have only grown partitions "down", > > never in the other direction. Am I being overly paranoid? > > > > Thanks. > > > > --david > > > > As the FAQ entry states, you can use growfs(8) if the empty space > is after the existing partition, not prior. You can only grow a > partition "down", never "up". What you want to do would require the > following steps: > > 1. Create a new partition on the free space > 2. Move all data to the new partition > 3. Remove the existing /project partition > 4. Use growfs(8) on the new partition to include the space from the old >/project partition You appear to be right - I see it now. I had not read closely enough, and had focused more on what I could change with the 'm' disklabel(8) command. It would be nice if this info were made explicit in the growfs(8) man page as well. I had already successfully rearranged some partitions using the method you propose, but unfortunately the amount of data in /project is slightly too big to be easily shifted into my remaining free space. I'll try to compress it or temporarily move the data off-system. Thanks for the clue-stick. --david
Re: growfs(8) to lower offset
On 05.11.18 19:47, David Higgs wrote: > I read both the FAQ section and the growfs(8) man page but I am not > yet confident that what I want to do is supported / safe. > > http://www.openbsd.org/faq/faq14.html#GrowPartition > > I started with a number of partitions and a bunch of free space. I > later needed the free space and allocated a /project partition that > went to the end of my disk. More recently, I emptied the /data > partition immediately prior. Now I would like to use growfs(8) to > merge this unused space with the /project partition without losing any > of the existing data. > > See disklabel output below. I have only grown partitions "down", > never in the other direction. Am I being overly paranoid? > > Thanks. > > --david > As the FAQ entry states, you can use growfs(8) if the empty space is after the existing partition, not prior. You can only grow a partition "down", never "up". What you want to do would require the following steps: 1. Create a new partition on the free space 2. Move all data to the new partition 3. Remove the existing /project partition 4. Use growfs(8) on the new partition to include the space from the old /project partition Cheers, Bruno