0

I am not very clear with identifying the partition type or filesystem residing on it here is what lvscan reports me

 ACTIVE            '/dev/virtualization/vm1' [100.00 GiB] inherit
 ACTIVE            '/dev/virtualization/vm2' [150.00 GiB] inherit
 ACTIVE            '/dev/virtualization/vm3' [50.00 GiB] inherit
 ACTIVE            '/dev/virtualization/vm4' [100.00 GiB] inherit

How can I identify the file system running on it. It is a Ubuntu server and the above are LVM partitions created by virt-manager.

The output of mount command is

/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
nfsd on /proc/fs/nfsd type nfsd (rw)

The output of blkid as some one requested below is
blkid /dev/sda1 /dev/sda1: UUID="6876c294-0c70-4b4e-87a2-636ea19e5ed6" TYPE="ext4" but this did not helped me much.Also I did
blkid /dev/virtualization but there was no result i.e. nothing in output. Also the output of file command I did file /dev/virtualization/*

site4:      symbolic link to `../mapper/virtualization-site4'
site3: symbolic link to `/dev/mapper/virtualization-site3'
site2:   symbolic link to `../mapper/virtualization-site2'
site1: symbolic link to `../mapper/virtualization-site1'

What more should I be doing?

Registered User
  • 1,463
  • 5
  • 18
  • 37

4 Answers4

2

blkid the device or use file otherwise (like dd if=/dev/sde1 bs=1M count=1 | file -)

poige
  • 9,448
  • 2
  • 25
  • 52
1

You could try just to mount them. (mount /dev/virtualization/vm1 /mnt/tmp). Kernel will detect (actually, not detect, but try all supported filesystems) and you'll see fs type in the output of mount command.

rvs
  • 4,125
  • 1
  • 27
  • 31
  • See I am doing this work to be able to resize them (reduce the size of LVMs) so it is important for me to know what is the file system residing on lvm.Because before reducing the LVM size it is important to reduce the size of filesystem on it.That is how it works. Hence I want to know. – Registered User Feb 02 '11 at 09:54
  • ` lrwxrwxrwx 1 root root 28 2011-02-01 10:39 site4 -> ../mapper/virtualization-site4 lrwxrwxrwx 1 root root 35 2011-02-02 14:20 site3 -> /dev/mapper/virtualization-site3 lrwxrwxrwx 1 root root 31 2011-02-01 10:39 site2 -> ../mapper/virtualization-site2 lrwxrwxrwx 1 root root 33 2011-02-01 10:39 site1 -> ../mapper/virtualization-site1 ` and the output of mount command is – Registered User Feb 02 '11 at 09:57
  • @Registered: Yeah, and rvs told you one way to find it out. So what's the issue? Just make sure that no VM is running on those partitions, otherwise your might break the file systems. – Sven Feb 02 '11 at 09:58
  • `/dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) none on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev type devtmpfs (rw,mode=0755) none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) none on /dev/shm type tmpfs (rw,nosuid,nodev) ` – Registered User Feb 02 '11 at 09:58
  • none on /var/run type tmpfs (rw,nosuid,mode=0755) none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) nfsd on /proc/fs/nfsd type nfsd (rw) – Registered User Feb 02 '11 at 09:59
  • @SvenW above is output of mount command by the time I read your message I was formatting the message.It no where shows the file system type running on it. – Registered User Feb 02 '11 at 10:00
  • Could you please post this output as an edit to your question, using the "code formatter"? This way, we could actually read it. – Sven Feb 02 '11 at 10:00
  • @SvenW I edited as you mentioned. Please see now the question. – Registered User Feb 02 '11 at 10:04
1

file -s /dev/mapper/virtualization-site4

Because man file told me:

Specifying the -s option causes file to also read argument files which are block or character special files. This is useful for determining the filesystem types of the data in raw disk partitions, which are block special files.

However in your case, you will be led by a symlink to /dev/dm-*.

SamK
  • 1,356
  • 3
  • 14
  • 28
0

Well, if they are VM file systems, just login to the VM and see what file systems are used.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • I have edited the question actually here is a situation I have not create /boot and also I am not able to understand what command will help me to find which file system when I log in to VM. Let me know I will try. – Registered User Feb 02 '11 at 10:04