I accidentally deleted the lost + found folder from my nvme thinking I could delete corrupted data, about 5% of my SSD is corrupted luckily it is not my primary. I forgot which command I used that deleted the folder. I know that after I deleted lost + found I used badblocks command to see if that would help my problem after scanning for bad blocks for about 4 hours I shut off my PC and the next time I turned on my computer my nvme has been unmounted. Does anyone know how I can mount my SSD and if I can remove the corruption from my nvme?
sverinn 2
By design, modern NVMe drives should manage bad blocks internally via wear‑leveling and spare areas. badblocks is designed for HDDs.
If you have any important data on that SSD, first of all, create a block-level copy of it with clonezilla or similar program.
Then, use nvme from package nvme-cli. You may also try SMART self‑tests (smartctl -t long)
Currently there is nothing on the SSD. I’m not sure the exact commands I can use to mount it. It was last mounted in /dev/nvme1n1
sverinn 4
Identify your drive: lsblk -d -o NAME,MODEL,SERIAL,SIZE
Format it: nvme format /dev/yourdrive1
Run TRIM: fstrim -av /dev/yourdrive1
Verify that bad blocks are fixed: sudo nvme device-self-test /dev/yourdrive1 -n 1 -s 2h
Partition the drive: cfdisk /dev/yourdrive1
Create filesystem: mke2fs -t ext4 /dev/yourdrive1n0p0
Fit the filesystem to volume size: resize2fs /dev/yourdrive1n0p0
Identify partition UUID: blkid
Edit fstab to mount the volume automatically: nano /etc/fstab
Add line: UUID=your-disk-uuid /your/mountpoint ext4 defaults 0 0
Run systemctl daemon-reload && mount -a
See if the drive is mounted and writable
I managed to mount the drive but some of the commands were saying invalid. Thanks for the help, I will keep trying with some of these commands.
You can always use the command history to see just that.























