LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2016, 04:33 PM   #1
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Rep: Reputation: Disabled
unknown filesystem type 'LVM2_member'


Hi everyone,
Sorry for being such a noob
I am having problems mounting a partition.

I first typed "fdisk -l" and got the following output

Code:
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2F075F8B-260F-40CF-A0A3-5593A8B2D80F

Device       Start        End    Sectors   Size Type
/dev/sda1     2048     411647     409600   200M EFI System
/dev/sda2   411648    1435647    1024000   500M Linux filesystem
/dev/sda3  1435648 1953523711 1952088064 930.8G Linux LVM

Disk /dev/mapper/fedora-root: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-swap: 7.8 GiB, 8392802304 bytes, 16392192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Note that there is a partition /dev/sda3 with 930Gb of space.

I then typed "df" and got the following output

Code:
Filesystem              1K-blocks    Used Available Use% Mounted on
devtmpfs                  8153208       0   8153208   0% /dev
tmpfs                     8164600       0   8164600   0% /dev/shm
tmpfs                     8164600    1052   8163548   1% /run
tmpfs                     8164600       0   8164600   0% /sys/fs/cgroup
/dev/mapper/fedora-root  15718400 8589092   7129308  55% /
tmpfs                     8164600       8   8164592   1% /tmp
/dev/sda2                  487652   94891    363065  21% /boot
/dev/sda1                  204580    8404    196176   5% /boot/efi
tmpfs                     1632924       0   1632924   0% /run/user/0
tmpfs                     1632924       0   1632924   0% /run/user/1000
Note that in the df output, there is no partition for /dev/sda3.

To access the sda3 partition, I tried mounting it using the following commands:

# cd /
# mkdir kens_data
# mount /dev/sda3 /kens_data

And I get the "mount: unknown filesystem type 'LVM2_member'

When I type "vgscan", I get the following output

Code:
  Reading all physical volumes.  This may take a while...
  Found volume group "fedora" using metadata type lvm2
When I type "lvs" I get the following output
Code:
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root fedora -wi-ao---- 15.00g                                                    
  swap fedora -wi-ao----  7.82g
Can somebody please tell me what I am doing wrong?
Thanks in advance.
ken
 
Old 09-07-2016, 04:56 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,672

Rep: Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257
LVM is likely your system files.

You only show 3 filesystems present
The first is mandated by EFI (and is where grub resides for EFI to use to boot your kernel)
the second is /boot (where your kernel resides)
the third is a logical volume (it is not a filesystyem, but a structure that can contain a filesystem that can incorporate one or more partitions/disks within one filesystem) - and is where everything else in your system resides. The filesystem on that logical volume shows up shows up in your mount list as /dev/mapper/fedora-root.

so you can't mount /dev/sda3 - it is already in use.
 
Old 09-07-2016, 05:36 PM   #3
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thank you for your quick reply.
So if sda3 is already in use, how do I access it?
I have very little space on the root directory.
I need to access the 930Gb on sda3.
 
Old 09-07-2016, 05:52 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 166Reputation: 166
I'm not familiar with the specifics of handling LVM yet, but the basic strategy would be either:

1) Create new LVM partition, about 900GB in size (what's still available). Then put an entry in it in /etc/fstab, mounted in some convenient location (for example /home/myuserid/Documents).

or

2) Expand the OS's root partition to fill the rest of the space. I'm not sure whether this can be done while booted into it.
 
Old 09-07-2016, 06:28 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,279

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
No, all that space is already allocated to an LVM pv (the LVM eqivalent of a physical partition). One of the best features of LVM is it's flexibility - go get the Redhat LVM admin guide to learn how to use it.
But basically lv's (filesystems) live in volume groups - that is where the space is "reserved" for future allocation to lv's. You need to work out how big the "fedora" vg is - probably the whole 900-odd Gig in this case (vgs command). Then just resize the root lv and then resize the filesystem for root. Can even be done online in one command.
See the manual.
 
Old 09-08-2016, 01:20 AM   #6
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thanks everybody for your responses.
I entered the vgs command and the output was as follows:
Code:
  VG     #PV #LV #SN Attr   VSize   VFree  
  fedora   1   2   0 wz--n- 930.82g 908.01g
It looks like the "fedora" volume group has the full 930Gigs available.

I then entered the lgdisplay command and this showed that there are two logical volumes under the fedora volume group, swap and root.
The output is below:

Code:
  --- Logical volume ---
  LV Path                /dev/fedora/swap
  LV Name                swap
  VG Name                fedora
  LV UUID                aiXi0Y-qUL7-gGUV-grvP-ytMB-mfl2-1Egl8J
  LV Write Access        read/write
  LV Creation host, time localhost, 2016-09-06 21:43:14 -0700
  LV Status              available
  # open                 2
  LV Size                7.82 GiB
  Current LE             2001
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                jewSU4-BdxC-Akwa-gzyS-XS1j-qc7Y-R5avXn
  LV Write Access        read/write
  LV Creation host, time localhost, 2016-09-06 21:43:14 -0700
  LV Status              available
  # open                 1
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
Then I entered in the following command to extend the root volume to 100GiB
Code:
# lvextend -L100G /dev/fedora/root
and the following message appeared!
Code:
  Size of logical volume fedora/root changed from 15.00 GiB (3840 extents) to 100.00 GiB (25600 extents).
  Logical volume root successfully resized.
