0

we have 500 gb EBS device (/dev/sdb) attached to instance. We would like to create few directories/sub-directories, for e.g. /dir1/test with 200 gb, /dir1/test/logs with 20 gb.

Is there any way to do this WITHOUT SUDO access (can't login into linux box with sudo access), using AWS Portal or any other script?

TylerH
  • 20,799
  • 66
  • 75
  • 101
woo
  • 49
  • 5
  • Stop the instance. Detach volume. Mount in other instance and create your folders – Marcin Jul 19 '21 at 21:11
  • thank you but when you say "mount in other instance" are you saying we need to scrap the instance and create new instance and then mount volume in that new instance? – woo Jul 19 '21 at 23:43
  • No. You can attach and reattach ebs volumes at will to different instances. After you create the folders using other instance that you can login into, you can re-attach it to old one. You can test the procedure on some dummy ebs volumes and instances, just to evaluate if this would be useful to your problem. – Marcin Jul 19 '21 at 23:47
  • i am trying to see if there is any scripting way to do it using python or so. I found this .rb script which new gp2 volume with size 1G and attached to the instance as '/dev/sda'. However, i am not sure how to mount volume at dir (/dir1/test). aws_volume_ebs_volume "db_ebs_volume" do size 1 device "/dev/sda" volume_type "gp2" action [ :create, :attach ] end – woo Jul 20 '21 at 14:25

0 Answers0