Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Linux webserver experts please help
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Linux webserver experts please help

I have a dedicated server with centos, it has 2 hard disks each of 3TB space, now i host a filehosting website on this server. my 1st disk of 3TB is now full and i want to link the 2nd 3TB disk to the path were files are stored by filehosting site script : /home/admin/public_html/files/, please guide me how to do this, i dont want to do anything stupid and loose my 3TB uploaded files just like that.

Comments

  • Create an alias in your webserver configuration to the directory?

  • @doughmanes said:
    Create an alias in your webserver configuration to the directory?

    How Can i do that?

  • What does your /etc/fstab look like?

  • Backup your files from the machine onto an external backup site using FTP (yum install ftp) and install OpenCloud?

  • mobiboymobiboy Member
    edited January 2015

    @rajprakash said:
    What does your /etc/fstab look like?

    It looks like this :

    #

    /etc/fstab

    Created by anaconda on Mon Dec 30 08:17:08 2013

    #

    Accessible filesystems, by reference, are maintained under '/dev/disk'

    See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

    #
    UUID=a0b76869-b48e-431c-a150-d63739b8fb11 / ext4 usrjquota=quota.user,jqfmt=vfsv0 1 1
    UUID=9943c657-9b59-44e7-a6dc-a15c9ce8947f /boot ext2 >defaults 1 2
    UUID=f2261212-f9b6-43e9-acce-9dc35af77f81 /tmp ext4 noexec,nosuid,nodev 1 2
    UUID=8395e18d-8c22-4233-b72d-9996d6a9f885 swap swap >defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    /tmp /var/tmp ext3 defaults,bind,noauto 0 0
    ~
    "/etc/fstab" 17L, 987C

  • by alias they mean in your apache or nginx config.

    Alias /newfolder /etc/newdisk/blabla (or the root wher eis located your folder)

    and this may be different if you use an apache or nginx web server.

  • @ECNetworks said:
    Backup your files from the machine onto an external backup site using FTP (yum install ftp) and install OpenCloud?

    You made the day. Cheers!

    Thanked by 1BuyAds
  • @Sady No problem I try to come up with stupid simplistic shit all the time! xD

  • @ECNetworks said:
    Sady No problem I try to come up with stupid simplistic shit all the time! xD

    Will try to avoid those.

  • @ECNetworks said:
    Backup your files from the machine onto an external backup site using FTP (yum install ftp) and install OpenCloud?

    Pretty sure that is nothing like what he wanted.

    Thanked by 1Lm85H4gFkh3wk3
  • I tried Symbolic link option but unable to execute it properly :(

  • Whats the output of 'fdisk -l'

  • edited January 2015

    It appears you have a single partition mounted as /. What I'd do is shrink your current / partition. Then create a new LVM volume on the same disk. Create a full size LVM volume on your new disk. Create a new volume group, assigning both physical volumes to it. Create a new logical volume in that volume group. Format it whatever filesystem you want. Edit /etc/fstab to mount the new combined LVM volume as /home

  • as far as I read your question, you'd like to extend your existing folder.

    aliasing, linking and such only gives you the additional space in a new (sub)-folder and don't add frameless into the existing one.

    you need to go with LVM.

    to do so, you probably should setup the second aka free hdd as LVM first, which means create physical disc, volume group and logical volume (there a lot of tutorials around the net)

    after that mount this lv to any mountpoint in your system and move everything from your old location onto this volume. ( so far the easy part, depending on your system ;-) )

    now you may have to shrink the partition on your first hdd to make room for another physical disc to join the lvm volume group.
    again seach for tutorials on this one, maybe tricky because it looks like the whole volume is mounted as / and you probably can only do operations like shrinking in some kind of network-boot or rescue-mode...

    after you have created another PV, you can add this to your volume group and logical volume. than extend the logical volume and filesystem on it to get the space combined.

    now mount it back to the directory where all the stuff belongs.

    that's only a sketch around what one could do about, and comes without warranties - if I forgot or did oversee anything, feel free to point out... ;-)

  • mobiboymobiboy Member
    edited January 2015

    Thanks @Falzo and @rajprakash, but i am a newbie to linux servers, i have seen lvm tutoriels on net but i fear that my previous uploaded data might get deleted in the process of trying by myself, and i cant take 3TB backup instantly, it will take few days, see u guys are polite and helpful, please can u give me step by step instruction so that i can successfully extend my existing folder with path /home/admin/public_html/files/ without any risk of loosing my data?

  • mobiboymobiboy Member
    edited January 2015

    In simple words, the files i upload to any xyz directory of new disk, it should be accessible from /home/admin/public_html/files/ this path.

  • I am for sure can offer some remote hands, but that's probably not within $7-LET range at all ;-)

    to clarify once more: lets say you put some data on your new disc like folder /foo and folde /bar ...
    does those folders have to appear as /home/admin/public_html/files/foo/ and /home/admin/public_html/files/bar/ or may it be possible to let them be like /home/admin/public_html/files/NEW/foo and /home/admin/public_html/files/NEW/bar ?

    if this is good to go, then partition your new drive, setup a filesystem on it, mkdir NEW in /home/admin/public_html/files/ and mount your fresh drive onto /home/admin/public_html/files/NEW
    (probably edit your /etc/fstab accordingly)

    no need for trouble with linking or aliasing as you need to mount your new filesystem somewhere anyhow...

  • Do you want to "switch" the used disk or do you want to "add" it?

    One (of different available) approach is to mount your 2nd disk, e.g. to /mnt/2nd_disk and to then symlink that to your current server doc path (like so -> ln -s /mnt/2nd_disk /home/admin/public_html/files/new_space)

Sign In or Register to comment.