Active2 years, 6 months ago
CentOS 7 VirtualBox Guest Additions Installation Tutorial. In the following tutorial, I’ll demonstrate how to install Guest Additions on your VirtualBox hosted CentOS 7 Minimal machine. Although this tutorial is intended for CentOS 7 minimal, it’s will probably also work on other CentOS releases.
I want to mount a partition to an auxiliary folder via mount to fix a damaged grub.
I used the command.
and got as error:
Why?
Community♦
andandandandandandandand64944 gold badges99 silver badges1717 bronze badges
6 Answers
You need to add the
-t FILESYSTEMTYPE
argument to the command, replacing FILESYSTEMTYPE with your filesystem type. This specifies the filesystem type of the filesystem to be mounted. In your case, this would be /dev/sdb2. Some common, valid filesystem types are:- auto - this is a special one. It will try to guess the fs type when you use this.
- ext4 - this is probably the most common Linux fs type of the last few years
- ext3 - this is the most common Linux fs type from a couple years back
- ntfs - this is the most common Windows fs type or larger external hard drives
- vfat - this is the most common fs type used for smaller external hard drives
- exfat - is also a file system option commonly found on USB flash drives and other external drives
Community♦
reverendj1reverendj113k22 gold badges3838 silver badges3838 bronze badges
I was getting a similar error:
I tried finding out the issue and the issue was, I had partitioned it but no filesystem was assigned.
After this it successfully got mounted.
Eliah Kagan90.6k2323 gold badges250250 silver badges396396 bronze badges
AnkzzAnkzz
There is more to the story here. Usually if you mount a partition with a common filesystem type using
mount
, it will auto-detect the partition type.The fact that it isn't auto-detecting it in this case could signal a few possibilities.
- You haven't installed filesystem tools for the chosen filesystem. If you did a standard desktop install of Ubuntu, this shouldn't normally be a problem.For example, to mount ntfs drives in recent versions of Ubuntu you need the
ntfs-3g
package. - You selected the wrong partition.
- The partition is corrupt or unformatted. In this case, you should probably do a filesystem check (fsck) on it before mounting it. You may then want to proceed to mount it manually, specifying the filesystem type, as read-only. If all else fails you may need special recovery software such as
testdiskphotorec.
28.4k44 gold badges7171 silver badges9191 bronze badges
Please use
parted -l
to check the partition type and make sure you are mounting an actual data partition with known partition types (for example, ntfs, fat, etc).Here is what you would see from an 8TB drive, the first partition is not the actual data partition and instead, you should mount the second partition, which is the actual data partition.
Pabi5,85433 gold badges3232 silver badges4343 bronze badges
AZhuAZhu
You can check the filesystem type by
file
command:The usage of
-s
is explained in file - Linux/Unix command and here is an excerpt:'This is useful for determining the filesystem types of the data in raw disk partitions, which are block special files.'
Besides, I mounted successfully without specifying
-t type
.ClaraClara
If you have a > 32 GB drive usable on Windows and/or Mac that is not
NTFS
, and that is what you try to mount, chances are that you are trying to mount an exfat
drive.For that to work, you need to install
exfat-utils
(and exfat_fuse
that will automatically be installed as a dependency).VictorVictor
Not the answer you're looking for? Browse other questions tagged mount or ask your own question.
We have two Linux hosts of Oracle RAC in Oracle VirtualBox. Due to space shortage for file systems, there are difficulties for GI/RAC upgrading and patching. we have to extend the virtual hard disk from 30GB to 45GB, then extend the file system size accordingly.
Finally we need add 15GB into root (/) file system.
Before we start, we need know a lit of LVM terms.
PV = Physical Volume. When you add a new disk or new partition, you need to designate it as a PV so it can be used by the LVM VG = Volume Group. This is a group of PVs.
LV = Logical Volume. This is an abstraction of disk space carved out from a Volume Group (VG) which the OS can then use just as it would a regular hard drive
PE = Physical Extents. Think of this like “blocks”. When you do a “vgdisplay” you will see the PE size , the total number of PE’s in the VG and the free PEs available.
LV = Logical Volume. This is an abstraction of disk space carved out from a Volume Group (VG) which the OS can then use just as it would a regular hard drive
PE = Physical Extents. Think of this like “blocks”. When you do a “vgdisplay” you will see the PE size , the total number of PE’s in the VG and the free PEs available.
Backup virtual hard disk for racnode1 and racnode2, in case the operation fails.
Increase Virtualbox Disk Size
Make it from original 30GB to new value 45GB, and reboot the virtual machine.
Identify the partition type
Remember the partition ID is 8e, and System is “Linux LVM”
Check PV information
Partition the new disk space
Check partitions
pvcreate to add the new partition as a PV for VG
Check partition type, system, or need reboot the virtual machine if below errors occurred.
Check PV to make sure new PV added
Find the VG name details for adding the new PV
Add the new PV to the volume group ( ‘ol’)
Check the new size of the VG
Which LV to extend ?
here is ‘/dev/ol/root’
Extend the LV
Make sure +3849 is from ‘vgdisplay” Free PE
Shows the new LV size
Finally extend the file system size
As default, RedHat/CentOS 7 uses xfs_growfs to extend XFS file system. Alternatively using the resize2fs command for ext based file systems.
So below are all the commands used
# df -h
To see the current disk usage.
# fdisk -l
To see the current partitions details.
# poweroff
Turn the VM off so we can extend the disk on the VM side.
To see the current disk usage.
# fdisk -l
To see the current partitions details.
# poweroff
Turn the VM off so we can extend the disk on the VM side.
# fdisk -l
To see the new disk size on /dev/sda which we just extended, or to see new disks we just presented (/dev/sdb, /dev/sdc, etc.)
# fdisk /dev/sda
To create new partitions for the OS to use. These new partitions will be added to the VG so we can extend the LV that the “/” partition is on. My newly created partition in the example is /dev/sda3. For new disks you would use /dev/sdb, or /dev/sdc. If you are using an extended /dev/sda like in my case, you will need to reboot for the changes to be seen
# fdisk -l
To see the new partitions
# pvdisplay
View current physical volumes a.k.a. pv
# pvcreate /dev/sda3
Allow Linux OS to use the new partition in LVM
# pvdisplay
See the new pv /dev/sda3
# vgdisplay
View the current volume groups
# vgextend vg_ol /dev/sda3
Add the new PV /dev/sda3 to the existing VG ol
# vgdisplay
Now you can see the new size of the VG ol. Note the new amount of free PE’s (physical extents)
# lvdisplay
View the current LV. In this situation, which is the root partition
# lvextend -l +2559 /dev/ol/root
Now make the LV larger. Growing the LV /dev/ol/root by 3849 PEs
# lvdisplay
Now you can see the larger size of the LV
#xfs_growfs /dev/ol/root
or
# xfs_growfs /dev/ol/root
Online resize of the actual filesystem now on that LV
# df -h
You can see the new size now using the “df” command
To see the new disk size on /dev/sda which we just extended, or to see new disks we just presented (/dev/sdb, /dev/sdc, etc.)
# fdisk /dev/sda
To create new partitions for the OS to use. These new partitions will be added to the VG so we can extend the LV that the “/” partition is on. My newly created partition in the example is /dev/sda3. For new disks you would use /dev/sdb, or /dev/sdc. If you are using an extended /dev/sda like in my case, you will need to reboot for the changes to be seen
# fdisk -l
To see the new partitions
# pvdisplay
View current physical volumes a.k.a. pv
# pvcreate /dev/sda3
Allow Linux OS to use the new partition in LVM
# pvdisplay
See the new pv /dev/sda3
# vgdisplay
View the current volume groups
# vgextend vg_ol /dev/sda3
Add the new PV /dev/sda3 to the existing VG ol
# vgdisplay
Now you can see the new size of the VG ol. Note the new amount of free PE’s (physical extents)
# lvdisplay
View the current LV. In this situation, which is the root partition
# lvextend -l +2559 /dev/ol/root
Now make the LV larger. Growing the LV /dev/ol/root by 3849 PEs
# lvdisplay
Now you can see the larger size of the LV
#xfs_growfs /dev/ol/root
or
# xfs_growfs /dev/ol/root
Online resize of the actual filesystem now on that LV
# df -h
You can see the new size now using the “df” command
Advertisements