Reputation
8,779
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
8 25
Newest
 Nice Answer
Impact
~595k people reached

1d
answered HDIO_GETGEO and HDIO_GET_IDENTITY in Linux using C++
1d
comment HDIO_GETGEO and HDIO_GET_IDENTITY in Linux using C++
No, you have 53575840 sectors. If it were a 4k sector drive, then it would be 1/8th of that.
Jul
2
comment Explaining SMART power error
The CRC is applied by the drive or controller to the data as they transmit it, so memory is only read once. If a bit is flipped in ram, then the controller transmits the flipped bit and computes a correct CRC on that bad data, which the drive can then verify. They only know/care whether the data got corrupted as it traversed the sata cable, not whether it was bad when it was handed to them, or if it goes bad after the controller hands it to the computer.
Jul
2
comment Explaining SMART power error
The CRC is computed before it hits main memory so it can't be that.
Jul
2
comment HDIO_GETGEO and HDIO_GET_IDENTITY in Linux using C++
GETGEO returns bios drive geometry, which is obsolete. IDENTITY returns the raw ATA device identification sector. You shouldn't use either one. Instead, simply read from the files /sys/block/sda/size and /sys/block/sda/queue/hw_sector_size. The former gives the size as a multiple of 512 bytes ( regardless of sector size of the drive ), and the latter gives the real sector size of the drive. If you want the logical sector size instead, use logical_block_size instead.
Jun
30
comment Limit cpu usage to one core
Each program only can run on a single core, unless it is multi threaded, which is unusual for scripts ( C/C++ programs, even even Java, are not scripts ).
Jun
29
comment Limit cpu usage to one core
Why? If two of the scripts can run at the same time, and there are two cores that are idle, why would you not use them?
Jun
24
comment How do I forbid access to physical memory in Linux?
Umm... if the system memory map tells the kernel that isn't a valid address range, then it won't ever try to use it, at least barring some bug that is just as likely to just corrupt some other random, but valid ram and crash the system anyhow.
Jun
21
comment How to close all proceses without restarting a machine?
Runlevel 2 is multi-user and includes the gui... all higher runlevels are the same, at least on debian based distros. I believe on some other distros, 2 does not include the gui, but 3-5 are still all the same.
Jun
21
comment How to close all proceses without restarting a machine?
That does not kill processes; it simply removes them from the shell's job management so they continue to run in the background and will not be killed if you exit the shell.
Jun
21
reviewed Approve When using btrfs, why “Size”, “Used” and “Avail” values from df do not match?
Jun
14
comment Problems with partition table on 3tb NTFS drive
@ID-ZERO, looks like SystemRescueCD is broken then or you're using a very outdated version. Use the Ubuntu livecd.
Jun
14
answered Problems with partition table on 3tb NTFS drive
Jun
11
answered How do I migrate a RAID system to a larger set of HDDS?
Jun
11
comment How to recover ext2 if all superblocks are gone?
sounds like the disk capped out. Check the SMART health of the drive and/or dmesg for more detailed errors.
Jun
11
comment Recover VG after Adding Disks and Rebooting
You shouldn't need to restore anything for lvm... what has gone wrong is that you created the vg with a partition on the disk, and that partition is no longer there. Hopefully the lvm is all still there and you just need to bring back the missing partition.
Jun
10
comment Recover VG after Adding Disks and Rebooting
Partitions don't just disappear on their own.. you might try recreating the partition with fdisk and see if its contents are still intact ( the pv will show up in pvs and the lv should automatically activate ). Also if you just created one lv using the whole ( and only ) disk in the vg, it begs the question why did you use lvm in the first place?
Jun
10
comment mdadm refuses to add second identical disk to array
The new disk may have come with a stupid host protected area enabled which is why it is reporting a smaller size. Check with sudo hdparm -N /dev/sdc
Jun
8
awarded  Nice Answer
Jun
7
comment What is actually the speed reported by dd?
/dev/md0 is a raid array, not your usb drive.