Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
2619
views
"structure needs cleaning", hardware failure?
The drive that my `/home` folder lives on is showing signs of failing, and I'm trying to migrate to a new drive.  I purchased a 4TB SSD, formatted it with `ext4`, mounted it as an external drive with a USB/SATA connector, and `rsync`’ed my `/home` folder over. So far, so good. Bu...
The drive that my
/home
folder lives on is showing signs of failing,
and I'm trying to migrate to a new drive.
I purchased a 4TB SSD, formatted it with ext4
, mounted it as an external drive with a USB/SATA connector, and rsync
’ed my /home
folder over.
So far, so good. But when I swapped it in place of the failing drive and rebooted, my OS reported:
unable to mount local folders
structure needs cleaning
That sounds like a corrupt file system, but fsck
reported no errors. Maybe the new hardware is faulty, but I ran badblocks
on it, and it also came back with no errors. I formatted it again and tried again, and came up with the same error. Weirdly, if I log in as root
and manually mount the new /home
drive, it mounts okay, and seems to accept read/writes. However, dmesg
did show some errors for /dev/sdb
(that's the /home
drive on this system). I've copied them below, although I'm fluent enough myself to parse them.
Any ideas? For context I'm running Gentoo Linux.
[ 0.914006] sd 6:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 0.914052] sd 6:0:0:0: [sdb] Write Protect is off
[ 0.914074] sd 6:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 0.914117] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.914224] sd 6:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
[ 0.915929] sdb: sdb1
[ 0.916093] sd 6:0:0:0: [sdb] Attached SCSI disk
[ 5.012731] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[ 5.012740] sd 6:0:0:0: [sdb] tag#0 Sense Key : Illegal Request [current]
[ 5.012747] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Unaligned write command
[ 5.012753] sd 6:0:0:0: [sdb] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 08 10 00 00 00 08 00 00
[ 5.012757] I/O error, dev sdb, sector 2064 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[ 5.012786] sd 6:0:0:0: [sdb] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[ 5.012792] sd 6:0:0:0: [sdb] tag#1 Sense Key : Illegal Request [current]
[ 5.012797] sd 6:0:0:0: [sdb] tag#1 Add. Sense: Unaligned write command
[ 5.012802] sd 6:0:0:0: [sdb] tag#1 CDB: Read(16) 88 00 00 00 00 00 00 00 08 18 00 00 00 08 00 00
[ 5.012805] I/O error, dev sdb, sector 2072 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[ 5.012817] sd 6:0:0:0: [sdb] tag#31 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[ 5.012822] sd 6:0:0:0: [sdb] tag#31 Sense Key : Illegal Request [current]
[ 5.012827] sd 6:0:0:0: [sdb] tag#31 Add. Sense: Unaligned write command
[ 5.012832] sd 6:0:0:0: [sdb] tag#31 CDB: Read(16) 88 00 00 00 00 00 00 00 08 08 00 00 00 08 00 00
[ 5.012836] I/O error, dev sdb, sector 2056 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[ 35.852468] sd 6:0:0:0: [sdb] tag#13 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=30s
[ 35.852476] sd 6:0:0:0: [sdb] tag#13 Sense Key : Illegal Request [current]
[ 35.852483] sd 6:0:0:0: [sdb] tag#13 Add. Sense: Unaligned write command
[ 35.852490] sd 6:0:0:0: [sdb] tag#13 CDB: Read(16) 88 00 00 00 00 00 00 00 08 28 00 00 05 40 00 00
[ 35.852494] I/O error, dev sdb, sector 2088 op 0x0:(READ) flags 0x84700 phys_seg 168 prio class 2
[ 35.852574] sd 6:0:0:0: [sdb] tag#14 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=30s
[ 35.852581] sd 6:0:0:0: [sdb] tag#14 Sense Key : Illegal Request [current]
[ 35.852586] sd 6:0:0:0: [sdb] tag#14 Add. Sense: Unaligned write command
[ 35.852591] sd 6:0:0:0: [sdb] tag#14 CDB: Read(16) 88 00 00 00 00 00 00 00 0d 68 00 00 05 40 00 00
[ 35.852595] I/O error, dev sdb, sector 3432 op 0x0:(READ) flags 0x84700 phys_seg 168 prio class 2
[ 35.852672] sd 6:0:0:0: [sdb] tag#15 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=30s
[ 35.852677] sd 6:0:0:0: [sdb] tag#15 Sense Key : Illegal Request [current]
[ 35.852682] sd 6:0:0:0: [sdb] tag#15 Add. Sense: Unaligned write command
[ 35.852687] sd 6:0:0:0: [sdb] tag#15 CDB: Read(16) 88 00 00 00 00 00 00 00 12 a8 00 00 03 f0 00 00
[ 35.852690] I/O error, dev sdb, sector 4776 op 0x0:(READ) flags 0x80700 phys_seg 126 prio class 2
[ 36.858014] EXT4-fs (sdb1): ext4_check_descriptors: Checksum for group 18880 failed (53845!=52774)
[ 36.858017] EXT4-fs (sdb1): group descriptors corrupted!
One further experiment: I tried installing another drive into the bay,
and it also wouldn't auto mount as /home
.
I could not even mount it manually after logging in as root.
As far as I can tell, there's nothing wrong with this third drive,
and I can mount it just fine via a USB/SATA adapter.
Both of the new drives are SSDs,
while the old failing drive that still mounts is a hard disk.
This SATA port is via a SATA/PCIE adapter,
so I suppose the problem could be in the adapter.
In that case, though, it's weird that the old hard drive still works.
jyoung
(131 rep)
Sep 24, 2023, 11:12 PM
• Last activity: Aug 3, 2025, 01:07 AM
1
votes
1
answers
68
views
Nuking SSDs in Linux
I have two SSDs in my system, and when I tried to make one drive linux, it broke windows and is unrecoverable via an installation media. To make it easier (since I have nothing that I need on either), I need to nuke both, including removing the operating system and MBR. Does anyone have any solution...
I have two SSDs in my system, and when I tried to make one drive linux, it broke windows and is unrecoverable via an installation media. To make it easier (since I have nothing that I need on either), I need to nuke both, including removing the operating system and MBR. Does anyone have any solutions for this?
Frost
(11 rep)
Jul 31, 2025, 12:27 AM
• Last activity: Jul 31, 2025, 05:47 AM
3
votes
1
answers
60
views
Smartctl triggers: please convert it to SG_IO
When I do smartctl -i /dev/sda there is no output (except from the smartctl welcome message) and the kernel reports: smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO Searching the internet shows that smartctl should be using the new interface for over a decade, and I might be ru...
When I do
smartctl -i /dev/sda
there is no output (except from the smartctl welcome message) and the kernel reports:
smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Searching the internet shows that smartctl should be using the new interface for over a decade, and I might be running older versions of Linux, but not quite that old! What's going on?
user242579
(161 rep)
Jul 30, 2025, 08:58 AM
1
votes
1
answers
52
views
How can I see how much space was freed by trim on an SSD?
In my current setup, I have three different filesystems on two different SSDs: A FAT partition and a BTRFS partition on one drive, and ext4 on a second drive. When running `fstrim`, [the output is apparently](https://www.reddit.com/r/linuxquestions/comments/vaahg7/comment/ic1es8n/?utm_source=share&u...
In my current setup, I have three different filesystems on two different SSDs: A FAT partition and a BTRFS partition on one drive, and ext4 on a second drive. When running
fstrim
, [the output is apparently](https://www.reddit.com/r/linuxquestions/comments/vaahg7/comment/ic1es8n/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) [not very usable](https://superuser.com/a/1251947/277646) and basically each of those filesystems reports some meaningless value for the amount that got trimmed.
Since truly [free space on an SSD contributes to its performance](https://cdn.mos.cms.futurecdn.net/3XW98AqWgfM956j5FGcodL.png) , at least for QLC NAND modules that use an SLC cache, I wanted to see if I could determine the impact of running fstrim
.
I know that utilities like df
and duf
, as well as lsblk
provide usage information based on the filesystem, but are there any utilities that can show the drive sectors that are in use vs free?
If my understanding of how TRIM on an SSD works is correct, then the filesystem will show reduced space immediately upon deleting a file, but those sectors are still considered in use by the SSD controller. After TRIM, those sectors would be freed. I'm hoping for a way to see the extent of that
Hari
(130 rep)
Jul 27, 2025, 05:24 AM
• Last activity: Jul 29, 2025, 09:28 AM
1
votes
1
answers
2873
views
Why is my external SSD not recognized?
Okay so. I am running Manjaro on my [Lenovo Ideapad 300-15IBR][1] and I bought an external SSD. When I plug it in to the laptop, it works; I can read and write files on it, on USB 3.0 and USB 2.0. Problem is when I try to boot from it. It is not recognized in BIOS nor Boot Menu when I plug it in USB...
Okay so. I am running Manjaro on my Lenovo Ideapad 300-15IBR and I bought an external SSD.
When I plug it in to the laptop, it works; I can read and write files on it, on USB 3.0 and USB 2.0.
Problem is when I try to boot from it. It is not recognized in BIOS nor Boot Menu when I plug it in USB 3.0, but it works in 2.0 BIOS recognize it.
Any idea what could be the problem?
Thank you
**EDIT**
Command:
cat /proc/cpuinfo | sudo grep "model name" && sudo lshw | sudo grep -A5 "Moth" && sudo lshw | sudo grep product | sudo head -n1
Output":
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
model name : Intel(R) Pentium(R) CPU N3710 @ 1.60GHz
description: Motherboard
product: Paris G 5A6
vendor: LENOVO
physical id: 0
version: NO DPK
serial: PF0HH105
product: 80M3 (LENOVO_MT_80M3_BU_idea_FM_Lenovo ideapad 300-15IBR)
SSD is Western Digital's My-Passport of 256GB.
**UPDATE 2**
I made it work. I just used another USB cable for it and it was present in BIOS and Boot Menu. But now I am facing another problem.
I have Parrot OS on this external SSD. It boots up. Presents Parrot's loading screen and then I get 3 messages
[5.797031] scsi 2:0:0:1: Wrong diagnostic page: asked for 1 got 0
[5.797374] scsi 2:0:0:1: Failed to get diagnostic page 0x1
[5.797424] scsi 2:0:0:1: Failed to bind enclosure -19
After this I get only black screen and nothing else.
Mileta Dulovic
(111 rep)
Aug 6, 2019, 07:51 PM
• Last activity: Jul 22, 2025, 08:10 AM
0
votes
2
answers
3316
views
Isolating I/O issue with NVME or hardware?
Hardware: - Samsung 980 PRO M.2 NVMe SSD (MZ-V8P2T0BW) (2TB) - Beelink GTR6, with the SSD in the NVMe slot Since the hardware arrived, I've installed Ubuntu Server on it as well as a bunch of services (mostly in docker, DBs and services like Kafka). After 2-3 days of uptime (record is almost a week,...
Hardware:
- Samsung 980 PRO M.2 NVMe SSD (MZ-V8P2T0BW) (2TB)
- Beelink GTR6, with the SSD in the NVMe slot
Since the hardware arrived, I've installed Ubuntu Server on it as well as a bunch of services (mostly in docker, DBs and services like Kafka).
After 2-3 days of uptime (record is almost a week, but usually it's 2-3 days), I typically start getting buffer i/o errors on the nvme slot (which is also the boot drive):
If I'm quick enough, I can still login via SSH but the system becomes increasingly unstable before commands start failing with an I/O error. When I did manage to login, it did seem to think there's no connected NVME SSDs:
Another instance of the buffer I/O error on the nvme slot:
Because of this and trying to check everything I could find, I ran FSCK on boot to see if there was anything obvious - this is quite common after the hard reset:
# cat /run/initramfs/fsck.log
Log of fsck -C -f -y -V -t ext4 /dev/mapper/ubuntu--vg-ubuntu--lv
Fri Dec 30 17:26:21 2022
fsck from util-linux 2.37.2
[/usr/sbin/fsck.ext4 (1) -- /dev/mapper/ubuntu--vg-ubuntu--lv] fsck.ext4 -f -y -C0 /dev/mapper/ubuntu--vg-ubuntu--lv
e2fsck 1.46.5 (30-Dec-2021)
/dev/mapper/ubuntu--vg-ubuntu--lv: recovering journal
Clearing orphaned inode 524449 (uid=1000, gid=1000, mode=0100664, size=6216)
Pass 1: Checking inodes, blocks, and sizes
Inode 6947190 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947197 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947204 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947212 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947408 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947414 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947829 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947835 extent tree (at level 1) could be shorter. Optimize? yes
Inode 6947841 extent tree (at level 1) could be shorter. Optimize? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (401572584, counted=405399533).
Fix? yes
Free inodes count wrong (121360470, counted=121358242).
Fix? yes
/dev/mapper/ubuntu--vg-ubuntu--lv: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/ubuntu--vg-ubuntu--lv: 538718/121896960 files (0.2% non-contiguous), 82178067/487577600 blocks
fsck exited with status code 1
Fri Dec 30 17:26:25 2022
----------------
Running smart-log doesn't seem to show anything concerning, other than the number of unsafe shutdowns (the number of times this has happened so far)...
# nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning : 0
temperature : 32 C (305 Kelvin)
available_spare : 100%
available_spare_threshold : 10%
percentage_used : 0%
endurance group critical warning summary: 0
data_units_read : 8,544,896
data_units_written : 5,175,904
host_read_commands : 39,050,379
host_write_commands : 191,366,905
controller_busy_time : 1,069
power_cycles : 21
power_on_hours : 142
unsafe_shutdowns : 12
media_errors : 0
num_err_log_entries : 0
Warning Temperature Time : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1 : 32 C (305 Kelvin)
Temperature Sensor 2 : 36 C (309 Kelvin)
Thermal Management T1 Trans Count : 0
Thermal Management T2 Trans Count : 0
Thermal Management T1 Total Time : 0
Thermal Management T2 Total Time : 0
I have reached out to support and their initial suggestion along with a bunch of questions was whether I had tried to reinstall the OS. I've given this a go too, formatting the drive and reinstalling the OS (Ubuntu Server 22 LTS).
After that, the issue hadn't happened for 4 days before it finally showed itself as a kernel panic:
Any ideas what I can do to identify if the problem is with the SSD itself or the hardware that the SSD is slotted into (the GTR6)? I have until the 31st to return the SSD, so would love to pin down the most likely cause of the issue sooner rather than later...
I'm even more concerned after seeing reports that others are having serious health issues with the Samsung 990 Pro:
https://www.reddit.com/r/hardware/comments/10jkwwh/samsung_990_pro_ssd_with_rapid_health_drops/
Edit: although I realised those reported issues are with the 990 pro, not the 980 pro that I have!
Edit2: someone in overclockers was kind enough to suggest hd sentinel, which does show a health metric, which seems ok:
# ./hdsentinel-019c-x64
Hard Disk Sentinel for LINUX console 0.19c.9986 (c) 2021 info@hdsentinel.com
Start with -r [reportfile] to save data to report, -h for help
Examining hard disk configuration ...
HDD Device 0: /dev/nvme0
HDD Model ID : Samsung SSD 980 PRO 2TB
HDD Serial No: S69ENL0T905031A
HDD Revision : 5B2QGXA7
HDD Size : 1907729 MB
Interface : NVMe
Temperature : 41 °C
Highest Temp.: 41 °C
Health : 99 %
Performance : 100 %
Power on time: 21 days, 12 hours
Est. lifetime: more than 1000 days
Total written: 8.30 TB
The status of the solid state disk is PERFECT. Problematic or weak sectors were not found.
The health is determined by SSD specific S.M.A.R.T. attribute(s): Available Spare (Percent), Percentage Used
No actions needed.
Lastly, none of the things I tried such as the smart-log seem to show something like a health metric. How can I check this in ubuntu?
Thanks!




Tiago
(101 rep)
Jan 26, 2023, 10:57 AM
• Last activity: Jul 18, 2025, 09:03 AM
1
votes
1
answers
2434
views
Failing of Samsung SSD (can't access partitions, i/o errors)
My Samsung SSD 860 EVO 250GB failed out of the blue after only 14 months. It was the system drive of a Win10 PC which was only rarely used. I am reasonably certain that it is toast, but because it contains several thousand pictures which I'd really like to keep, I wanted to see if there's anything I...
My Samsung SSD 860 EVO 250GB failed out of the blue after only 14 months. It was the system drive of a Win10 PC which was only rarely used. I am reasonably certain that it is toast, but because it contains several thousand pictures which I'd really like to keep, I wanted to see if there's anything I can still do.
After the PC didn't boot up any more ("No boot media present") I took it out and tried connecting it to my other PC via powered SATA/USB adapters (both an older one and a new one from Inateck with USB 3.0 ). While it does not appear under "My PC", it recognised that there is something and the disk briefly shows up in Device Manager and in Disk Management as an uninitialized disk. But trying to initialize it fails with an IO error and the disk sort of flickers in and out of existence. with the older SATA adapter I tried using different SATA cables but the results were the same. Now I tried it on my xubuntu box. Here is what I have so far and I would like to know if more can be done.
- Testdisk either doesn't list the drive or hangs at "Please Wait...." for a long time
- Gparted hangs
- Gsmartcontrol hangs
Then I tried a few commandline utilities. The disk is `
sdc
`
USER@BOX:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 149,1G 0 disk
└─sda1 8:1 0 149,1G 0 part /
sdb 8:16 0 111,8G 0 disk
└─sdb1 8:17 0 111,8G 0 part
sdc 8:32 0 232,9G 0 disk
USER@BOX:~$ lsscsi
[0:0:0:0] disk ATA SAMSUNG HM160HC 0-10 /dev/sda
[1:0:0:0] disk ATA SAMSUNG HM121HC 0-10 /dev/sdb
[2:0:0:0] disk ASMedia ASM105x 0 /dev/sdc
USER@BOX:~$ sudo smartctl --all /dev/sdc
[sudo] password for USER:
smartctl 6.6 2016-05-31 r4324 [i686-linux-5.4.0-66-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 860 EVO 250GB
Serial Number: S3YJNX0M525844H
LU WWN Device Id: 5 002538 e40fc29fc
Firmware Version: RVT02B6Q
User Capacity: 250.059.350.016 bytes [250 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Mar 8 15:54:52 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
On a later try, smartctl
hung for a long time and finished with Read SMART Data failed: Connection timed out
.
Then I checked `dmesg
which ends on
blk_update_request: I/O error, dev sdc, sector 0`
[ 996.856691] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 996.856704] Buffer I/O error on dev sdc, logical block 0, async page read
[ 1027.282503] sd 2:0:0:0: [sdc] tag#13 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[ 1027.282518] sd 2:0:0:0: [sdc] tag#13 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1027.296850] scsi host2: uas_eh_device_reset_handler start
[ 1027.424850] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1027.582666] scsi host2: uas_eh_device_reset_handler success
[ 1058.000845] scsi host2: uas_eh_device_reset_handler start
[ 1058.007434] sd 2:0:0:0: [sdc] tag#14 uas_zap_pending 0 uas-tag 1 inflight: CMD
[ 1058.007449] sd 2:0:0:0: [sdc] tag#14 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1058.132851] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1058.291082] scsi host2: uas_eh_device_reset_handler success
[ 1088.708928] INFO: task blkid:1363 blocked for more than 724 seconds.
[ 1088.708942] Not tainted 5.4.0-66-generic #74~18.04.2-Ubuntu
[ 1088.708946] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1088.708951] blkid D 0 1363 1361 0x00000000
[ 1088.708959] Call Trace:
[ 1088.708978] __schedule+0x292/0x7d0
[ 1088.708987] schedule+0x2e/0xa0
[ 1088.708994] schedule_preempt_disabled+0xd/0x10
[ 1088.709001] __mutex_lock.isra.9+0x207/0x490
[ 1088.709008] ? _cond_resched+0x17/0x40
[ 1088.709015] __mutex_lock_slowpath+0x12/0x20
[ 1088.709021] mutex_lock+0x2f/0x40
[ 1088.709027] __blkdev_get+0x70/0x4c0
[ 1088.709034] ? I_BDEV+0x10/0x10
[ 1088.709042] ? iget5_locked+0x1c/0x70
[ 1088.709047] blkdev_get+0xc6/0x110
[ 1088.709052] ? bd_acquire+0xa0/0xc0
[ 1088.709056] blkdev_open+0x7d/0x90
[ 1088.709062] do_dentry_open+0x1ca/0x3b0
[ 1088.709067] ? blkdev_get_by_dev+0x40/0x40
[ 1088.709072] vfs_open+0x25/0x30
[ 1088.709078] path_openat+0x29c/0x1290
[ 1088.709088] do_filp_open+0x6a/0xd0
[ 1088.709097] ? __alloc_fd+0x36/0x170
[ 1088.709103] do_sys_open+0x1ad/0x2c0
[ 1088.709109] sys_openat+0x1b/0x20
[ 1088.709115] do_fast_syscall_32+0x7f/0x240
[ 1088.709123] entry_SYSENTER_32+0xac/0xff
[ 1088.709127] EIP: 0xb7f86bb5
[ 1088.709134] Code: 00 3d 39 67 00 00 0f 84 6f 13 00 00 3d 29 67 00 00 0f 85 86 eb ff ff c7 86 dc 00 00 00 15 00 00 00 e9 ff e9 ff ff 8d b4 26 00 00 00 3d 98 68 00 00 0f 84 b4 0b 00 00 0f 86 00 07 00 00 3d 9b
[ 1088.709138] EAX: ffffffda EBX: ffffff9c ECX: 00ceb4d0 EDX: 00088000
[ 1088.709142] ESI: 00000000 EDI: e0462da8 EBP: 00cef5e0 ESP: bf875a90
[ 1088.709146] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000246
[ 1088.724836] scsi host2: uas_eh_device_reset_handler start
[ 1088.731428] sd 2:0:0:0: [sdc] tag#15 uas_zap_pending 0 uas-tag 1 inflight: CMD
[ 1088.731436] sd 2:0:0:0: [sdc] tag#15 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1088.856846] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1089.014814] scsi host2: uas_eh_device_reset_handler success
[ 1119.440840] scsi host2: uas_eh_device_reset_handler start
[ 1119.449026] sd 2:0:0:0: [sdc] tag#12 uas_zap_pending 0 uas-tag 1 inflight: CMD
[ 1119.449040] sd 2:0:0:0: [sdc] tag#12 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1119.576842] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1119.734805] scsi host2: uas_eh_device_reset_handler success
[ 1150.160844] scsi host2: uas_eh_device_reset_handler start
[ 1150.167386] sd 2:0:0:0: [sdc] tag#13 uas_zap_pending 0 uas-tag 1 inflight: CMD
[ 1150.167399] sd 2:0:0:0: [sdc] tag#13 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1150.292831] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1150.451026] scsi host2: uas_eh_device_reset_handler success
[ 1180.872921] scsi host2: uas_eh_device_reset_handler start
[ 1180.880479] sd 2:0:0:0: [sdc] tag#14 uas_zap_pending 0 uas-tag 1 inflight: CMD
[ 1180.880507] sd 2:0:0:0: [sdc] tag#14 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1181.004890] usb 1-6: reset high-speed USB device number 4 using ehci-pci
[ 1181.162973] scsi host2: uas_eh_device_reset_handler success
[ 1181.163214] sd 2:0:0:0: [sdc] tag#14 FAILED Result: hostbyte=DID_RESET driverbyte=DRIVER_OK
[ 1181.163224] sd 2:0:0:0: [sdc] tag#14 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 1181.163233] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 1181.163245] Buffer I/O error on dev sdc, logical block 0, async page read
So in summary, the disk itself is being recognised in a way for example in the BIOS and occasionally by smartctl, but attempts to access it or to even see the partitions on it time out or fail. (There should be the three partitions of a regular Win10 setup.)
Can you help me?
cupholder
(11 rep)
Mar 8, 2021, 04:12 PM
• Last activity: Jul 16, 2025, 09:07 PM
1
votes
2
answers
3000
views
New SSD USB drive: fdisk doesn't change partitions and mkfs doesn't change format
I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2 In the past I have used this exact product, but the 128GB version, formatted as FAT32 on my OSX machine, and the drive worked with no issues on the Pi. I'm using it...
I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2
In the past I have used this exact product, but the 128GB version, formatted as FAT32 on my OSX machine, and the drive worked with no issues on the Pi. I'm using it store the Bitcoin blockchain. Now that the blockchain is too big I'm trying to replace the drive with a 512GB drive, and I am having no luck getting this thing to work!
I first tried the OSX FAT32 format, but that didn't work. So I'm trying to format it with the Pi itself.
Starting off with
fdisk /dev/sda
as sudo su
with USB drive unmounted:
/dev/sda1 2 1000215215 1000215214 477G b W95 FAT32
Then I go through the process of [d]elete, [n]ew, [w]rite:
/dev/sda1 2048 1000215215 1000213168 477G 83 Linux
but even after a partprobe
AND a reboot, fdisk -l
still reports no change:
/dev/sda1 2 1000215215 1000215214 477G b W95 FAT32
... am I doing anything wrong up to this point? I also went forward with mfks.ext4 /dev/sda1
and still don't see anything changing (I can post those logs too...) And when I run fsck
it is a TOTAL BLOODBATH -- which is even more confusing! How can a freshly formatted, brand new file-system have so many errors? Stuff like this (selected examples out of hundreds):
Inode 138789 has a extra size (30700) which is invalid
Inode 138825 has a bad extended attribute block 17929510.
Inode 138877 has compression flag set on filesystem without compression support.
Inode 139153 has a extra size (6956) which is invalid
Finally, when I attach the drive my OSX machine I can format it and use it and it works FINE. So I think the drive is not defective.
pinhead
(73 rep)
Jan 17, 2017, 06:59 PM
• Last activity: Jul 10, 2025, 12:05 AM
0
votes
0
answers
36
views
Filesystem becomes read-only at random
Debian crashed on Laptop (Acer Aspire 3, about 4 years old, HDD replaced with ADATA SU650 240GB SSD) and started throwing console errors reading "failed to rotate /var/log/journal: read-only filesystem". It rebooted fine, but a while later refused to load websites and eventually crashed again. Right...
Debian crashed on Laptop (Acer Aspire 3, about 4 years old, HDD replaced with ADATA SU650 240GB SSD) and started throwing console errors reading "failed to rotate /var/log/journal: read-only filesystem".
It rebooted fine, but a while later refused to load websites and eventually crashed again. Right now, it's working fine.
After a quick Google search I installed smartctl to figure out the problem, and though it prints an overall "PASSED", it does have some attributes output "Pre-failed" and I'm not exactly sure how to interpret the rest of the values.
Here's the output:
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-37-amd64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Silicon Motion based SSDs
Device Model: ADATA SU650
Serial Number: 2N20292G46UJ
LU WWN Device Id: 0 000000 000000000
Firmware Version: XD0R6305
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
TRIM Command: Available, deterministic
Device is: In smartctl database 7.3/5319
ATA Version is: ACS-3, ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Jun 29 21:36:52 2025 -03
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 1) seconds.
Offline data collection
capabilities: (0x59) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0002) Does not save SMART data before
entering power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 2) minutes.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 929
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1439
160 Uncorrectable_Error_Cnt 0x0032 100 100 050 Old_age Always - 0
161 Valid_Spare_Block_Cnt 0x0032 100 100 050 Old_age Always - 100
163 Initial_Bad_Block_Count 0x0032 100 100 000 Old_age Always - 48
164 Total_Erase_Count 0x0032 100 100 000 Old_age Always - 87382
165 Max_Erase_Count 0x0032 100 100 000 Old_age Always - 156
166 Min_Erase_Count 0x0032 100 100 000 Old_age Always - 44
167 Average_Erase_Count 0x0032 100 100 000 Old_age Always - 109
148 Total_SLC_Erase_Ct 0x0032 100 100 000 Old_age Always - 262148
149 Max_SLC_Erase_Ct 0x0032 100 100 000 Old_age Always - 468
150 Min_SLC_Erase_Ct 0x0032 100 100 000 Old_age Always - 132
151 Average_SLC_Erase_Ct 0x0032 100 100 000 Old_age Always - 329
159 DRAM_1_Bit_Error_Count 0x0032 100 100 000 Old_age Always - 0
168 Max_Erase_Count_of_Spec 0x0032 100 100 000 Old_age Always - 468
169 Remaining_Lifetime_Perc 0x0032 100 100 000 Old_age Always - 98
177 Wear_Leveling_Count 0x0032 100 100 000 Old_age Always - 1823
181 Program_Fail_Cnt_Total 0x0032 100 100 000 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 77
194 Temperature_Celsius 0x0032 100 100 000 Old_age Always - 26
195 Hardware_ECC_Recovered 0x0032 100 100 000 Old_age Always - 403177
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
232 Available_Reservd_Space 0x0032 100 100 000 Old_age Always - 100
241 Host_Writes_32MiB 0x0032 100 100 000 Old_age Always - 139845
242 Host_Reads_32MiB 0x0032 100 100 000 Old_age Always - 143114
245 TLC_Writes_32MiB 0x0032 100 100 000 Old_age Always - 296002
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
I'd greatly appreciate some advice on what these values mean and what can be done about them. I know that "Old_age" means the device is worn and "Pre-fail" means it's about to give, but I don't really know if this reflects normal wear, lack of maintenance, or is recoverable from.
Thanks in advance!
geistofsttraft
(1 rep)
Jun 30, 2025, 12:45 AM
• Last activity: Jun 30, 2025, 12:46 AM
0
votes
1
answers
2234
views
Kali Linux on portable SSD with data persistence
I need to setup a portable kali-linux environment that I can boot on any available computer. I don't want to use a virtual environment because I would need to download VMware on the host computer, plus it's not practical since I will need to boot my OS on friends/customers computers. I just want to...
I need to setup a portable kali-linux environment that I can boot on any available computer. I don't want to use a virtual environment because I would need to download VMware on the host computer, plus it's not practical since I will need to boot my OS on friends/customers computers. I just want to boot it from the BIOS, do what I have to do and leave without changing or downloading any files/software on machines that aren't mine. I want to leave the hosts like I was never there after I'm done.
Of course, I need data persistence so that I can access, change and keep my datas across reboots on different machines.
So, if I'm not wrong, what I need is:
Adding Persistence to a Kali Linux Live USB Drive
Making a Kali Bootable USB Drive (Windows)
I have two questions:
- Wouldn't something like that run too slow on a classic USB flash drive ?
- I kind of want to use a portable SSD for this. I found one that I like and I'd like your opinions on it and if what I want to do with it is possible. Since this SSD has built-in features and software, is it going to be a problem to make it a kali-linux portable environment? For example, what if I need to format the disk to a specific file system type?
mossonzdod
(17 rep)
Jul 27, 2021, 01:52 AM
• Last activity: Jun 24, 2025, 06:02 AM
1
votes
1
answers
51
views
U.2 SSD drive not detected. Drive's or adapter's fault?
I'm connecting a U.2 SSD drive to my computer with a U.2 USB enclosure. The drive was never tested by me, and it's a classic ex-enterprise drive, the ones removed from a server and sold second-hand, susceptible to being getting rid of because faulty. However, I'm not an expert of the interface and I...
I'm connecting a U.2 SSD drive to my computer with a U.2 USB enclosure. The drive was never tested by me, and it's a classic ex-enterprise drive, the ones removed from a server and sold second-hand, susceptible to being getting rid of because faulty. However, I'm not an expert of the interface and I've bought an adapter specifically to be able to connect this drive.
Obviously, something is not working, but I can't tell if the drive is corrupted or if the adapter is not working properly. Here is the output of
[ 97.657513] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd
[ 97.669267] usb 2-1: New USB device found, idVendor=152d, idProduct=0583, bcdDevice= 2.12
[ 97.669274] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 97.669276] usb 2-1: Product: NVME USB3.2
[ 97.669279] usb 2-1: Manufacturer: JMicron
[ 97.669281] usb 2-1: SerialNumber: 0123456789ABC
[ 97.673653] scsi host1: uas
[ 97.674217] scsi 1:0:0:0: Direct-Access NVME USB 3.2 0212 PQ: 0 ANSI: 6
[ 97.676078] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 105.835638] sd 1:0:0:0: [sdb] Unit Not Ready
[ 105.835647] sd 1:0:0:0: [sdb] Sense Key : Hardware Error [current]
[ 105.835654] sd 1:0:0:0: [sdb] ASC=0x44 >ASCQ=0x81
[ 105.960737] sd 1:0:0:0: [sdb] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 105.960749] sd 1:0:0:0: [sdb] Sense Key : Hardware Error [current]
[ 105.960757] sd 1:0:0:0: [sdb] ASC=0x44 >ASCQ=0x81
[ 106.126503] sd 1:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 106.126513] sd 1:0:0:0: [sdb] Sense Key : Hardware Error [current]
[ 106.126520] sd 1:0:0:0: [sdb] ASC=0x44 >ASCQ=0x81
[ 106.166475] sd 1:0:0:0: [sdb] 0 512-byte logical blocks: (0 B/0 B)
[ 106.166484] sd 1:0:0:0: [sdb] 0-byte physical blocks
[ 106.287357] sd 1:0:0:0: [sdb] Test WP failed, assume Write Enabled
[ 106.327325] sd 1:0:0:0: [sdb] Asking for cache data failed
[ 106.327333] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 106.327337] sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes not a multiple of physical block size (0 bytes)
[ 106.327341] sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (0 bytes)
[ 106.327760] sd 1:0:0:0: [sdb] Attached SCSI disk
Can anybody clarify this for me?
Jeffrey Lebowski
(427 rep)
Jun 11, 2025, 03:15 PM
• Last activity: Jun 12, 2025, 04:22 AM
-1
votes
1
answers
61
views
Does periodic trim work on SSD connected via USB 2.0?
It looks like my OS is set to periodically trim portable SSD drives, and TRIM is supported by my portable SSD. I connect this SSD via its usbc cable, attached to the usbc to usb3 adapter that came in the box with it, then connected to the usb2 port on my laptop. Is trim actually executed? I read tha...
It looks like my OS is set to periodically trim portable SSD drives, and TRIM is supported by my portable SSD. I connect this SSD via its usbc cable, attached to the usbc to usb3 adapter that came in the box with it, then connected to the usb2 port on my laptop. Is trim actually executed? I read that trim commands are not supported through usb 2.0... for example here is written that usb2 does not support trim: https://wiki.gentoo.org/wiki/Discard_over_USB (section prerequisites). Also https://en.m.wikipedia.org/wiki/USB_Attached_SCSI says that it depends on the hardware and sometimes usb hub... Does it mean that I have to investigate specifically my motherboard?
user324831
(113 rep)
Jun 2, 2025, 12:17 PM
• Last activity: Jun 2, 2025, 06:36 PM
0
votes
0
answers
69
views
Weird failure and "Smartctl open device: /dev/nvme0 failed: Resource temporarily unavailable"
in WIN11 I have the issue that my screen is frozen but mouse can move. Used my Debian boot stick to check if it is hardware that is failing. Memory seems to be OK but the SSD is giving me some headaches. *smartctl -a /dev/nvme0* returns: === START OF INFORMATION SECTION === Model Number: KINGSTON SN...
in WIN11 I have the issue that my screen is frozen but mouse can move.
Used my Debian boot stick to check if it is hardware that is failing. Memory seems to be OK but the SSD is giving me some headaches.
*smartctl -a /dev/nvme0*
returns:
=== START OF INFORMATION SECTION ===
Model Number: KINGSTON SNV2S2000G
Serial Number: 50026B7381B094D5
Firmware Version: SBK00104
PCI Vendor/Subsystem ID: 0x2646
IEEE OUI Identifier: 0x0026b7
Controller ID: 1
NVMe Version: 1.4
Number of Namespaces: 1
Namespace 1 Size/Capacity: 2,000,398,934,016 [2.00 TB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 0026b7 381b094d55
Local Time is: Sun Jun 1 14:22:24 2025 UTC
Firmware Updates (0x12): 1 Slot, no Reset required
Optional Admin Commands (0x0016): Format Frmw_DL Self_Test
Optional NVM Commands (0x009f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Verify
Log Page Attributes (0x12): Cmd_Eff_Lg Pers_Ev_Lg
Maximum Data Transfer Size: 64 Pages
Warning Comp. Temp. Threshold: 83 Celsius
Critical Comp. Temp. Threshold: 90 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 5.00W - - 0 0 0 0 0 0
1 + 3.50W - - 1 1 1 1 0 200
2 + 2.50W - - 2 2 2 2 0 1000
3 - 1.50W - - 3 3 3 3 5000 5000
4 - 1.50W - - 4 4 4 4 20000 70000
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 40 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 7,508,693 [3.84 TB]
Data Units Written: 6,431,227 [3.29 TB]
Host Read Commands: 76,389,168
Host Write Commands: 100,940,793
Controller Busy Time: 5,706
Power Cycles: 196
Power On Hours: 292
Unsafe Shutdowns: 97
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged
Self-test Log (NVMe Log 0x06)
Self-test status: Extended self-test in progress (26% completed)
Num Test_Description Status Power_on_Hours Failing_LBA NSID Seg SCT Code
0 Short Completed without error 292 - - - - -
1 Extended Completed without error 292 - - - - -
2 Short Completed without error 292 - - - - -
which looks OK. However after
*sudo smartctl -t long /dev/nvme0*
I receive:
Smartctl open device: /dev/nvme0 failed: Resource temporarily unavailable
after a while ,...
Do you think the SSD is failing or the controller on the board- or nay other idea??
Unfortunately I do not have a spare SSD here to test.
Any hints?
Thanky for helping me!
Timo Bularczyk
(1 rep)
Jun 1, 2025, 04:18 PM
0
votes
1
answers
73
views
Are portable USB-connected SSD automatically trimmed by Fedora?
After reading online I was under the impression that TRIM is not *automatically* (periodically) sent over to my USBconnected SSD by Fedora; but some discussions on this forum make me doubt this. Anyone has clarifications? Thank you so much.
After reading online I was under the impression that TRIM is not *automatically* (periodically) sent over to my USBconnected SSD by Fedora; but some discussions on this forum make me doubt this. Anyone has clarifications? Thank you so much.
user324831
(113 rep)
Jun 1, 2025, 09:18 AM
• Last activity: Jun 1, 2025, 10:16 AM
5
votes
2
answers
8330
views
/tmp mounting options as tmpfs: Compatibility & Security
Having a SSD - it is recommended to mount `/tmp` as `tmpfs`. Examples: - https://askubuntu.com/questions/550589/best-way-to-mount-tmp-in-fstab - https://yktoo.com/en/blog/post/233 - https://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount...
Having a SSD - it is recommended to mount
/tmp
as tmpfs
.
Examples:
- https://askubuntu.com/questions/550589/best-way-to-mount-tmp-in-fstab
- https://yktoo.com/en/blog/post/233
- https://askubuntu.com/questions/173094/how-can-i-use-ram-storage-for-the-tmp-directory-and-how-to-set-a-maximum-amount
The mounting options are different in each example - why???
The default Ubuntu 16 installation sets the mounting options for root (/
) as (from /etc/mtab
):
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
Ergo all other options - as suggested in the examples/links - shouldn't be applied.
Some of the mounting options in the various examples on the web are:
defaults,noatime,mode=1777
or:
defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M
But:
- Having noatime
feels useless because that the data is stored in RAM which is fast anyway.
- Why nosuid,nodev,noexec
?
How do they know whether softwares are dependent on certain options or not?
---
I think it is best to stick with the default permissions that the installation applied, meaning:
rw,relatime,mode=1777,uid=0,gid=0
In order to ensure proper operation of various softwares:
- The permissions are 1777 because that the default permissions for /tmp
are also drwxrwxrwt
(see stat -c "%a %n" /tmp
).
- The uid
and gid
are root
because that /tmp
has the same.
Is there something which I'm missing here?
Dor
(2635 rep)
Mar 18, 2017, 01:45 PM
• Last activity: May 29, 2025, 05:01 AM
1
votes
1
answers
130
views
Wear level and total bytes written in SATA SSD
On a Samsung SATA SSD, i.e. non NVMe disk, the following are the SmartCtl values that are obtained by running the command `sudo smartctl -a /dev/sda`, SMART Attributes Data Structure revision number: 1 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE...
On a Samsung SATA SSD, i.e. non NVMe disk, the following are the SmartCtl values that are obtained by running the command
sudo smartctl -a /dev/sda
,
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 18
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 10452411061
On the same disk when the command sudo skdump /dev/sda
is run the following is the output.
Overall Status: GOOD
ID# Name Value Worst Thres Pretty Raw Type Updates Good Good/Past
5 reallocated-sector-count 100 100 10 0 sectors 0x000000000000 prefail online yes yes
177 wear-leveling-count 99 99 0 18 0x120000000000 prefail online n/a n/a
241 total-lbas-written 99 99 0 350725.752 TB 0x3d9b036f0200 old-age online n/a n/a
For this I had the following queries
1) skdump
command is returning a value of 350725.752 TB written, i.e. total-lbas-written
. Is this correct?
2) Based on the answer provided in another post the output of smartctl
for total-lbas-written
is 10452411061, which equates to 4.86 TB written (i.e. 10452411061/2/1024/1024/1024). This differs significantly from the value reported by the skdump
command. Is this value accurate?
The Sector size is 512 bytes.
3) After looking at various posts in SuperUser and StackExchange, for samsung ssd drives the value of Wear_Leveling_Count
determines how much wear leveling has occurred on the SSD. But it is not clear what figure should be considered? The figure of the column **RAW_VALUE** or **VALUE** column. And does having RAW_VALUE of 18 implies that only 18% of the SSD life is left?
KDM
(116 rep)
May 27, 2025, 08:12 AM
• Last activity: May 27, 2025, 10:17 AM
3
votes
1
answers
4480
views
How to set a dual-boot installation with two hard drives (SSD and HDD)
I'm about to format my PC with Windows 10 and I would like to install a system with Windows 10 and Ubuntu dual-boot. I have already done that in other occasions, but this time is different. I don't know how to set my Linux partitions correctly so what I usually do is using the automatic tool in the...
I'm about to format my PC with Windows 10 and I would like to install a system with Windows 10 and Ubuntu dual-boot. I have already done that in other occasions, but this time is different.
I don't know how to set my Linux partitions correctly so what I usually do is using the automatic tool in the Ubuntu installation process. It has worked for me over the past years whenever I tried to install Linux.
This time, my PC has a SSD (120 GB) and a HDD (1 TB), currently with Windows 10. I use the former to boot the system and store the most frequently used software, and the latter to store music, photos, videos, games, etc.
My intention is to **install both OS** so that they **both boot from the SSD** and have a minimum storage in it, while using the **HDD for storage in both OS**.
I will be using Ubuntu for programming, so I might not need as much space in the HDD. However, I will be using Windows for PC gaming, so I'll need more space there.
I don't mind deleting all my current data, since it's already backed up online. I would even prefer to delete all, since I want to clean my current Windows installation.
adferte
(31 rep)
Jun 3, 2017, 10:16 AM
• Last activity: May 26, 2025, 10:11 AM
0
votes
1
answers
36
views
dd cannot write to an ext4 HDD using oflag=direct
I attempted to write a file to an ext4 voulume on an external USB hard disk drive: $ dd if=/dev/zero of=file bs=1M count=10 iflag=fullblock oflag=direct dd: failed to open 'file': Invalid argument Then I tried it without `oflag=direct` and it worked. Then I tried to write a file using the original c...
I attempted to write a file to an ext4 voulume on an external USB hard disk drive:
$ dd if=/dev/zero of=file bs=1M count=10 iflag=fullblock oflag=direct
dd: failed to open 'file': Invalid argument
Then I tried it without
oflag=direct
and it worked.
Then I tried to write a file using the original command to an ext4 volume on an internal solid state drive and it worked.
Why couldn't dd
write to the HDD?
EmmaV
(4359 rep)
May 25, 2025, 08:08 AM
• Last activity: May 25, 2025, 09:47 AM
3
votes
1
answers
2818
views
File system goes read-only on NVMe SSD seemingly at random
I am currently running a somewhat fresh Kubuntu 22.04 install on a relatively new M.2 NVMe drive. However, I have a problem where my computer drive (I think) turns read only, causing the system to sort of crash. When I first installed the system, this would happen very frequently until I applied the...
I am currently running a somewhat fresh Kubuntu 22.04 install on a relatively new M.2 NVMe drive.
However, I have a problem where my computer drive (I think) turns read only, causing the system to sort of crash. When I first installed the system, this would happen very frequently until I applied the
=off
fix to the /etc/default/grub file:
="quiet splash pcie_aspm=off"
. This made it happen less frequently.
This issue happens on all the previous systems I've tried to install on this drive, with most of the same symptoms, i.e. some icons disappearing, apps breaking, chromium tabs displaying "aw snap," and in particular, libreoffice gives a "filesystem read only" error when trying to save. One thing different from similar errors though, is that when I reboot the computer manually (holding power button) it goes back to normal for a while, while some seem to have problems booting afterwards. Then it happens again some time later. I can provide more details if needed, e.g. hardware, syslog entries, etc.
Does anyone have a permanent solution to this?
Not a computer whiz, but I do know some.
Lirik
(31 rep)
Nov 22, 2022, 03:13 AM
• Last activity: May 19, 2025, 10:09 AM
1
votes
1
answers
2431
views
Understanding iostat block measurements
I am trying to understand how data is written to the disk. I'm writing data with `dd` using various block sizes, but it looks like the disk is always getting hit with the same size blocks, according to iostat. For example this command should write 128K blocks. dd if=/dev/zero of=/dev/sdb bs=128K cou...
I am trying to understand how data is written to the disk. I'm writing data with
dd
using various block sizes, but it looks like the disk is always getting hit with the same size blocks, according to iostat. For example this command should write 128K blocks.
dd if=/dev/zero of=/dev/sdb bs=128K count=300000
Trimmed output of iostat -dxm 1
:
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 129897.00 0.00 1024.00 0.00 512.00 1024.00 142.09 138.81 0.00 138.81 0.98 100.00
My reading of this is that it's writing 512MBps in 1024 operations. This means each write = 512/1024 = 512K.
Another way of calculating the same thing: The avgrq-sz column shows 1024 sectors. According to gdisk
the sector size of this Samsung 850 Pro SSD is 512B, therefore each write is 1024 sectors * 512B = 512K.
So my question is, why is it writing 512K blocks instead of 128K as specified with dd
? If I change dd
to write 4M blocks, the iostat result is exactly the same. The merges number doesn't make sense to me either.
That was writing directly to the block device; but if I format it XFS and write to the filesystem, the numbers are the same except zero merges:
dd if=/dev/zero of=/mnt/ddtest bs=4M count=3000
Now iostat shows
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 1024.00 0.00 512.00 1024.00 142.31 138.92 0.00 138.92 0.98 100.00
I'm using RHEL 7.7 by the way.
Elliott B
(575 rep)
Sep 10, 2019, 08:38 AM
• Last activity: May 14, 2025, 01:11 AM
Showing page 1 of 20 total questions