3

In addition to the other storage devices on my laptop, running df -h displays /cow as one of the devices. What does this mean?

Jeff
  • 1,674
Beldar
  • 31
  • 'cow' usually stands for copy-on-write. I'm not sure why it'd be in your df output, but someone here will likely know. But, if you want to look for more info, it's usually 'copy on write'. – KGIII Oct 31 '20 at 21:52
  • Are you using Ubuntu? Which Ubuntu release? – waltinator Nov 01 '20 at 07:13

1 Answers1

3

I think you are running a live (live-only or persistent live Ubuntu system). Such systems run with the root file system in RAM and the device is called cow (which refers to 'copy on write').

A live-only system allocates typically half of the available RAM for the root file system. A persistent live system uses an overlay system, where the partition (or file) for persistence is overlayed on the RAM for the root file system.

Example 1: A live-only system in a computer with 16 GiB RAM

lubuntu@lubuntu:~$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
tmpfs                        1.6G  9.8M  1.6G   1% /run
/dev/sdb1                    1.8G  1.8G     0 100% /cdrom
/cow                         7.8G   17M  7.8G   1% /
/dev/disk/by-label/writable   54G   55M   51G   1% /var/log
tmpfs                        7.8G     0  7.8G   0% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs                        7.8G     0  7.8G   0% /tmp
tmpfs                        1.6G   80K  1.6G   1% /run/user/999

Example 2: A persistent live system in an SSD with 60 GB connected via USB

lubuntu@lubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           1.6G  1.8M  1.6G   1% /run
/dev/sda1       1.8G  1.8G     0 100% /cdrom
/cow             54G   81M   51G   1% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
tmpfs           7.8G     0  7.8G   0% /tmp
tmpfs           1.6G   80K  1.6G   1% /run/user/999
/dev/sda4        54G   81M   51G   1% /media/lubuntu/writable

You can create both kinds of systems with mkusb

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 1
    This helped me to realise the installation on VPS server went wrong. Had to restart the installation, then disable the CDROM in web interface when it asks to reboot, and reboot. And then you are logged in properly, not like this. – Nakilon Jul 28 '23 at 00:50
  • 1
    containers often have copy on write mountpoints as well. - Or unionfs. – mckenzm Aug 01 '23 at 00:52
  • If the root file system, /, is running in RAM and the device is called cow it is a very good guess that it is a live (or persistent live) system. – sudodus Aug 01 '23 at 08:13