Howto samsung ssd: Difference between revisions
Mandulete1 (talk | contribs) |
|||
(20 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= speed test = | = speed test = | ||
identify drive letter: | identify drive letter: | ||
fdisk -l|grep Samsung -B 1 | sudo fdisk -l|grep Samsung -B 1 | ||
test hard drive speeds: | test hard drive speeds: | ||
hdparm -Tt /dev/nvme1n1 | sudo hdparm -Tt /dev/nvme1n1 | ||
install fio disk benchmark tool: | |||
sudo pacman -S fio | |||
perform disk read benchmark with fio: | |||
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread | |||
perform disk write benchmark with fio: | |||
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite | |||
or perform both read and write disk benchmark with fio: | |||
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 | |||
install graphical tool kdiskmark with flatpak: | |||
flatpak install flathub io.github.jonmagon.kdiskmark | |||
install iotop to verify io usage: | |||
sudo pacman -Sy iotop --noconfirm | |||
execute iotop as root: | |||
sudo iotop -o | |||
= temperature = | |||
install nvme-cli tool using pacman: | |||
sudo pacman -Sy nvme-cli | |||
display nmve drive health and temperatures: | |||
sudo nvme smart-log /dev/nvme0 | |||
or install smartmontools: | |||
sudo pacman -S smartmontools --noconfirm | |||
use smartmontools to show nvme health and temperatures: | |||
sudo smartctl -a /dev/nvme0 | |||
another tool to watch nvme temperatues is lm_sensors: | |||
sudo pacman -S lm_sensors --noconfirm | |||
watch temperatures with lm_sensors: | |||
sudo sensors | |||
= stress test = | |||
install stress to perform stress test to disk: | |||
sudo pacman -S stress --noconfirm | |||
perform disk io stress test: | |||
stress --io 4 | |||
watch disk temperatures with smartctl: | |||
smartctl -a /dev/nvme0 | |||
= update firmware = | = update firmware = | ||
first, unmount any filesystem mounted on the drive or if it’s your boot drive, you would need to boot using a livecd. | first, unmount any filesystem mounted on the drive or if it’s your boot drive, you would need to boot using a livecd. | ||
Line 37: | Line 74: | ||
now create temporary directory to mount this partitions: | now create temporary directory to mount this partitions: | ||
mkdir /mnt/archlinux | mkdir /mnt/archlinux | ||
mount /dev/nmve0n1p2 | mount /dev/nmve0n1p2 /mnt/archlinux | ||
mkdir /mnt/archlinux/boot | mkdir /mnt/archlinux/boot | ||
mount /dev/nvme0n1p1 /mnt/archlinux/boot | mount /dev/nvme0n1p1 /mnt/archlinux/boot | ||
now we copy all content from old disk to the new one mount at /mnt/archlinux using rsync: | now we copy all content from old disk to the new one mount at /mnt/archlinux using rsync: | ||
rsync /* /mnt/archlinux --exclude /sys --exclude /proc --exclude /media --exclude /mnt/archlinux | rsync -av /* /mnt/archlinux --exclude /sys --exclude /proc --exclude /media --exclude /mnt/archlinux | ||
when rsync finish, use arch-chroot to enter the new drive environment: | when rsync finish, use arch-chroot to enter the new drive environment: | ||
arch-chroot /mnt/archlinux | arch-chroot /mnt/archlinux | ||
Line 47: | Line 84: | ||
blkid|grep -e /dev/nvme0n1p1 -e /dev/nvme0n1p2 | blkid|grep -e /dev/nvme0n1p1 -e /dev/nvme0n1p2 | ||
update /etc/fstab and change the UUID for your boot and root partitions: | update /etc/fstab and change the UUID for your boot and root partitions: | ||
UUID=F9D0-C830 | UUID=F9D0-C830 /boot vfat defaults 1 2 | ||
UUID=80cc0cfd-a13f-47a2-9150-90cf8773662c / | UUID=80cc0cfd-a13f-47a2-9150-90cf8773662c / ext4 defaults 0 2 | ||
create the following directories: | |||
mkdir /sys /proc /media | |||
we need to install grub on new drive: | |||
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH_DESKTOP /dev/nvme0n1 | |||
now create grub configuration: | |||
grub-mkconfig -o /boot/grub/grub.cfg | |||
exit chroot: | |||
exit | |||
umount partition mounted on /mnt/archlinux: | |||
umount /mnt/archlinux/boot | |||
umount /mnt/archlinux | |||
reboot the system: | |||
reboot |
Latest revision as of 17:43, 27 October 2023
speed test
identify drive letter:
sudo fdisk -l|grep Samsung -B 1
test hard drive speeds:
sudo hdparm -Tt /dev/nvme1n1
install fio disk benchmark tool:
sudo pacman -S fio
perform disk read benchmark with fio:
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread
perform disk write benchmark with fio:
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite
or perform both read and write disk benchmark with fio:
fio --randrepeat=1 --ioengine=io_uring --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
install graphical tool kdiskmark with flatpak:
flatpak install flathub io.github.jonmagon.kdiskmark
install iotop to verify io usage:
sudo pacman -Sy iotop --noconfirm
execute iotop as root:
sudo iotop -o
temperature
install nvme-cli tool using pacman:
sudo pacman -Sy nvme-cli
display nmve drive health and temperatures:
sudo nvme smart-log /dev/nvme0
or install smartmontools:
sudo pacman -S smartmontools --noconfirm
use smartmontools to show nvme health and temperatures:
sudo smartctl -a /dev/nvme0
another tool to watch nvme temperatues is lm_sensors:
sudo pacman -S lm_sensors --noconfirm
watch temperatures with lm_sensors:
sudo sensors
stress test
install stress to perform stress test to disk:
sudo pacman -S stress --noconfirm
perform disk io stress test:
stress --io 4
watch disk temperatures with smartctl:
smartctl -a /dev/nvme0
update firmware
first, unmount any filesystem mounted on the drive or if it’s your boot drive, you would need to boot using a livecd.
navigate to https://bit.ly/3nB8vXb in firmware find your drive model and download the iso:
wget https://download.semiconductor.samsung.com/resources/software-resources/Samsung_SSD_990_PRO_1B2QJXD7.iso
mount the iso:
mkdir /mnt/iso mount -o loop Samsung_SSD_990_PRO_1B2QJXD7.iso /mnt/iso
decompress initrd on temp directory:
mkdir /tmp/samsung cd /tmp/samsung gzip -dc /mnt/iso/initrd | cpio -idv --no-absolute-filenames
enter the following directory and execute fumagician:
cd /tmp/samsung/root/fumagician ./fumagician
from old drive to new one
first identify the drive letter:
fdisk -l|grep Samsung -B 1
next create the new partitions on drive using parted:
parted /dev/nvme0n1
inside parted create the partition table as gpt then boot and root partitions:
mklabel gpt mkpart primary 1 1G mkpart primary 1G 100%
inside parted set partition 1 as bootable:
set 1 boot on set 1 bios_grub on quit
format partitions with filesystems:
mkfs.fat -F32 /dev/nvme0n1p1 mkfs.ext4 /dev/nmve0n1p2
now create temporary directory to mount this partitions:
mkdir /mnt/archlinux mount /dev/nmve0n1p2 /mnt/archlinux mkdir /mnt/archlinux/boot mount /dev/nvme0n1p1 /mnt/archlinux/boot
now we copy all content from old disk to the new one mount at /mnt/archlinux using rsync:
rsync -av /* /mnt/archlinux --exclude /sys --exclude /proc --exclude /media --exclude /mnt/archlinux
when rsync finish, use arch-chroot to enter the new drive environment:
arch-chroot /mnt/archlinux
identify new boot and root partitions UUID:
blkid|grep -e /dev/nvme0n1p1 -e /dev/nvme0n1p2
update /etc/fstab and change the UUID for your boot and root partitions:
UUID=F9D0-C830 /boot vfat defaults 1 2 UUID=80cc0cfd-a13f-47a2-9150-90cf8773662c / ext4 defaults 0 2
create the following directories:
mkdir /sys /proc /media
we need to install grub on new drive:
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH_DESKTOP /dev/nvme0n1
now create grub configuration:
grub-mkconfig -o /boot/grub/grub.cfg
exit chroot:
exit
umount partition mounted on /mnt/archlinux:
umount /mnt/archlinux/boot umount /mnt/archlinux
reboot the system:
reboot