Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've attached a volume to a running instance in order to change the owner of /var directory (I did the mistake of changing the owner of /var and lost the access to the instance).

Running cat /proc/partitions

major minor  #blocks  name

 202        1    8388608 xvda1
 202       80    8388608 xvdf

The var directory I want to change the owner is in "xvdf".

How I do it?

Thanks!!

share|improve this question

You need to mount the filesystem on the volume in order to access the files:

mkdir /mnt/xvdf
mount /dev/xvdf /mnt/xvdf

Make the necessary changes in /mnt/xvdf/var, and then unmount it before detaching the volume:

umount /mnt/xvdf
share|improve this answer
    
I've done it but the file is empty... – Juan Carlos Jun 5 '12 at 21:11
    
@JuanCarlos What is empty? The /mnt/xvdf directory? Does mount show that it's mounted? – mgorven Jun 5 '12 at 21:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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