Re: Migration from CentOS7/Nautilus to CentOS Stream/Pacific

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Carlos Mogas da Silva <r3pek@xxxxxxxxx>
> Sent: Wednesday, December 8, 2021 1:26 PM
> To: Edward R Huyer <erhvks@xxxxxxx>; Marc <Marc@xxxxxxxxxxxxxxxxx>;
> ceph-users@xxxxxxx
> Subject: Re:  Re: Migration from CentOS7/Nautilus to CentOS
> Stream/Pacific
> 
> On Wed, 2021-12-08 at 16:42 +0000, Edward R Huyer wrote:
> >
> > I did a similar upgrade over the summer, only from RHEL7 to RHEL8, and
> > the "backup key directories/files, clean install, restore directories"
> > is essentially what you have to do, with the extra step of telling
> > Ceph to re-detect your OSDs and recreate the startup scripts.  That
> > last bit is easier if all your OSDs are already LVM-based rather than
> simple.  If you have simple OSDs, make sure you grab the JSON files for them
> in /etc/ceph.
> >
> > I can try to figure out what commands I used for some of this if needed.
> 
> 
> If that's cool with you, I wouldn't mind since it can help a lot just to figure out
> what exactly needs to be done (you can send it of-list if you prefer). OSDs
> are already LVM based.

I'll put it here in case it's useful to someone else in the future.

I'll note that I'm reconstructing something from months ago that I was figuring out as I went, expecting to never need it again.  Some things may be incomplete or unnecessary.  Also, this was RHEL7->8, not Cent.  Differences should be minimal, but YMMV.
 
Ok, you're going to want to preserve the following:
/etc/ceph
/etc/systemd/system/ceph-mgr.target.wants
/etc/systemd/system/ceph-mon.target.wants  (These should let you start the mons and mgrs without going through the process of creating new ones.)
/var/lib/ceph/bootstrap-mds
/var/lib/ceph/bootstrap-mgr
/var/lib/ceph/bootstrap-osd
/var/lib/ceph/bootstrap-rbd
/var/lib/ceph/bootstrap-rbd-mirror
/var/lib/ceph/bootstrap-rgw
/var/lib/ceph/mgr
/var/lib/ceph/mon

Note that the /var/lib/ceph directories do not include /var/lib/ceph/osd.  All the data in the directories under there lives on the OSDs themselves, so you don't need to carry that over.  /var/lib/ceph/mon is the most important, since that's where your mon's brains live.  Anyway, tar all that up and copy the tarball off the server.

Do your whole reinstall of the OS and Ceph.  Don't touch your OSD drives, obviously.  Copy your tarball over and extract the contents to where they need to go.  Open your firewall, if necessary.  If Cent uses firewalld, this should do it:
firewall-cmd --add-service ceph
firewall-cmd --add-service ceph-mon
firewall-cmd --permanent --add-service ceph
firewall-cmd --permanent --add-service ceph-mon

Adjust as needed for your environment.

Start the monitor with
systemctl start ceph-mon.target
Make sure that's running correctly before continuing.  I think this also autostarts the mgr.

Tell ceph-volume to find all the existing lvm-based OSDs, create the relevant startup scripts, and start them.
ceph-volume lvm activate --all 

Then wait for recovery.  That should be it as far as the reinstall goes.  If you do in fact have some simple OSDs lying around after all, you'll need
ceph-volume simple activate --file /etc/ceph/osd/[filename]

Hope this helps.
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux