8,998 reputation
11123
bio website github.com/frostschutz
location
age 32
visits member for 1 year, 10 months
seen 1 hour ago

Nov
20
comment How can `dd` be used to right-shift data blocks?
What happens if ddrescue discovers a bad block in this scenario? If it jumps to another area of the disk (to avoid bad blocks), and continues copying from there, it would again overwrite not yet copied parts of your data. If it doesn't expect to work with the same device, it has no reason to take any special measures to prevent various possible data corruption cases.
Nov
20
comment How can `dd` be used to right-shift data blocks?
@starfry: sure, a program that just does it will be a nice solution. However I'm not at all sure about ddrescue here. Not if it expects to be working on different devices, and you have to trick it into accepting your arguments. It might not not have the "minimum buffer fill" property internally either (since with different devices it's not needed), so again it could corrupt your data. You'd have to check in the sourcecode whether it's actually designed for your use case.
Nov
16
awarded  Nice Answer
Nov
16
comment Raid 5 not starting
show full output
Nov
14
revised How can `dd` be used to right-shift data blocks?
added 30 characters in body
Nov
14
answered How can `dd` be used to right-shift data blocks?
Nov
11
comment mdadm RAID 5 and parted unrecognized disk label
And what's in dmesg after trying to mount with -t ext3? Also, check that your kernel supports GPT as well as ext3. Partitioning is not required, but recommended.
Nov
5
comment Software RAID10 setup writes small files extremely slowly, is this normal?
raid5/6 don't work with the full chunk either. the chunksize is more about physical distribution; the parity calculation takes smaller units
Nov
5
answered Software RAID10 setup writes small files extremely slowly, is this normal?
Nov
1
comment How to parallelize dd?
no, seek does not imply notrunc.
Oct
26
comment Formatting LUKS encrypted disk
Please elaborate more... Since you're trying to unlock /dev/dm-6, do you have LVM on there too? Do you want LVM on an external HDD?
Oct
24
comment Resize root LVM and FS in Debian 7
The size you give resize2fs should include any overhead already, otherwise results would be unpredictable. So using 2G both for resize2fs and lvresize should fit perfectly. - I used to do the same though for partitions with odd sizes. Also there is the general G/GB/GiB confusion... not all commands use the same units unfortunately. But it should be fine here...
Oct
23
comment set packet rate limit via iptables
@Andy: the rules described there are considerably more complex than what you put in your question. (In particular limit 10 instead of 100 in most cases). I see you've edited your question since, but all other issues aside, does this thing even have any chance to work with only 10 packets per second? Also, limiting INPUT is considerably harder than OUTPUT. Control over what others send you is very indirect only...
Oct
23
comment set packet rate limit via iptables
Something like iptables -A OUTPUT -m limit --limit 100/s -j ACCEPT, given a default DROP policy? Not sure about tc, most qdiscs do bandwidth rather than absolute packet counts. Then again, this would drop rather than delay...
Oct
22
comment “Spare” disk in a 2-disk mdadm RAID1 array?
Did you check SMART? Run a long self test on both disks.
Oct
21
comment “Spare” disk in a 2-disk mdadm RAID1 array?
Either disk may be bad, preventing successful syncing. Did the resync ever complete? Follow its progress in /proc/mdstat and check dmesg. Also check smartctl -a for /dev/sda and /dev/sdc.
Oct
18
comment LUKS-encrypted text file is garbled
scary if true... you should investigate further how/why that happens.
Oct
18
comment Why is dd not protected against writing on the active disk ?
One example is removing LUKS encryption in-place. That involves writing to a disk which is currently in use by LUKS. Maybe what you really wanted to know was, 'how can I make sure a device is not in use by anything before I write to it' or the like...
Oct
18
comment Drop a specific file from the Linux filesystem cache?
It even seems to work without sudo, so anyone who can see a file (even without write permission) can have its cache dropped, that's... interesting.
Oct
18
comment Drop a specific file from the Linux filesystem cache?
dd works for me. I ended up with chris-lamb.co.uk/projects/python-fadvise myself which is the same thing in a more obvious command.