LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Map/Mount Volume Group Folder to Volume Group Folder??? (https://www.linuxquestions.org/questions/linux-newbie-8/map-mount-volume-group-folder-to-volume-group-folder-4175477508/)

Led Zappa 09-17-2013 07:01 PM

Map/Mount Volume Group Folder to Volume Group Folder???
 
I am trying to backup FreePBX, but it will only back up to it's specified path on the local disk. I have another partition/volume group with Gigabytes in free space. I want to point/mount that space to the default location for PBX which is on the root partition/VG. Is that possible?

This is also on mirrored drives.

So, essentially I want to have /var/lib/asterisk/backups on the root partition/VG pointing to /backups on the /home partition/VG


Code:

[root@localhost asterisk]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      50G  29G  19G  62% /
tmpfs                2.0G    0  2.0G  0% /dev/shm
/dev/mapper/ddf1_4c53492020202020808627c3000000004711471100001450p1
                      485M  31M  429M  7% /boot
/dev/mapper/VolGroup-lv_home
                      404G  444M  383G  1% /home

Code:

[root@localhost asterisk]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0003c95f

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          64      512000  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64      60667  486791168  8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0003c95f

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          1          64      512000  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2              64      60667  486791168  8e  Linux LVM


custangro 09-17-2013 07:35 PM

Would a symlink work?

--C

Led Zappa 09-17-2013 09:07 PM

As a newbie, I don't know, but it doesn't seem like it. I got the idea from a support page for PBX which said you could mount a USB Drive and mount the usb to the root path where FreePBX would try and point files, but I can't figure out how to do the same thing with a partition/VG. I don't even know if those above are true partitions or Volume Groups. I'm reading up as much as I can.

If I can as root on the local system copy a file pointed to /var/lib/asterisk/backups and the data would actually end up in /home/backups I believe it will work. I don't care how I get there.

custangro 09-20-2013 05:42 PM

Okay; then try this

Code:

ln -s /home/backups /var/lib/asterisk/backups
Note that /var/lib/asterisk/backups must not exist and /home/backups must exist



Verify with...

Code:

touch /var/lib/asterisk/backups/TEST.txt
ls -l /home/backups

--C

Led Zappa 09-21-2013 05:12 PM

Thanks for your reply custangro, but unfortunately I won't be able to test the solution as the company I was working for shut their doors last week :(

On to bigger and better things I guess.


All times are GMT -5. The time now is 03:08 AM.