The lvdisplay now shows the root logical volume as 100GiB, but I still can't access more then the original 15GiB.

Yay!!! Almost there!!!

I am not quite sure what to do next. I am afraid I may wipe out my root directory.
If somebody can direct me from here it would be greatly appreciated.
Thanks in advance.
 
Old 09-08-2016, 02:03 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,279

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
Depends on the filesystem type - but Redhat/Fedora ship fsadm which attempts to hide the details. See the manpage.
Enlarging a filesystem (online) is generally safe these days.
 
Old 09-08-2016, 09:04 AM   #8
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,206
Blog Entries: 4

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by kwatts59 View Post

I am not quite sure what to do next. I am afraid I may wipe out my root directory.

Your next step would be to extend LV.

The Linux OS is Fedora, right?


From there, then you would resize:

Code:
resize2fs /dev/fedora/root
I also like running the following commands to take stock of what is going on the physical volumes, logical volumes and volume groups:

Code:
pvs ; vgs ; lvs 

pvdisplay ; vgdisplay ; lvdisplay

Last edited by JockVSJock; 09-08-2016 at 09:23 AM.
 
Old 09-08-2016, 09:07 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,279

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
Deleted - prior post editted.

Last edited by syg00; 09-08-2016 at 06:43 PM.
 
Old 09-09-2016, 01:17 AM   #10
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
I entered the command
Code:
resize2fs /dev/fedora/root
but it gave me an error.
Unfortunately I cannot tell you the error because I typed the lsof command and a bunch of stuff scrolled the error off the screen.

Anyway, I figured it was because the device was mounted so I typed in the following command
Code:
umount -l /dev/fedora/root
Then when I typed the resize2fs command I got the following error:
Code:
ext2fs_check_mount_point: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/fedora/root is mounted.
I tried to remount the root volume with
Code:
mount /dev/fedora/root /
but I get the error
Code:
mount: special device /dev/fedora/root does not exist
Any ideas would REALLY be appreciated right now!

P.S. None of the following commands work now:
pvs ; vgs ; lvs
pvdisplay ; vgdisplay ; lvdisplay
They all give the following error:
Code:
  /proc/mounts: _get_sysfs_dir fopen failed: No such file or directory
  /proc/devices: fopen failed: No such file or directory

Last edited by kwatts59; 09-09-2016 at 01:24 AM.
 
Old 09-09-2016, 06:19 AM   #11
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,672

Rep: Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257
reboot.

You disabled the root system, so none of the utilities are available.
 
Old 09-09-2016, 05:30 PM   #12
kwatts59
Member
 
Registered: Aug 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
I rebooted and the root volume came back. Phew!
Anyway, I typed the "resize2fs /dev/fedora/root" command, I get the following error:
Code:
resize2fs 1.42.13 (17-May-2015)
resize2fs: Bad magic number in super-block while trying to open /dev/fedora/root
Couldn't find valid filesystem superblock.
After some Googling, I found the xfs_growfs command.

Code:
# xfs_growfs /dev/fedora/root
meta-data=/dev/mapper/fedora-root isize=512    agcount=4, agsize=983040 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1 spinodes=0
data     =                       bsize=4096   blocks=3932160, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 3932160 to 26214400
The xfs_growfs command expanded the root volume to 100Gb.
Yay! Case closed!
Thanks all!!
 
Old 09-09-2016, 08:20 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,279

Rep: Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986Reputation: 1986
Be aware there is no (easy) means of shrinking XFS - the main reason I avoid it.
Note my reference to fsadm.
 
Old 09-09-2016, 08:35 PM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,672

Rep: Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257
Quote:
Originally Posted by syg00 View Post
Be aware there is no (easy) means of shrinking XFS - the main reason I avoid it.
Note my reference to fsadm.
The only way it to make a backup... or copy it to a different filesystem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't mount ntfs: unknown filesystem type 'LVM2_member' joselegido Debian 4 04-28-2011 06:54 AM
mandriva dual boot filesystem type unknown,partition type 0x7 llearner Linux - Newbie 2 01-24-2010 02:03 PM
mount: unknown filesystem type 'LVM2_member' santana Linux - Hardware 3 02-28-2008 06:20 AM
filesystem type unknown, partition type 0x7 crazyface_juicebox Linux - General 1 02-11-2007 11:50 PM
root (hd 0,0)Filesystem type unknown, partition type 0x7chainloader +1 ece30675 Linux - Distributions 5 07-20-2004 09:04 AM


All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration