cancel
Showing results for 
Search instead for 
Did you mean: 
Yeni84
Flight Engineer
Flight Engineer
  • 18.4K Views

How to destroy/remove the file systems after they are created to recreate? (for RHCSA exam practice)

Hello,
I am preparing for the RHCSA exam for December 2020.
I would like to practice for the objectives below, delete the configuration and start over and over again for practice.
*Create and configure file systems:

Create, mount, unmount, and use vfat, ext4, and xfs file systems
Mount and unmount network file systems using NFS
Configure systems to mount file systems at boot by universally unique ID (UUID) or label

Question:
How to destroy/remove the file systems after they are created and set to mount automatically (for the case of partitions, VDO Volume, Logical Volume, Stratis Volume)? I want to do this so I can create them again and again (including partition, volumes) for practice.

For Stratis Volumes I found the procedure in the book I am using as a guide for RHCSA and also on the Access Red Hat documentation (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/...).

Thank you.

Yeni84

Labels (3)
0 Kudos
2 Replies
  • 18.3K Views

Hi,

to destroy a filesystem I used "wipefs -a /dev/xda?"  and "wipefs -a /dev/xda".

This will wipe the filesystem, partition, raid and disk labels from the disk. This means erasing all linux, but also windows and mac Filesystem and includes stuff like zfs,gpt,xfs.

If you have a ssd, you could use blkdiscard, which deletes the whole SSD (like trim, but the whole disk)

fstab entries are something that i delete by hand.

Be carefull there is no undelete.

CU

Jens

 

0 Kudos
marisadean
Mission Specialist
Mission Specialist
  • 18.3K Views

Don't forget to remove from fstab before rebooting if you have deleted the fs or your system may fail to boot.

0 Kudos
Join the discussion
You must log in to join this conversation.