my Ubuntu Windows Azure VM is constantly putting disk to read-only state. Here's the log:

Jun  5 08:48:33 addagio-web kernel: [253582.732005] hv_storvsc vmbus_0_1: cmd 0x2a     scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732008] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732012] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732015] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732018] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732021] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:33 addagio-web kernel: [253582.732025] hv_storvsc vmbus_0_1: cmd 0x2a scsi status 0x2 srb status 0x4
Jun  5 08:48:43 addagio-web kernel: [253592.758687] sd 0:0:0:0: [sda] Unhandled error code
Jun  5 08:48:43 addagio-web kernel: [253592.758691] sd 0:0:0:0: [sda]  Result: hostbyte=invalid driverbyte=DRIVER_OK
Jun  5 08:48:43 addagio-web kernel: [253592.758696] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 c0 48 01 00 00 08 00
Jun  5 08:48:43 addagio-web kernel: [253592.758704] end_request: critical target error, dev sda, sector 12601345
Jun  5 08:48:43 addagio-web kernel: [253592.832032] quiet_error: 12 callbacks suppressed
Jun  5 08:48:43 addagio-web kernel: [253592.832036] Buffer I/O error on device sda1, logical block 1573160
Jun  5 08:48:43 addagio-web kernel: [253592.833992] lost page write due to I/O error on sda1
Jun  5 08:48:43 addagio-web kernel: [253592.834012] sd 0:0:0:0: [sda]  Sense Key : No Sense [current]
Jun  5 08:48:43 addagio-web kernel: [253592.834026] sd 0:0:0:0: [sda]  Add. Sense: No additional sense information
Jun  5 08:48:43 addagio-web kernel: [253592.834046] sd 0:0:0:0: [sda]  Sense Key : No Sense [current]
Jun  5 08:48:43 addagio-web kernel: [253592.834062] sd 0:0:0:0: [sda]  Add. Sense: No additional sense information
Jun  5 08:48:43 addagio-web kernel: [253592.834076] sd 0:0:0:0: [sda]  Sense Key : No Sense [current]
share|improve this question
    
kernel: [256061.167746] sd 0:0:0:0: [sda] Unhandled error code kernel: [256061.167751] sd 0:0:0:0: [sda] Result: hostbyte=invalid driverbyte=DRIVER_OK kernel: [256061.167755] sd 0:0:0:0: [sda] CDB: Write(10): 2a 00 00 e5 00 09 00 00 08 00 kernel: [256061.167763] end_request: critical target error, dev sda, sector 15007753 kernel: [256061.169963] Buffer I/O error on device sda1, logical block 1873961 kernel: [256061.172048] EXT4-fs warning (device sda1): ext4_end_bio:250: I/O error writing to inode 1235 (offset 8192 size 4096 starting block 1875970) – user3714227 Jun 6 '14 at 8:20

What kernel version are you using? This thread suggests that it's specific to using the storvsc driver with an ext4 filesystem, and a workaround was added to Linux kernel 3.9-rc1.

So, try a non-ext4 file system, or update your kernel to a later version.

share|improve this answer

Couple of days ago one of our Ubuntu 16.04 LTS server's root partition become read-only. Shutdown, restart, deallocate did not help, sda1 to / still mounted in read-only mode. I've reported it to Azure Support. They were really helpful. We figured it out that sda has got some errors. For now I don't know why.

Here is how we fixed it:

Repair the file system

fsck /dev/sda1

Remount the root partition with read-write option

mount -o remount,rw /

Check if it was success

mount

Our console messages

root@yourserver:~# fsck /dev/sda1

fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
cloudimg-rootfs contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 2178 has zero dtime. Fix<y>? yes
Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes
Inode 2179 was part of the orphaned inode list. FIXED.
Inode 256325 was part of the orphaned inode list. FIXED.
Inode 256327 was part of the orphaned inode list. FIXED.
Inode 256329 was part of the orphaned inode list. FIXED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -(46192--46873) -531081 -(6055714--6055716) -(6055720--6055726)
Fix<y>? yes
Free blocks count wrong for group #1 (3963, counted=4645).
Fix<y>? yes
Free blocks count wrong for group #16 (25664, counted=25665).
Fix<y>? yes
Free blocks count wrong for group #184 (15998, counted=16008).
Fix<y>? yes
Free blocks count wrong (4654888, counted=4655581).
Fix<y>? yes
Inode bitmap differences: -(2178--2179) -256325 -256327 -256329
Fix<y>? yes
Free inodes count wrong for group #0 (39, counted=41).
Fix<y>? yes
Free inodes count wrong for group #16 (3, counted=6).
Fix<y>? yes
Directories count wrong for group #16 (2275, counted=2274).
Fix<y>? yes
Free inodes count wrong (3060151, counted=3060156).
Fix<y>? yes

cloudimg-rootfs: ***** FILE SYSTEM WAS MODIFIED *****
cloudimg-rootfs: ***** REBOOT LINUX *****
cloudimg-rootfs: 699844/3760000 files (0.1% non-contiguous), 3024158/7679739 blocks

root@yourserver:~# mount -o remount,rw /

root@yourserver:~# mount

...
/dev/sda1 on / type ext4 (rw,relatime,discard,data=ordered)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.