[Lustre-discuss] Renaming an existing lustre filesystem

548 views
Skip to first unread message

James Robnett

unread,
Feb 11, 2011, 6:56:47 PM2/11/11
to lustre-...@lists.lustre.org

I thought this would be trivial but after looking at the tunefs.lustre
docs I find I'm not 100% positive.

I have a single MDS server and 4 OSSes each with 2 OSTs. Currently
all OST's and the MDT are unmounted.

I would like to change the filesystem name without damaging any data.

Looking at examples it's not entirely clear to me whether I need to do
anything on the OSSes and what the exact syntax for tunefs should be
on the MDS.

Could somebody provide the proper options/flags I need and whether the
OSSes do or don't need to be informed.

for example
tunefs.lustre --writeconf --mgs --fsname="foobar" /dev/XXX

James Robnett


_______________________________________________
Lustre-discuss mailing list
Lustre-...@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss

James Robnett

unread,
Feb 14, 2011, 10:34:14 AM2/14/11
to lustre-...@lists.lustre.org

I re-read the 1.8 manual and man8 of tunefs and I don't feel any
more confident in the exact syntax than I did Friday. There's some
1.4 to 1.6 migration examples and a renaming snapshot example but
they differ in ways that concern me.

In fact my initial attempt

I'm fairly certain with a combined MDT/MGS the command
tunefs.lustre --writeconf --fsname={name} /dev/{dev}

is incorrect as it generated MGS errors, resubmitting the command
with --fsname={origname} allowed the MDT to be mounted but now
MGS complains when the OST's try to mount that it doesn't know about
them.

I assume the proper sequence (with everything unmounted) is

tunefs.lustre --writeconf --mgs --fsname="foobar" /dev/XXX

on the MDT/MGS

and for each OST

tunefs.lustre --writeconf --mgsnode={MGS_IP_ADDR}@tcp0
--fsname="foobar" /dev/XXX

but I'm leary of mucking things up further.

BTW, this is my test lustre install not the production one so it's
not exactly the end of the world if it's destroyed though there is some
benchmark data on it I'd like to recover so I'd prefer not.

James


James Robnett wrote:
> I thought this would be trivial but after looking at the tunefs.lustre
> docs I find I'm not 100% positive.
>
> I have a single MDS server and 4 OSSes each with 2 OSTs. Currently
> all OST's and the MDT are unmounted.
>
> I would like to change the filesystem name without damaging any data.
>
> Looking at examples it's not entirely clear to me whether I need to do
> anything on the OSSes and what the exact syntax for tunefs should be
> on the MDS.
>
> Could somebody provide the proper options/flags I need and whether the
> OSSes do or don't need to be informed.
>
> for example
>
>

James Robnett

unread,
Mar 1, 2011, 4:03:32 PM3/1/11
to lustre-...@lists.lustre.org

I asked a while back about renaming a lustre instance.

After a variety of failed attempts I finally just reverted
everything. I'd still like to figure out the exact process
(or if it's trivially possible) for renaming a lustre instance.

It doesn't appear to be as simple as this on the MDS
tunefs.lustre --writeconf --mgs --mdt --fsname="foobar" /dev/XXX

and on the OSS


tunefs.lustre --writeconf --mgsnode={MGS_IP_ADDR}@tcp0
--fsname="foobar" /dev/XXX

We have two distinct lustre installs with the name "lustre" and
I'd like to rename the test one to simplify parsing of
/proc/fs/lustre/llite/XXXX on the clients.

Some docs for 1.4 to 1.6 migration reference a --reformat option
but that has ugly connotations and it's not documented in the actual
tunefs.lustre man page, which itself claims won't reformat or destroy
data.

If there's no non-destructive way to do it that's fine. If there's
an incredibly simple way and I'm being an idiot my apologies (but
I'd still like to know).

James Robnett
NRAO/NM
ps: As mentioned in the original post
http://lists.lustre.org/pipermail/lustre-discuss/2011-February/015076.html
this is a simple 1.8.5 install with a combined MGS/MDT.

Wojciech Turek

unread,
Mar 1, 2011, 7:18:59 PM3/1/11
to James Robnett, lustre-...@lists.lustre.org
Hi James,

It is possible and I did it around 3 years ago on lustre 1.6 but I think it still should work on 1.8

Stop Lustre file system
in order to change file system name run for each target:
tunefs.lustre --fsname=<fsname> --writeconf /dev/<block_device_name>
for each target do mount as ldiskfs file system. This need to be done on all OSS's and on MDS
mount -t ldiskfs /dev/<device_name> /mnt/<target_mount_point>
Delete file /mnt/<target_mount_point>/last_rcvd   # back it up before deleting just in case :)
umount all targets
Start filesystem using new name.

--
Wojciech Turek

Senior System Architect

High Performance Computing Service
University of Cambridge
Email: wj...@cam.ac.uk
Tel: (+)44 1223 763517

Wojciech Turek

unread,
Mar 1, 2011, 7:25:48 PM3/1/11
to James Robnett, lustre-...@lists.lustre.org
Actually one correction to my earlier post you need to use --reformat option with tunefs.lustre like this:

tunefs.lustre --reformat --fsname=<fsname> --writeconf /dev/<block_device_name>

This is safe and no data will be lost, --reformat is just to force the fsname change

BTW the rename procedure is in the manual but hidden under the "Restoring the File System From a Snapshot" chapter

Cheers

Wojciech

James Robnett

unread,
Mar 1, 2011, 7:53:52 PM3/1/11
to Wojciech Turek, lustre-...@lists.lustre.org

Thanks for the reply. I saw the "Restoring the File system from a
snapshot" docs and its reference to --reformat. It wasn't clear from
the context whether that was destructive.

Anyway I'll give that a shot. Looks like I was doing the right
thing modulo the ldiskfs step and deleting last_rcvd. This is our
test system so if I goof it's only annoying to me.

James

> Actually one correction to my earlier post you need to use --reformat
> option
> with tunefs.lustre like this:
>
> tunefs.lustre --reformat --fsname=<fsname> --writeconf
> /dev/<block_device_name>
>
> This is safe and no data will be lost, --reformat is just to force the
> fsname change
>
> BTW the rename procedure is in the manual but hidden under the "Restoring
> the File System From a Snapshot" chapter
>
> Cheers
>
> Wojciech
>

_______________________________________________

Wojciech Turek

unread,
Mar 3, 2011, 6:59:03 AM3/3/11
to jrob...@aoc.nrao.edu, lustre-...@lists.lustre.org
Yes --reformat option is not very reassuring. However I dug out some three years old notes (this is when I have rename file system last time) and they have the same option and this was done on one of the production FS but of course always best to test it on small loop dev Lustre FS.



On 2 March 2011 00:53, James Robnett <jrob...@aoc.nrao.edu> wrote:

  Thanks for the reply.  I saw the "Restoring the File system from a
snapshot" docs and its reference to --reformat.  It wasn't clear from
the context whether that was destructive.

  Anyway I'll give that a shot.  Looks like I was doing the right
thing modulo the ldiskfs step and deleting last_rcvd. This is our
test system so if I goof it's only annoying to me.

James

> Actually one correction to my earlier post you need to use --reformat
> option
> with tunefs.lustre like this:
>
> tunefs.lustre --reformat --fsname=<fsname> --writeconf
> /dev/<block_device_name>
>
> This is safe and no data will be lost, --reformat is just to force the
> fsname change
>
> BTW the rename procedure is in the manual but hidden under the "Restoring
> the File System From a Snapshot" chapter
>
> Cheers
>
> Wojciech
>




Reply all
Reply to author
Forward
0 new messages