- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-10-2019 01:59 PM
I am trying to expand the root of expedition since 18g is not enough when you start loading up data into projects so it keeps yelling at me for space.
Tried following this http://www.geoffstratton.com/expand-hard-disk-ubuntu-lvm
But get error:
expedition@pan-expedition:~$ sudo pvcreate /dev/sda3
Device /dev/sda3 not found (or ignored by filtering).
expedition@pan-expedition:~$ pvcreate /dev/sda3
WARNING: Running as a non-root user. Functionality may be unavailable.
/run/lvm/lvmetad.socket: connect failed: Permission denied
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
/run/lock/lvm/P_orphans:aux: open failed: Permission denied
Can't get lock for orphan PVs
expedition@pan-expedition:~$
04-10-2019 02:52 PM
fexpedition@pan-expedition:~$ sudo fdisk -l
[sudo] password for expedition:
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe5054db8
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 999424 167772159 166772736 79.5G 5 Extended
/dev/sda5 1001472 167772159 166770688 79.5G 8e Linux LVM
Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/Expedition--vg-root: 18.1 GiB, 19386073088 bytes, 37863424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/Expedition--vg-swap_1: 1.5 GiB, 1572864000 bytes, 3072000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
expedition@pan-expedition:~$
expedition@pan-expedition:~$
expedition@pan-expedition:~$
expedition@pan-expedition:~$
expedition@pan-expedition:~$ pvcreate /dev/sda3
WARNING: Running as a non-root user. Functionality may be unavailable.
/run/lvm/lvmetad.socket: connect failed: Permission denied
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
/run/lock/lvm/P_orphans:aux: open failed: Permission denied
Can't get lock for orphan PVs
expedition@pan-expedition:~$ sudo pvcreate /dev/sda3
Device /dev/sda3 not found (or ignored by filtering).
expedition@pan-expedition:~$ sudo pvcreate /dev/sda5
Can't initialize physical volume "/dev/sda5" of volume group "Expedition-vg" without -ff
expedition@pan-expedition:~$ sudo pvcreate /dev/sda5 -ff
Really INITIALIZE physical volume "/dev/sda5" of volume group "Expedition-vg" [y/n]? y
Can't open /dev/sda5 exclusively. Mounted filesystem?
expedition@pan-expedition:~$
04-10-2019 03:12 PM
Ok I figured it out. There are a few things missing in most articles I have found for resizing root volumes.
You have to use pvresize to achieve this.
I will create an article on how to do this.
07-12-2024 09:50 AM
Can you share the steps? I am running into the same issue.
07-18-2024 06:02 AM
Hi @Rutu.Modi
Let me share with you the steps to mount a second drive and move ML data to it. In the example I'm using a 4TB hard drive in /dev/sdb partition.
// get the disk name (i.e: sdb)
fdisk -l
// remove partition (i.e: sdb)
fdisk /dev/sdb
option: d
option: w
// create the partition (i.e: sdb)
parted /dev/sdb
(parted) mklabel gpt
(parted) mkpart primary 0GB 4100GB
(parted) quit
// check the created partition name (i.e: sdb1)
fdisk -l
// Format the partition
sudo mkfs.ext4 /dev/sdb1
// Create a folder to mount the partition
mkdir /hdd
// Mount the partition
mount /dev/sdb1 /hdd
// Make it permanent by adding it into the fstab
sudo vi /etc/fstab
/dev/sdb1 /hdd ext4 defaults 0 0
// Check it
df -h
// Now move /PALogs and /data to the created /hdd folder
sudo mv /PALogs/ /hdd/
sudo mv /data/ /hdd/
//Update the grants
sudo usermod -a -G www-data expedition
sudo chown -R www-data:www-data /hdd/
// Create the symbolic links
sudo ln -s /hdd/PALogs/ /PALogs
sudo ln -s /hdd/data/ /data
ls -la /
Hope this helps,
David
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!