I have a VirtualBox Ubuntu VM with a virtual disk that is mounting as a read-only filesystem. I'm not sure why that is, and my attempts to remount as read/write haven't worked.
One of the last things I did before it went read-only was to extend the size of the disk. What I did was:
VBoxManage modifymedium —resize(from the Mac host system) to extend the VM disk image,
- booted the guest system off a GParted ISO and used that to join the new space into my existing main partition,
- booted into the guest system normally, then
resize2fsto extend the filesystem into the new space.
This was the second time I had done this, actually, and seemed to be working fine. I ran a process on the machine that filled up a lot of the space. That was the last successful thing I remember doing before running into this read-only mode issue.
I don't see anything in dmesg that looks to me to be about filesystem issues or causes for going into read-only mode. I see this:
[ 1.809918] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null) [ 2.230023] Adding 524284k swap on /dev/mapper/trails-swap_1. Priority:-1 extents:1 across:524284k [ 2.242615] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
/proc/cmdline shows that same command.
I've tried different combinations parameters to the mount command, like:
$ sudo mount -o remount,rw
$ sudo mount -o remount,rw /dev/mapper/trails-root
$ sudo mount -o remount,rw -t ext3 /dev/sda5 /
Not sure what I should be looking for, but I get no output from these.
Booting into recovery mode and doing an fsck runs without issue.
If I go into GRUB options on boot and remove the "ro" I still end up in read-only mode.
fdisk says my two LVM volumes on the resized parition don't contain valid partition tables.
Here's the output of some commands that might be helpful:
$ sudo more /etc/fstab
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/trails-root / ext3 errors=remount-ro 0 1 /dev/mapper/trails-swap_1 none swap sw 0 0 proc /proc proc defaults 0 0
$ fdisk -l
Disk /dev/sda: 59.1 GB, 59055800320 bytes 255 heads, 63 sectors/track, 7179 cylinders, total 115343360 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0005deaa Device Boot Start End Blocks Id System /dev/sda1 * 2048 499711 248832 83 Linux /dev/sda2 501758 115343359 57420801 5 Extended /dev/sda5 501760 115343359 57420800 8e Linux LVM Disk /dev/mapper/trails-root: 58.3 GB, 58258882560 bytes 255 heads, 63 sectors/track, 7082 cylinders, total 113786880 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/trails-root doesn't contain a valid partition table Disk /dev/mapper/trails-swap_1: 536 MB, 536870912 bytes 255 heads, 63 sectors/track, 65 cylinders, total 1048576 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/trails-swap_1 doesn't contain a valid partition table
$ sudo pvdisplay
--- Physical volume --- PV Name /dev/sda5 VG Name trails PV Size 54.76 GiB / not usable 2.81 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 14018 Free PE 0 Allocated PE 14018 PV UUID ew9UUW-fJbf-I4o1-otM3-Rpeg-nyK6-0Hn0ol /etc/lvm/cache/.cache.tmp: fopen failed: No space left on device
$ sudo vgdisplay
--- Volume group --- VG Name trails System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 9 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 54.76 GiB PE Size 4.00 MiB Total PE 14018 Alloc PE / Size 14018 / 54.76 GiB Free PE / Size 0 / 0 VG UUID wZqfAM-DgIg-Z1P1-TSqi-iycL-O2pL-s2x8fU Couldn't create temporary archive name. Volume group "trails" metadata archive failed. Couldn't create temporary archive name. Volume group "trails" metadata archive failed. Couldn't create temporary text file name. Backup of volume group trails metadata failed. /etc/lvm/cache/.cache.tmp: fopen failed: No space left on device
$ sudo lvm
lvm> lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert root trails -wi-ao 54.26g swap_1 trails -wi-ao 512.00m
$ sudo lvdisplay
--- Logical volume --- LV Name /dev/trails/root VG Name trails LV UUID cfACOE-8PCl-jZye-dIZW-KOaS-dnOD-RwO8Ek LV Write Access read/write LV Status available # open 1 LV Size 54.26 GiB Current LE 13890 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0 --- Logical volume --- LV Name /dev/trails/swap_1 VG Name trails LV UUID EqcxJH-jOdB-NLIW-fDNi-vWn4-nWbe-feFRM6 LV Write Access read/write LV Status available # open 2 LV Size 512.00 MiB Current LE 128 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:1 /etc/lvm/cache/.cache.tmp: fopen failed: No space left on device
Enough? (Too much?)
I'm not sure where to go from here. Many thanks for any help!