[lustre-discuss] how to erase lustre filesystem

Mohr Jr, Richard Frank (Rick Mohr) rmohr at utk.edu
Thu Apr 4 11:48:18 PDT 2019


You might need to clarify what you mean by “erase” the file system.  The procedure in the manual is intended for reformatting MDTs/OSTs that had previously been formatted for lustre.  I don’t think it actually erases data in these sense of overwriting existing data with zeros (or something similar).   It just regenerates the file system data structures (inodes, etc.) and essentially makes the previous data inaccessible by normal means.  If you want existing data to be securely erased, you’ll want to use a program like “scrub” (or any of several other similar programs) to overwrite data.

But if you are looking to just reformat the file system, you will still need to run “mkfs.lustre —reformat” on all the targets.  By running “tunefs.lustre —writeconf” on a target, you are basically requesting that the MGS forgot about its current config info for that target and regenerate the config info.  If you do not run “mkfs.lustre —reformat”, then the MGS will regenerate the config info based on the current file system info (and you are more or less back where you started).  That procedure is sometimes used when you want to keep your existing file system, but maybe there is some kind of bad data or corruption in the config logs on the MGS (so you use the writeconf process to blow away the bad config logs and regenerate them).

--
Rick Mohr
Senior HPC System Administrator
National Institute for Computational Sciences
http://www.nics.tennessee.edu

> On Apr 4, 2019, at 5:31 AM, Jae-Hyuck Kwak <jhkwak at kisti.re.kr> wrote:
> 
> 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
> 
> 
> 
> 
> _______________________________________________
> lustre-discuss mailing list
> lustre-discuss at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org




More information about the lustre-discuss mailing list