James Robnett
2011-Feb-11 23:56 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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
James Robnett
2011-Feb-14 15:34 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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 > > > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/lustre-discuss
James Robnett
2011-Mar-01 21:03 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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
2011-Mar-02 00:18 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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. On 1 March 2011 21:03, James Robnett <jrobnett at aoc.nrao.edu> wrote:> > 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. > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/lustre-discuss >-- Wojciech Turek Senior System Architect High Performance Computing Service University of Cambridge Email: wjt27 at cam.ac.uk Tel: (+)44 1223 763517 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20110302/d0928726/attachment.html
Wojciech Turek
2011-Mar-02 00:25 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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 On 2 March 2011 00:18, Wojciech Turek <wjt27 at cam.ac.uk> wrote:> 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. > > > On 1 March 2011 21:03, James Robnett <jrobnett at aoc.nrao.edu> wrote: > >> >> 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. >> _______________________________________________ >> Lustre-discuss mailing list >> Lustre-discuss at lists.lustre.org >> http://lists.lustre.org/mailman/listinfo/lustre-discuss >> > > > > -- > Wojciech Turek > > Senior System Architect > > High Performance Computing Service > University of Cambridge > Email: wjt27 at cam.ac.uk > Tel: (+)44 1223 763517 >-- Wojciech Turek Senior System Architect High Performance Computing Service University of Cambridge Email: wjt27 at cam.ac.uk Tel: (+)44 1223 763517 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20110302/dee0dc68/attachment.html
James Robnett
2011-Mar-02 00:53 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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
2011-Mar-03 11:59 UTC
[Lustre-discuss] Renaming an existing lustre filesystem
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 <jrobnett at 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 > > > >-- Wojciech Turek Senior System Architect High Performance Computing Service University of Cambridge Email: wjt27 at cam.ac.uk Tel: (+)44 1223 763517 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20110303/94b851de/attachment.html