Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to extend my LVM partition. First I did

lvextend -L +100G /dev/server/home

Now I still have to extend the filesystem. The tutorials tell me to use resize2fs, but that only works for ext2 and ext3. I'm not even sure what filesystem I have...

fdisk /dev/server/home/

doesn't work... how do I know what kind of filesystem I have on my lvm partition?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

If it's a mounted filesystem, you can use df -hT:

$ df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4    5.5G  3.0G  2.3G  58% /
none      devtmpfs    229M  252K  229M   1% /dev
none         tmpfs    233M     0  233M   0% /dev/shm
none         tmpfs    233M  100K  233M   1% /var/run
none         tmpfs    233M     0  233M   0% /var/lock
none         tmpfs    233M     0  233M   0% /lib/init/rw

The "type" column indicates the filesystem in use; the "filesystem" column is the partition/device where it's located. (This example is from an Ubuntu Lucid system; my Debian system displays the root partition filetype as rootfs instead of the correct ext3.)

If the filesystem is not mounted, or df displays it as type rootfs, you can use a tool such as blkid, which checks the device more directly:

$ sudo blkid /path/to/filesystem/device
/dev/sda1: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4"
share|improve this answer
    
Thanks! Turned out the answer was "xfs" so I had to use the "xfs_growfs" command –  Jarvin May 2 '10 at 23:50

A recent version of GNU file will also tell you (so long as provide the flags for it to follow symlinks and look 'in' device special files):

[dan@khorium ~]$ sudo file -Ls /dev/vgcore/home
/dev/vgcore/home: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (large files) (huge files)

share|improve this answer

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.