How to add extra hard drive as apache webspace
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
1
down vote
favorite
I have searched for this in google with no clear response
I have a webserver that is using one hard drive
/dev/sda4 40%
and have a second hard drive at
/dev/sdb1 0%
How would I mount or add the second hard drive to use the extra disk space in my webpage? I want to use the two hard drives at the same time.
/var/www/vhosts/trexample.com
Can anyone point me to a guide to do this or is there a quick terminal shell command I just can copy paste in root?
mount hard-drive apache2
add a comment |Â
up vote
1
down vote
favorite
I have searched for this in google with no clear response
I have a webserver that is using one hard drive
/dev/sda4 40%
and have a second hard drive at
/dev/sdb1 0%
How would I mount or add the second hard drive to use the extra disk space in my webpage? I want to use the two hard drives at the same time.
/var/www/vhosts/trexample.com
Can anyone point me to a guide to do this or is there a quick terminal shell command I just can copy paste in root?
mount hard-drive apache2
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have searched for this in google with no clear response
I have a webserver that is using one hard drive
/dev/sda4 40%
and have a second hard drive at
/dev/sdb1 0%
How would I mount or add the second hard drive to use the extra disk space in my webpage? I want to use the two hard drives at the same time.
/var/www/vhosts/trexample.com
Can anyone point me to a guide to do this or is there a quick terminal shell command I just can copy paste in root?
mount hard-drive apache2
I have searched for this in google with no clear response
I have a webserver that is using one hard drive
/dev/sda4 40%
and have a second hard drive at
/dev/sdb1 0%
How would I mount or add the second hard drive to use the extra disk space in my webpage? I want to use the two hard drives at the same time.
/var/www/vhosts/trexample.com
Can anyone point me to a guide to do this or is there a quick terminal shell command I just can copy paste in root?
mount hard-drive apache2
edited Apr 20 at 22:00
Jason Aller
44358
44358
asked Apr 20 at 21:01
Gerag2
61
61
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
It looks like you need a way to span a single file system across multiple physical volumes. I'll outline two approaches below.
LVM
You can set up a logical volume (using LVM) based on sdb1
and maybe parts of what is now sda4
and mount it at /var/www/vhosts/trexample.com
.
To set up the logical volume using LVM see https://wiki.ubuntu.com/Lvm.
Format the logical volume with the desired file system.
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
Btrfs
Some file systems support multiple underlying volumes natively. Btrfs is one of them and available in Ubuntu out of the box.
Shrink
sda4
as needed and create a new partition in the newly freed space. Lets say the new partition issda6
.Format
sdb1
as a new, empty Btrfs file system and mount it:mkfs.btrfs /dev/sdb1
mkdir /mnt/trexample.com
mount -t btrfs /dev/sdb1 /mnt/trexample.comAdd the other volume(s) to the file systems:
btrfs device add /dev/sda6 /mnt/trexample.com
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of thebutton in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 21 at 9:25
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It looks like you need a way to span a single file system across multiple physical volumes. I'll outline two approaches below.
LVM
You can set up a logical volume (using LVM) based on sdb1
and maybe parts of what is now sda4
and mount it at /var/www/vhosts/trexample.com
.
To set up the logical volume using LVM see https://wiki.ubuntu.com/Lvm.
Format the logical volume with the desired file system.
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
Btrfs
Some file systems support multiple underlying volumes natively. Btrfs is one of them and available in Ubuntu out of the box.
Shrink
sda4
as needed and create a new partition in the newly freed space. Lets say the new partition issda6
.Format
sdb1
as a new, empty Btrfs file system and mount it:mkfs.btrfs /dev/sdb1
mkdir /mnt/trexample.com
mount -t btrfs /dev/sdb1 /mnt/trexample.comAdd the other volume(s) to the file systems:
btrfs device add /dev/sda6 /mnt/trexample.com
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of thebutton in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 21 at 9:25
add a comment |Â
up vote
0
down vote
It looks like you need a way to span a single file system across multiple physical volumes. I'll outline two approaches below.
LVM
You can set up a logical volume (using LVM) based on sdb1
and maybe parts of what is now sda4
and mount it at /var/www/vhosts/trexample.com
.
To set up the logical volume using LVM see https://wiki.ubuntu.com/Lvm.
Format the logical volume with the desired file system.
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
Btrfs
Some file systems support multiple underlying volumes natively. Btrfs is one of them and available in Ubuntu out of the box.
Shrink
sda4
as needed and create a new partition in the newly freed space. Lets say the new partition issda6
.Format
sdb1
as a new, empty Btrfs file system and mount it:mkfs.btrfs /dev/sdb1
mkdir /mnt/trexample.com
mount -t btrfs /dev/sdb1 /mnt/trexample.comAdd the other volume(s) to the file systems:
btrfs device add /dev/sda6 /mnt/trexample.com
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of thebutton in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 21 at 9:25
add a comment |Â
up vote
0
down vote
up vote
0
down vote
It looks like you need a way to span a single file system across multiple physical volumes. I'll outline two approaches below.
LVM
You can set up a logical volume (using LVM) based on sdb1
and maybe parts of what is now sda4
and mount it at /var/www/vhosts/trexample.com
.
To set up the logical volume using LVM see https://wiki.ubuntu.com/Lvm.
Format the logical volume with the desired file system.
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
Btrfs
Some file systems support multiple underlying volumes natively. Btrfs is one of them and available in Ubuntu out of the box.
Shrink
sda4
as needed and create a new partition in the newly freed space. Lets say the new partition issda6
.Format
sdb1
as a new, empty Btrfs file system and mount it:mkfs.btrfs /dev/sdb1
mkdir /mnt/trexample.com
mount -t btrfs /dev/sdb1 /mnt/trexample.comAdd the other volume(s) to the file systems:
btrfs device add /dev/sda6 /mnt/trexample.com
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
It looks like you need a way to span a single file system across multiple physical volumes. I'll outline two approaches below.
LVM
You can set up a logical volume (using LVM) based on sdb1
and maybe parts of what is now sda4
and mount it at /var/www/vhosts/trexample.com
.
To set up the logical volume using LVM see https://wiki.ubuntu.com/Lvm.
Format the logical volume with the desired file system.
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
Btrfs
Some file systems support multiple underlying volumes natively. Btrfs is one of them and available in Ubuntu out of the box.
Shrink
sda4
as needed and create a new partition in the newly freed space. Lets say the new partition issda6
.Format
sdb1
as a new, empty Btrfs file system and mount it:mkfs.btrfs /dev/sdb1
mkdir /mnt/trexample.com
mount -t btrfs /dev/sdb1 /mnt/trexample.comAdd the other volume(s) to the file systems:
btrfs device add /dev/sda6 /mnt/trexample.com
Move the existing data to the new file system.
To mount the volume at the desired location upon boot see https://help.ubuntu.com/community/Fstab.
answered Apr 20 at 22:45
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
26.1k1361106
26.1k1361106
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of thebutton in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 21 at 9:25
add a comment |Â
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of thebutton in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
â David Foerster
Apr 21 at 9:25
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
looks like my second hard drive /dev/sdb1 0% has stuff in it /dev/sdb1 2 816 556.64 MB 72.98 MB 2 673 388.23 MB 0% can I screw it up If I format it, can I just tell my Dedicated server hosts to do this or as someone who pays rent fo that server I am suposed to do this
â Gerag2
Apr 21 at 3:50
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of the
button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.â David Foerster
Apr 21 at 9:25
@Gerag2: Could you please edit your question when you want to add information? Especially file or program output listings (with the help of the
button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall itâÂÂs best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.â David Foerster
Apr 21 at 9:25
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026796%2fhow-to-add-extra-hard-drive-as-apache-webspace%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password