-1

I have AWS EC2 instance and its disk usage always above 90% and just trying to move user folder to "udev" partition to free disk space.

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.9G  6.7G  830M  90% /
udev            3.7G  8.0K  3.7G   1% /dev

First question I know what is this partition and used for but if i move user's folder to it, Is there any harm?

Second, I just did following steps. But i can't connect to server with ssh after restart server. Any solution and explanation to it?

sudo mv /home/ubuntu /dev/ubuntu
sudo mkdir /home/ubuntu
sudo chown ubuntu:ubuntu /home/ubuntu
mount --bind --verbose /dev/ubuntu /home/ubuntu

UPDATE 2


OK i think problem is solved. The reason of error is caused by moving user home folder to /dev. It was big mistake because udev partition is placed on memory. When i stop server, computer's memory will cleared out. Which means my user folder will gone forever.

Thanks for quick response time and great content. Really appreciate that.

3
  • When you say can't connect what exactly is the error message you get.
    – user9517
    Oct 1, 2015 at 5:32
  • 4
    If that's what you did and then rebooted the server, you just wiped out your /home/ubuntu. udev is not a standard filesystem, it's a device manager stored entirely in RAM. You reboot, your RAM is cleared. This answer on SuperUser will explain more.
    – user143703
    Oct 1, 2015 at 5:33
  • i really want to vote up your comment but my reputation is not enough. But thanks for the link.
    – Bagi
    Oct 1, 2015 at 6:24

1 Answer 1

2

The udev device is a RAM disk and so unfortunately I think you have just lost all your data from /home/ubuntu.

See this Answer on Superuser for more details on udev

Best reach for your backups to get that back.


If you tell us the exact message you get from your ssh connection attempts we ma be ale to help you out there but that may be immaterial.

3
  • So if i move home folder to dev partition means i'm placing it on memory?
    – Bagi
    Oct 1, 2015 at 5:58
  • OK figured it out. This means i'm plaing it on memory.
    – Bagi
    Oct 1, 2015 at 6:16
  • Marking as accepted answer. Will be appreciate if you include yoonix's link to it. Thanks.
    – Bagi
    Oct 1, 2015 at 6:27

Not the answer you're looking for? Browse other questions tagged .