Re: Creating journal on needed partition

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

 



Hi, Chris.

 

Thank you for your help. I found some useful stuff in these files and I coped with the task

If someone is interesting how, below is a little summary:

 

1. Create new osd

ceph-disk prepare /dev/sdaa /dev/sdaf

 

Now we have 4 partitions on sdaf, but we want to use second partition as journal disk for osd 62 (sdaa):

/dev/sdaf :

/dev/sdaf2 ceph journal

/dev/sdaf4 ceph journal, for /dev/sdaa1

/dev/sdaf3 ceph journal, for /dev/sdab1

/dev/sdaf1 ceph journal, for /dev/sdz1

 

2. Remove 2nd and 4th partitions (use parted or fdisk)

3. Create 2nd partition again (for this purpose I prefer to use fdisk). You must use the same start and end sectors, that were before we have deleted 2nd part.

4. Change TYPE-UUID for the partition:

sgdisk --typecode=2:45B0969E-9B03-4F30-B4C6-B4B80CEFF106 /dev/sdaf

 

5. Change name of the partition (parted)

6. Check, that the name and the type-uuid were changed

7. Mount osd's disk and remove journal symlink and journal_uuid file

mount /dev/sdaa1 /var/lib/ceph/osd/ceph-62

rm /var/lib/ceph/osd/ceph-62/journal

rm /var/lib/ceph/osd/ceph-62/journal_uuid

 

8. Find which partuuid has the 2nd partition:

ls -l /dev/disk/by-partuuid/ | grep sdaf2

lrwxrwxrwx 1 root root 11 Apr 18 14:29 a580981f-2526-4b5d-8632-8db39f301a70 -> ../../sdaf2

 

9. Create new journal symlink and journal_uuid file:

sudo -u ceph ln -s /dev/disk/by-partuuid/a580981f-2526-4b5d-8632-8db39f301a70 /var/lib/ceph/osd/ceph-62/journal

sudo -u ceph bash -c "echo 'a580981f-2526-4b5d-8632-8db39f301a70' > /var/lib/ceph/osd/ceph-62/journal_uuid"

 

10. Start osd

 

 

Yours truly,

Nikita

 

 

 

-----Original Message-----

From: Chris Apsey [mailto:bitskrieg@xxxxxxxxxxxxx]

Sent: Monday, April 17, 2017 4:21 PM

To: Nikita Shalnov <n.shalnov@xxxxxxxxxx>

Cc: ceph-users <ceph-users@xxxxxxxxxxxxxx>

Subject: Re: Creating journal on needed partition

 

Nikita,

 

Take a look at

https://git.cybbh.space/vta/saltstack/tree/master/apps/ceph

 

Particularly files/init-journal.sh and files/osd-bootstrap.sh

 

We use salt to do some of the legwork (templatizing the bootstrap process), but for the most part it is all just a bunch of shell scripts with some control flow.  We partition an nvme device and then create symlinks from osds to the partitions in a per-determined fashion.  We don't use ceph-desk at all.

 

---

v/r

 

Chris Apsey

bitskrieg@xxxxxxxxxxxxx

https://www.bitskrieg.net

 

On 2017-04-17 08:56, Nikita Shalnov wrote:

> Hi all.

>

> Is there any way to create osd manually, which would use a designated

> partition of the journal disk (without using ceph-ansible)?

>

> I have journals on SSD disks nad each journal disk contains 3

> partitions for 3 osds.

>

> Example: one of the osds crashed. I changed a disk (sdaa) and want to

> prepare the disk for adding to the cluster. Here is the journal, that

> should be used by new osd:

>

> /dev/sdaf :

>

> /dev/sdaf2 ceph journal

>

> /dev/sdaf3 ceph journal, for /dev/sdab1

>

> /dev/sdaf1 ceph journal, for /dev/sdz1

>

> You see, that the bad disk used a second partition. If I run CEPH-DISK

> PREPARE  /DEV/SDAA /DEV/SDAF, ceph-disk creates /dev/sdaf4 partition

> and sets it as journal disk for the osd. But I want to use second

> empty partition (/dev/sdaf2). If I delete /dev/sdaf2 partition, the

> behavior doesn't change.

>

> Can someone help me?

>

> BR,

>

> Nikita

>

>

> _______________________________________________

> ceph-users mailing list

> ceph-users@xxxxxxxxxxxxxx

> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

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


  Powered by Linux