extra disk

ola

Verified User
Joined
Aug 28, 2014
Messages
16
Hi,

im running DA on centos 6.5.
i have succesfully mounted an extra disk.
My first disk is a ssd and i want to use that for home
i want to use this extra disk for storing files which can be downloaded from existing websites on /home.

is this possible ?
how to do this?

Regards.
O
 
Please check http://help.directadmin.com/item.php?id=451. However, if you would like to do that for specific folders in public_html only, a simple symlink would do the trick :)

thanks for your reply.

i dont want new sites to be on the new disk
i want all sites on my ssd and i want files for download on the new disk.

step 1 is a bit confusing
i can do this for the current home (/) without errors.
but as soon as i do i for the new drive /data
i get this:

http://screencast.com/t/MftkSycAVSRz


Step 2 is done

step 3 not sure. i dont want new sites on /data

step 4 ? i dont want a new home
 
It appears you've mounted your drive as /mnt/data and yet you're trying to access it as /data.

If you want to access it as data then you should unmount it, change /etc/fstab to mount it as /data, and then remount it.

Jeff
 
thanks all.

but i really dont know how to do this, im a nono with centos.

in etc/fstab i dont see anything related to mnt/data or /data

when i mount /dev/vdb/ to /home/username/domains/domain.com/files/
i see files with DA and ftp but i can't write anything to it because its permitted..
mount with -w doesnt make a diiference
chmod doesnt work either

all i want is an extra disk

any ideas?
regards
O
 
chown -R username:username /home/username/domains/domain.com/files/

Thanks!

that is working.

one more question.
the new drive is now available from websitye xxx
can i mount the same drive also to other websites on same server?

same procedure?
 
can i mount the same drive also to other websites on same server?

Yes.

same procedure?

NO, unless you want to share the directory content.


If you want different content, then you should

1. Move content of /home/username/domains/domain.com/files/ to /home/username/domains/domain.com/files.moved
2. Umount /home/username/domains/domain.com/files/
3. Mount /dev/vdb as /home/vdb
4. Create directories:

Code:
mkdir /home/vdb/username1
mkdir /home/vdb/username2
mkdir /home/vdb/username3
mkdir /home/vdb/usernameN

Code:
chmod 710 /home/vdb/username1
chmod 710 /home/vdb/username2
chmod 710 /home/vdb/username3
chmod 710 /home/vdb/usernameN

Code:
chown username1:username1 /home/vdb/username1
chown username2:username2 /home/vdb/username2
chown username3:username3 /home/vdb/username3
chown usernameN:usernameN /home/vdb/usernameN

for all users which you want to allow files on it.

5. mount directories with mount --bind to homedirs:

Code:
mount --bind /home/vdb/username1 /home/username1/domains/domain.com/files
mount --bind /home/vdb/username2 /home/username2/domains/domain.com/files
mount --bind /home/vdb/username3 /home/username3/domains/domain.com/files
mount --bind /home/vdb/usernameN /home/usernameN/domains/domain.com/files

Code:
chown username1:username1 /home/username1/domains/domain.com/files
chown username2:username2 /home/username2/domains/domain.com/files
chown username3:username3 /home/username3/domains/domain.com/files
chown usernameN:usernameN /home/usernameN/domains/domain.com/files

6. update /etc/fstab to keep changes

7. More actions are required if you need system disk quotas on /dev/vdb enabled.
 
perfect! thanks again.

after unmounting and remount i get this:

# mount: mount point /home/vdb does not exist
bash: mount:: command not found

i created a directory /home/dvb
and after that i was able to mount /dev/vdb /home/dvb

is that correct?

regards
 
Last edited by a moderator:
i created a directory /home/dvb
and after that i was able to mount /dev/vdb /home/dvb

is that correct?


Yes, that's correct.

Now you need to add:

Code:
/dev/vdb /home/vdb ext4 defaults,usrquota,grpquota,errors=continue 1 1

and for every user a line of the following kind:

Code:
/home/vdb/username1   /home/username1/domains/domain.com/files   none    defaults,usrquota,grpquota,bind   0 0

into /etc/fstab
 
Last edited:
Yes, that's correct.

Now you need to add:

Code:
/dev/vdb /home/dvb ext4 defaults,usrquota,grpquota,errors=continue 1 1

and for every user a line of the following kind:

Code:
/home/vdb/username1   /home/username1/domains/domain.com/files   none    defaults,usrquota,grpquota   0 0

into /etc/fstab


Many thanks for all the help!
 
Typo fixed, that should be (bind option was missing):

Code:
/home/vdb/username1   /home/username1/domains/domain.com/files   none    defaults,usrquota,grpquota,bind   0 0
 
Typo fixed, that should be (bind option was missing):

Code:
/home/vdb/username1   /home/username1/domains/domain.com/files   none    defaults,usrquota,grpquota,bind   0 0

hi,

all is working fine untill i reboot my server, the mount to vdb is then lost.

this is my fstab.
Do i need to add some lines?

#
# /etc/fstab
# Created by anaconda on Tue Jan 3 23:26:00 2012
#
# 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
#
/dev/mapper/vg_server-lv_root / ext4 defaults,usrquota,grpquota,errors=continue 1 1
UUID=c326a8c4-738b-408d-bd0b-5ea9150f53b1 /boot ext4 defaults,errors=continue 1 2
/dev/mapper/vg_server-lv_swap 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
/dev/vdb /home/dvb ext4 defaults,usrquota,grpquota,errors=continue 1 1
/home/vdb/username1 /home/username1/domains/domain.com/files none defaults,usrquota,grpquota,bind 0 0
/home/vdb/username2 /home/username2/domains/domain.com/files none defaults,usrquota,grpquota,bind 0 0

"/etc/fstab" 19L, 863C


* username and domains are replaced by correct settings

Regards,
O
 
you've got a typo there:

Code:
/dev/vdb /home/dvb ext4 defaults,usrquota,grpquota,errors=continue 1 1

/home/dvb
 
If you want those partitions be accessable via a web-server, you need to mount them to
/home/username1/domains/domain.com/public_html/files
 
Back
Top