Skip to contentSkip to conversation

How to create new empty journal?

DISCUSSION Fyodor Ustinov 3 participants 5 messages Jun 8, 2011 – Jun 9, 2011

lore
Share & tools
lore
#0 lore raw

Hi!

I need to create new fresh journal for OSD server without removing data. How?

WBR,
Fyodor.

#1 lore raw

Hi,

Quoted 4 lines · Fyodor Ustinov

Hi!

I need to create new fresh journal for OSD server without removing data. How?

This can be done with:

$ cosd -i <osdnum> -c /etc/ceph/ceph.conf --mkjournal

This will reset your journal.

Why do you want to do this?

Wido

Quoted 7 lines

WBR,
Fyodor.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 10 lines · Wido den Hollander

Hi,

Quoted 4 lines · Fyodor Ustinov

Hi!

I need to create new fresh journal for OSD server without removing data. How?

This can be done with:

$ cosd -i<osdnum>  -c /etc/ceph/ceph.conf --mkjournal

Thanx!

Quoted 4 lines

This will reset your journal.

Why do you want to do this?

Many cases:

1. I have journal on tempfs and want to stop ceph cluster and restart servers. After that I lose journal.

2. I want to increase journal size.

3. I want to decrease journal size.

4. I want replace journal device.

And so on.

WBR,
Fyodor.

#3 lore raw

For all of these use cases you're going to want to flush the journal to permanent store to make sure you don't lose any data.
1) Shut down the cosd.
2) Start it up again with the --flush-journal argument. It will run in the foreground and flush out any data in the journal. You're all set and can do whatever you want!
-Greg

Quoted 33 lines · Fyodor Ustinov
Quoted 5 lines · Wido den Hollander

Hi,

Quoted 1 line · Fyodor Ustinov
Quoted 8 lines
Quoted 4 lines

Hi!

I need to create new fresh journal for OSD server without removing data. How?

This can be done with:

$ cosd -i<osdnum>  -c /etc/ceph/ceph.conf --mkjournal

Thanx!

Quoted 4 lines

This will reset your journal.

Why do you want to do this?

Many cases:

1. I have journal on tempfs and want to stop ceph cluster and restart servers. After that I lose journal.

2. I want to increase journal size.

3. I want to decrease journal size.

4. I want replace journal device.

Quoted 9 lines

And so on.

WBR,
   Fyodor.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 7 lines · Gregory Farnum

For all of these use cases you're going to want to flush the journal to permanent store to make sure you don't lose any data.
1) Shut down the cosd.
2) Start it up again with the --flush-journal argument. It will run in the foreground and flush out any data in the journal. You're all set and can do whatever you want!
-Greg

Thanx!

WBR,
Fyodor.