Hey,

i have a 500GB drive that is fully encrypted using a softraid with
raidlevel C. It works perfectly. But now the drive is getting full and i
have to grow it. This server is running in the Hetzner Cloud and
resizing the drive is supported to 10TB.

With an unencrypted partition this works well in OpenBSD. I can use
disklabel and growfs to enlarge the drive, but that does not work with
an encrypted partition.

correct... you can growfs a FS within an encrypted partition, but can not
grow the encrypted partition.

great, so at least i read the code right :) Does someone know if there is a patch around that maybe is waiting for reviews that would add the functionality of growing an encrypted partition itself?


Do you have any recommendations on what the best way forward is in this
case? I tried adding a new 1TB drive and copying all the files over and
just remounting it. But even with the super fast M2. SSD drives in there
it took more than 3 days to finish. (lots of small files, its my email
server)

well, you might want to have a chat with your service provider.  There's
nothing "super fast" about 500g in three days (though my VPS on my primary
web/mail server also brags about SSDs...and the slowest disk performance I
have seen in decades.  I have a note-to-self in the .profile that a
sysupgrade takes 15 minutes to keep me from freaking out during upgrades.
Other systems I have with them have more expected performance. *shrug*)

I spinned up the same server with Alpine Linux on it (LUKS with ext4) and there the 500gb got copied in around 37 minutes. I pupolated the 500gb with 1mb files with random content in them. So the disc speed seams fine. This is propobly something on OpenBSD, but i an not complaining about the speed. OpenBSD is fast enought in most cases.

Just out of interrest, i tried the same with async+noatime and softdep+noatime and there was not that much difference. (around 30 minutes difference to no mount options other than default)


I also tried doing an initial copy and then using rsync, but because
dovecot (imap server from ports) uses a lot of hardlinks rsync is not
working correctly even with the hard link option (bugs are described in
the rsync man page) and openrsync does not support handling them.

what?  where?  I'm not seeing what you are refering to here.
Also a quick web search isn't showing a problem, but I am seeing a lot
of people using rsync to back up dovecot maildir servers.  (if totally
off-topic to OpenBSD, please advise me off-list)

If you use normal maildir for storage rsync is perfect. But i am using a feature called SIS (single instance storage). This is build into dovecot and available in the OpenBSD port of the software. This basically extracts attachments of emails and stores them externally. If you have the same attachment in multiple emails dovecot uses hard links. If you have for example people who mail you with always the same horrible pictures in email signatures then this reduces the disc usage a lot! Up to 80% less disc usage in some scenarios.

The problem with rsync is, that as soon as you sync from one partition to another all hard links get copied as normal files. The hard linking only works on the same partition. So as soon as i use rsync the 500GB become around 1400GB.


Move everything you can with rsync, then deal with your maildir separately.
I've used "imapsync" before on a 30,000 user e-mail system -- first run
took a day or more, final system-down cutover run took time, but we were
down only a few hours (this was over a decade ago, don't hold me to the
numbers).

dovecot has a "dsync" tool.  Haven't used it, but it would be worth a
look at, I think.

I think thats a good idea. I am going to solve this outside of OpenBSD on the protocol level. Maybe use a second server, migrate via imap and then switch the servers back. Something like that.

Thanks for all the replies on and off list!
Thanks and greetings!
Leo

Reply via email to