-2

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.

closed as off-topic by Jenny D, Ward, womble Oct 9 '15 at 0:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Jenny D, Ward, womble
If this question can be reworded to fit the rules in the help center, please edit the question.

  • When you say can't connect what exactly is the error message you get. – Iain Oct 1 '15 at 5:32
  • 3
    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. – yoonix Oct 1 '15 at 5:33
  • i really want to vote up your comment but my reputation is not enough. But thanks for the link. – Batbayar Oct 1 '15 at 6:24
1

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.

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

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