0

I have a probably stupid question: why do my volumes not show up when I run "mount" (on Amazon) :

I would expect my 3 volumes (/dev/xvda1; /dev/xvdf ; /dev/xcdg) to show up here and only the root volume does:

[root@ip-* /]# mount
/dev/xvda1 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

and

[root@ip-* /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            7.9G  1.6G  6.3G  21% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm

and

[root@ip-* /]# fdisk -l

Disk /dev/xvda1: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/xvdf: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/xvdg: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

While /mnt/web is still "useable" which is /dev/xvdf (it is always available also after a reboot)

Assumption: None of these volumes are in /etc/fstab so probably that is why they are not reported by mount. However: where are they mounted? could not see a reference in /etc/init.d

2 Answers 2

1

When you add EBS volumes, amazon does not mount them for you. You need to either mount them manually or add them to your fstab.

5
  • yes i read stackoverflow.com/questions/6006805/… but ... they ARE mounted, why do they not show up with the command "mount" ?
    – edelwater
    Apr 20, 2013 at 15:19
  • 1
    No, they are not mounted. When writing to /mnt/web, you are writing to your root filesystem, not the new volume.
    – EEAA
    Apr 20, 2013 at 15:21
  • ah, should I also add the root /dev/xvda1 to the fstab?
    – edelwater
    Apr 20, 2013 at 15:24
  • 1
    It is already in your fstab, likely mounted by its fs label, instead of by device node.
    – EEAA
    Apr 20, 2013 at 15:30
  • Ah, then this is ::: LABEL=/ / ext4 defaults,noatime 1 1 (Im still curious how "LABEL=/" is found by the system and where it maps this to /dev/xvda1 but probably that should go in unix.stackexchange.com)
    – edelwater
    Apr 20, 2013 at 15:36
0

After creating and attach the volume to your instances. you need to format that volume to the required file system.

Let say, if you want to create ext4 file system for linux, then use the below command to format the partition and make it as ext4

# mkfs -t ext4 /dev/xvdf

# mkfs -t ext4 /dev/xvdg

Now you can use those partitions in your linux machine and you can also add the entries in the fstab

Now check your partitions using df -h , mount commands

You must log in to answer this question.

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