[erlang-questions] mnesia, ordered_set and disc_copies

Jachym Holecek <>
Wed Oct 31 22:09:44 CET 2012

# Philip Clarke 2012-10-31:
> Hi,
> I have a simple record defined as:
> -record(user, {id, name}).
> Next I start up mnesia and try to create a table as follows:
> mnesia:create_table(user, [{type, ordered_set}, {disc_copies, [node()]},
> {attributes, record_info(fields, user)}]).
> This gives me this error:
> {aborted,{}}
> If i change the table type to be ram_copies, everything works fine.
> I realise that I cannot use disc_only_copies with ordered_set, but I
> thought that disc_copies was supported.
> Am I doing something else wrong ?

Did you forget to install disc_copies schema first? I don't think you can
have disc_copies tables with ram_copies schema.

  Eshell V5.8.5  (abort with ^G)
  ()1> mnesia:create_schema([node()]).
  ()2> mnesia:start().
  ()3> mnesia:create_table(user, [{type, ordered_set},
                                           {disc_copies, [node()]},
					   {attributes, [id, name]}]).

	-- Jachym

More information about the erlang-questions mailing list