[clug] fdisk :"Unable to write to /dev/sdb"

Paul Harvey csirac2 at gmail.com
Wed Aug 19 07:57:29 UTC 2015


CentOS 5 is a little old. You may have to pass additional switches to fdisk [1]:

"fdisk, since util-linux >= 2.15. You should start with ā€˜-c -uā€™ to
disable DOS compatibility and use sectors instead of cylinders."

There's also the gpt/mbr partition table shenanigans, but I'm not
aware that old versions of fdisk are smart enough to stop themselves
from creating inconsistencies in that respect.

If all else fails I'd try to zero the first few MiB of the disk,
unplug, replug, retry fdisk (or gparted, or whatever).

[1] https://wiki.archlinux.org/index.php/Advanced_Format

On 19 August 2015 at 17:43, Eyal Lebedinsky <eyal at eyal.emu.id.au> wrote:
> On 19/08/15 17:20, Stephen Hodgman wrote:
>>
>> G'day All,
>> I have two Seagate 2TB Backup Plus USB 3 drives that I use for backup on
>> a CentOS 5 system.
>> When I received them I used fdisk to remove the NTFS partition and
>> created a Linux partition.
>> I then formated as ext3 and they are working fine.
>>
>> Today I purchased another drive, the box was basically the same, the
>> drive case was slightly different but it was still 2TB.
>> I used fdisk, deleted the partion, created a linux partition, pressed
>> "w" to save it and it responded
>> "Unable to write to /dev/sdb".  The NTFS partition remains on the disk.
>>
>> The device it not write protected.  I wrote to it with the NTFS partition.
>> When it loads, /var/log/messages says "Write protection is off"
>> The only real difference that I can see is that this new drive logs as
>> New Disk:
>> SCSI device sdb: 488378645 4096-byte hdwr sectors
>> Old (working) Disk:
>>   SCSI device sdb: 3907029167 512-byte hdwr
>>
>> They both multiply to 2TB but is there an issue with 4096 sectors?
>> Or, does anyone have a suggestions as to why fdisk will not write
>> partitioning to the disk?
>
>
> Any other info in /var/log/messages?
>
> As I recall these days partitions start further on, like sector 2048.
> It used to be much earlier. But I remember fdisk automatically starting the
> first
> partition in this higher location. If your did not do this for you then try
> that.
>
> Eyal
>
>> Thanks.
>
>
> --
> Eyal Lebedinsky (eyal at eyal.emu.id.au)
>
>
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux



More information about the linux mailing list