Resize 2 partitions with raid

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a Debian 7 server (this one https://documentation.online.net/fr/dedicated-server/offers/2015/server-dedibox-lt-2015).



I know enough on how to manage it, but i don't know much about linux system.



I just want to resize my partitions because my main partition is getting small (i want to take space from /data and give it to /).



The server is partitioned like so and has raid1.



sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sda2 8:2 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sda3 8:3 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sda4 8:4 0 86.8G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sdb2 8:18 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sdb3 8:19 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sdb4 8:20 0 86.8G 0 part [SWAP]


I know there are tutorials for resizing partitions but i'm just afraid to follow them because of the raid (btw, mdadm is installed on the system)



So my questions are :



  • Can i follow this tutorial : https://www.youtube.com/watch?v=4QorHRG_04A (and maybe debian will auto manage the partition on my "copy" on the raid).


  • Or do you have any advices/ressources in order to achieve what i need to do.


Thanks a lot (i know it's kinda basic)







share|improve this question












migrated from serverfault.com Jan 8 at 19:33


This question came from our site for system and network administrators.














  • Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
    – kasperd
    Jan 6 at 0:05










  • This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
    – Stéphane Molano
    Jan 7 at 7:15










  • Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
    – kasperd
    Jan 7 at 11:21










  • You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
    – kasperd
    Jan 7 at 11:24










  • Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
    – Stéphane Molano
    Jan 7 at 16:21














up vote
0
down vote

favorite












I have a Debian 7 server (this one https://documentation.online.net/fr/dedicated-server/offers/2015/server-dedibox-lt-2015).



I know enough on how to manage it, but i don't know much about linux system.



I just want to resize my partitions because my main partition is getting small (i want to take space from /data and give it to /).



The server is partitioned like so and has raid1.



sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sda2 8:2 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sda3 8:3 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sda4 8:4 0 86.8G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sdb2 8:18 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sdb3 8:19 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sdb4 8:20 0 86.8G 0 part [SWAP]


I know there are tutorials for resizing partitions but i'm just afraid to follow them because of the raid (btw, mdadm is installed on the system)



So my questions are :



  • Can i follow this tutorial : https://www.youtube.com/watch?v=4QorHRG_04A (and maybe debian will auto manage the partition on my "copy" on the raid).


  • Or do you have any advices/ressources in order to achieve what i need to do.


Thanks a lot (i know it's kinda basic)







share|improve this question












migrated from serverfault.com Jan 8 at 19:33


This question came from our site for system and network administrators.














  • Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
    – kasperd
    Jan 6 at 0:05










  • This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
    – Stéphane Molano
    Jan 7 at 7:15










  • Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
    – kasperd
    Jan 7 at 11:21










  • You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
    – kasperd
    Jan 7 at 11:24










  • Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
    – Stéphane Molano
    Jan 7 at 16:21












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a Debian 7 server (this one https://documentation.online.net/fr/dedicated-server/offers/2015/server-dedibox-lt-2015).



I know enough on how to manage it, but i don't know much about linux system.



I just want to resize my partitions because my main partition is getting small (i want to take space from /data and give it to /).



The server is partitioned like so and has raid1.



sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sda2 8:2 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sda3 8:3 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sda4 8:4 0 86.8G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sdb2 8:18 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sdb3 8:19 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sdb4 8:20 0 86.8G 0 part [SWAP]


I know there are tutorials for resizing partitions but i'm just afraid to follow them because of the raid (btw, mdadm is installed on the system)



So my questions are :



  • Can i follow this tutorial : https://www.youtube.com/watch?v=4QorHRG_04A (and maybe debian will auto manage the partition on my "copy" on the raid).


  • Or do you have any advices/ressources in order to achieve what i need to do.


Thanks a lot (i know it's kinda basic)







share|improve this question












I have a Debian 7 server (this one https://documentation.online.net/fr/dedicated-server/offers/2015/server-dedibox-lt-2015).



I know enough on how to manage it, but i don't know much about linux system.



I just want to resize my partitions because my main partition is getting small (i want to take space from /data and give it to /).



The server is partitioned like so and has raid1.



sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sda2 8:2 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sda3 8:3 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sda4 8:4 0 86.8G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 285M 0 part
│ └─md0 9:0 0 284.7M 0 raid1 /boot
├─sdb2 8:18 0 18.6G 0 part
│ └─md1 9:1 0 18.6G 0 raid1 /
├─sdb3 8:19 0 1.7T 0 part
│ └─md2 9:2 0 1.7T 0 raid1 /data
└─sdb4 8:20 0 86.8G 0 part [SWAP]


I know there are tutorials for resizing partitions but i'm just afraid to follow them because of the raid (btw, mdadm is installed on the system)



So my questions are :



  • Can i follow this tutorial : https://www.youtube.com/watch?v=4QorHRG_04A (and maybe debian will auto manage the partition on my "copy" on the raid).


  • Or do you have any advices/ressources in order to achieve what i need to do.


Thanks a lot (i know it's kinda basic)









share|improve this question











share|improve this question




share|improve this question










asked Jan 4 at 15:28









Stéphane Molano

6




6




migrated from serverfault.com Jan 8 at 19:33


This question came from our site for system and network administrators.






migrated from serverfault.com Jan 8 at 19:33


This question came from our site for system and network administrators.













  • Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
    – kasperd
    Jan 6 at 0:05










  • This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
    – Stéphane Molano
    Jan 7 at 7:15










  • Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
    – kasperd
    Jan 7 at 11:21










  • You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
    – kasperd
    Jan 7 at 11:24










  • Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
    – Stéphane Molano
    Jan 7 at 16:21
















  • Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
    – kasperd
    Jan 6 at 0:05










  • This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
    – Stéphane Molano
    Jan 7 at 7:15










  • Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
    – kasperd
    Jan 7 at 11:21










  • You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
    – kasperd
    Jan 7 at 11:24










  • Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
    – Stéphane Molano
    Jan 7 at 16:21















Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
– kasperd
Jan 6 at 0:05




Do you need 86GB of swap? It may be easier to create a new RAID1 out of the two swap partitions and copy your / file system there. Once done you could repurpose the 18GB partitions as swap.
– kasperd
Jan 6 at 0:05












This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
– Stéphane Molano
Jan 7 at 7:15




This is a production server and i would like something simple because i don't know much about swap manipulation (even resizing partitions scares me). This is the way the server was configured when they ordered it. But i don't know why they have 2 storage partition : 1 for the system (where i've put vestacp) of 18.G and another of 1.7T for data storage (in wich i have owncloud data stored). So i need to make it simple : reduce /data and reallocate it to the main partition (/) Thanks for you time
– Stéphane Molano
Jan 7 at 7:15












Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
– kasperd
Jan 7 at 11:21




Resizing file systems is also a risky maneuver. And no matter how the partitions are laid out on disk you will have to move the start point of one of the partitions in order to use space freed by shrinking one partition to grow another partition. Changing the start point of a partition is a more tricky situation than just resizing and more risky. That's why I was suggesting a possibility that did not involve any partition resizing. There is another even simpler solution but this comment field is too small to contain it.
– kasperd
Jan 7 at 11:21












You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
– kasperd
Jan 7 at 11:24




You could find a large directory on your / file system and move it to the /data partition. Then setup a bind mount to have it accessible through the original paths. Not all directories on the / file system are possible candidates for moving. But if you include the output of du -x / | sort -n | tail in your question then we can probably find a good option.
– kasperd
Jan 7 at 11:24












Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
– Stéphane Molano
Jan 7 at 16:21




Indeed it seems complicated. However your solution of binding a directory (like the wp-content/uploads) could be the solutions to my problems =)
– Stéphane Molano
Jan 7 at 16:21















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f415656%2fresize-2-partitions-with-raid%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f415656%2fresize-2-partitions-with-raid%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay