Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.