[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disk Access



Le 02/07/2017 à 19:42, David a écrit :

I am using Linux Mint Debian (Betsy) and I'm having problems writing to
removable hard disks.

There are no problems reading and writing to USB sticks.

But removable sata disks I can read, but not write to. These disks are
in caddies that are designed to be removed.

There are two major differences between USB sticks and SATA drives :
- (e)SATA drives are considered fixed drives, regardless of whether they are physically removable or not, so their filesystems are not mounted automatically and cannot be mounted by a standard user. - USB sticks usually have a FAT or NTFS filesystem, which has no intrinsic Unix permissions and give ownership to the user who mounted it by default, whereas your disks have an ext4 filesystem which has intrinsic permissions regardless of the user which mounted it.

The disks are formatted to EXT4 and they do appear to be read only.

The attached details below are the results from /var/log/messages

There is no evidence in these messages that the disks are read only.
On the contrary, they state that "Write Protect is off" for both disks.
However a message states that the ext4 filesystem in /dev/sdb1 has errors and needs fsck. Maybe it was mounted read-only because of these errors, in order to protect it against corruption. You can check if a filesystem is mounted read-only by looking in /proc/mounts.

The first part is a disk that has files on it that I can read, but I
cannot write to it.

Did you check the file/directory permissions as already requested ?
What is the error message you get when trying to write ?
Do you try to write as root or as a regular user ?

Messages without the timestamps to make them more readable :

ata4.00: ATA-8: TOSHIBA HDWE140, FP2A, max UDMA/100
ata4.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
ata4.00: configured for UDMA/100
ata4: EH complete
scsi 3:0:0:0: Direct-Access ATA TOSHIBA HDWE140  FP2A PQ: 0 ANSI: 5
sd 3:0:0:0: Attached scsi generic sg3 type 0
sd 3:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
sd 3:0:0:0: [sdb] 4096-byte physical blocks
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sdb1
sd 3:0:0:0: [sdb] Attached SCSI disk

EXT4-fs (sdb1): warning: mounting fs with errors, running e2fsck is recommended
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)

ata5: hard resetting link
ata5: hard resetting link

ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5.00: ATA-10: ST4000DM005-2DP166, 0001, max UDMA/133
ata5.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
ata5.00: configured for UDMA/133
ata5: EH complete
scsi 4:0:0:0: Direct-Access ATA ST4000DM005-2DP1 0001 PQ: 0 ANSI: 5
sd 4:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
sd 4:0:0:0: [sdc] 4096-byte physical blocks
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 4:0:0:0: Attached scsi generic sg4 type 0
 sdc: sdc1
sd 4:0:0:0: [sdc] Attached SCSI disk




Reply to: