Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.