how to remove partitions from m.2 ssd?

Printers, HDDs, USB/eSATA drives, 3rd-party programs
Post Reply
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

how to remove partitions from m.2 ssd?

Post by Moogle Stiltzkin »

for hdd you can remove them and insert into a pc or a hdd dock then use disk management to remove the partitions.

but then what about m.2 ssds? this requires more hassle to remove. also what if you don't have a pc that does m.2 ssds? is there an alternative for removing the partitions on them, to perform a clean reinstall for qts :' ?


seems there are m.2 dockers out there, but i don't have one of those :(
https://shopee.com.my/Blueendless-Type- ... 3189345063
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Ron1963
Been there, done that
Posts: 530
Joined: Wed Apr 28, 2010 9:22 pm

Re: how to remove partitions from m.2 ssd?

Post by Ron1963 »

If you have a SATA docking or SATA to USB cable, buy a ngff ssd adapter.
1x TS251, 1x TS251D, 1x TS253
User avatar
jaysona
Been there, done that
Posts: 854
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: how to remove partitions from m.2 ssd?

Post by jaysona »

fdisk works, just delete the partition, it doesn't get much simpler and more basic than that.

Code: Select all

admin@871p:[~]# fdisk /dev/nvme0n1

The number of cylinders for this disk is set to 121601.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/nvme0n1: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks   Id  System
/dev/nvme0n1p1               1      121602   976762583+  ee  EFI GPT

Command (m for help): 
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: how to remove partitions from m.2 ssd?

Post by Moogle Stiltzkin »

thx both for the suggestions. you are both correct.

https://askubuntu.com/questions/932331/ ... of-dev-sda
The first thing you need to do after installing a new SSD or hard disk is to partition it. A drive needs to have at least one partition before you can format it and store files on it.

In Linux, there are several tools that you can use to create partitions, with fdisk being the most commonly used one.
In this article, we will talk about the fdisk command.

fdisk is a menu-driven command-line utility that allows you to create and manipulate partition tables on a hard disk.

Be aware that fdisk is a dangerous tool and should be used with extreme caution :shock: . Only root or users with sudo privileges can manipulate the partition tables.
Generally, SATA device names follow the pattern /dev/sd[a-z], while NVMe device names have the following pattern /dev/nvme[1-9]n[1-9]
https://linuxize.com/post/fdisk-command-in-linux/


should i bother doing this to double check i am doing for the correct device partitions? :'
By the way, the command lsblk or lsblk -f can help you a lot to get a quick overview of your disk and partitioning structure and to look up the device names.

i'm using m.2 sata ssds on this system, so i guess i should be looking for the 500gb sized /dev/sd[a-z] devices? :'


i think i'll go with the fdisk command (i did google and notice this but wasn't sure, because the nas in discussion was a legacy model, and not too familiar with the command). thats the one i was wondering about, whether it could be done while the m.2 ssd was residing in the nas.

Right now i am in the midst of doing a reinitiatializing of my main nas (ts-877), so i am just checking through all the steps for the process.

One thing i didn't do was remove the m.2 ssd and the hdds. Instead i just left it inside, and just did the reinitialization. Because they said reinit will clear the partitions supposedly.

I definitely do not have malware on my nas, so i did not reckon i needed the extra step for removing partitions off device (e.g. hdd docker), that's why i skipped that part.

I just wanted to check if my backups work, and whether i can fix this odd issue i am having in HBS. If it doesn't fix it, i may try that fdisk method mentioned to see if that does the trick (as well as removing the hdds to remove partitions, although not sure what this accomplishes, because my qts system is installed on the 2 x m.2 ssd raid1 to begin with.

viewtopic.php?f=45&t=155142&start=30#p788346

Ron1963 wrote: Thu Apr 29, 2021 7:10 pm If you have a SATA docking or SATA to USB cable, buy a ngff ssd adapter.
will consider this in future.

however i just wanted to point out, at the time of m.2 ssd instalation, i had mistakenly put the sticky part of the thermal padding onto the m.2 ssd, which to my current understanding is the wrong thing to do. Should have stuck sticky end onto the metalic heatsink, and just relied on the clips for pressing it against the pads. Doing it this way then makes removal of m.2 ssds much easier in situations where you need to remove it later. lesson learned for next time :(
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
User avatar
jaysona
Been there, done that
Posts: 854
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: how to remove partitions from m.2 ssd?

Post by jaysona »

Fdisk is only dangerous in the hands of those that have no clue what they are doing. Fdisk is not more dangerous than the "format" command is on Windows.

Code: Select all

fdisk -l 
will list all the devices installed, you will then need to use fdisk to delete the portions on the disk(s) you want wipe.
however i just wanted to point out, at the time of m.2 ssd instalation, i had mistakenly put the sticky part of the thermal padding onto the m.2 ssd, which to my current understanding is the wrong thing to do. Should have stuck sticky end onto the metalic heatsink, and just relied on the clips for pressing it against the pads. Doing it this way then makes removal of m.2 ssds much easier in situations where you need to remove it later. lesson learned for next time
This has been explained already. ;)
viewtopic.php?t=157625&p=768991#p768913
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
Post Reply

Return to “Hardware & Software Compatibility”