Ubuntu – How to increase the size of /dev

mountudev

I have run into a rather unusual situation:

...
cp: failed to extend ‘/dev/mapper/loop0p1’: No space left on device

nathan@nathan-desktop:~$ df
Filesystem                        1K-blocks      Used  Available Use% Mounted on
udev                                4017004   4017004          0 100% /dev

I have run out of "disk" space on /dev. (For the curious, I am using kpartx to copy some partition images to a disk image.)

There is no entry for /dev in /etc/fstab – how do I change the amount of space allocated for /dev? Is there a configuration file I can modify?

Best Answer

As given in this Super User post, remounting it works:

$ df -h | grep udev
udev                                      1.0G  4.0K  1.0G   1% /dev
$ sudo mount -o remount,size=3G /dev
$ df -h | grep udev                 
udev                                      3.0G  4.0K  3.0G   1% /dev