[lustre-discuss] how to erase lustre filesystem

Jae-Hyuck Kwak jhkwak at kisti.re.kr
Thu Apr 4 02:31:18 PDT 2019


Hi,
I am newbie to lustre.
I amt testing multiple lustre filesystems on my testbed, with separete MGS.
I am wondering how to erase lustre filesystem.
 From the operations manual, it says,

13.13.  Erasing a File System
If you want to erase a file system and permanently delete all the data 
in the file system, run this command on your targets:
$ "mkfs.lustre --reformat"
If you are using a separate MGS and want to keep other file systems 
defined on that MGS, then set the writeconf flag on the MDT for that 
file system. The writeconf flag causes the configuration logs to be 
erased; they are regenerated the next time the servers start.
To set the writeconf flag on the MDT:
1. Unmount all clients/servers using this file system, run:
$ umount /mnt/lustre
2. Permanently erase the file system and, presumably, replace it with 
another file system, run:
$ mkfs.lustre --reformat --fsname spfs --mgs --mdt --index=0 /dev/ {mdsdev}
3. If you have a separate MGS (that you do not want to reformat), then 
add the --writeconf flag to mkfs.lustre on the MDT, run:
$ mkfs.lustre --reformat --writeconf --fsname spfs --mgsnode= mgs_nid 
--mdt --index=0 /dev/mds_device

But, --writeconf option no longer in supported for mkfs.lustre. I know 
it should be done by tunefs.lustre.
I'm a litte confusing about this.
For example, I have two lustre filesystem, scratch1 anc scratch2,
To erase scratch1 filesystem, Is the following process correct?
1. unmount all client, ost, mdt related to scratch1.
2. tunefs.lustre --writeconf [all ost devices belonging to scratch1]
3. tunefs.lustre --writeconf [mdt belonging to scratch1]
I have separate MGS.
Should I add --mgsnode option to tunefs.lustre?

Thanks in advance,
BR,
Jae-Hyuck






More information about the lustre-discuss mailing list