LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   resize and add new software raid1 xfs partition (https://www.linuxquestions.org/questions/linux-newbie-8/resize-and-add-new-software-raid1-xfs-partition-767296/)

m0ntassar 11-06-2009 07:06 AM

resize and add new software raid1 xfs partition
 
I have a server with the following disk default setup:

Code:

server:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              950M  74M  828M  9% /
tmpfs                2.0G    0  2.0G  0% /lib/init/rw
tmpfs                2.0G    0  2.0G  0% /dev/shm
/dev/md5              4.7G  230M  4.5G  5% /usr
/dev/md6              4.7G  70M  4.6G  2% /var
/dev/md7              454G  4.6M  454G  1% /home
none                  2.0G    0  2.0G  0% /tmp

Since it is going to be mainly used as a LAMP web server , I'd like te edit partitions by decrasing the /home size to 150G and to creating 2 new partition : /var/www 150GB and /var/lib/mysql 150GB

My hosting provider provides a rescue system, I rebooted my server to the rescue system

Code:

rescue:~# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        123      987966  fd  Linux raid autodetect
/dev/sda2            124        367    1959930  82  Linux swap / Solaris
/dev/sda4            368      60801  485436105    5  Extended
/dev/sda5            368        976    4891761  fd  Linux raid autodetect
/dev/sda6            977        1585    4891761  fd  Linux raid autodetect
/dev/sda7            1586      60801  475652488+  fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        123      987966  fd  Linux raid autodetect
/dev/sdb2            124        367    1959930  82  Linux swap / Solaris
/dev/sdb4            368      60801  485436105    5  Extended
/dev/sdb5            368        976    4891761  fd  Linux raid autodetect
/dev/sdb6            977        1585    4891761  fd  Linux raid autodetect
/dev/sdb7            1586      60801  475652488+  fd  Linux raid autodetect

Disk /dev/md7: 487.0 GB, 487068073984 bytes
2 heads, 4 sectors/track, 118913104 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md7 doesn't contain a valid partition table

Disk /dev/md6: 5009 MB, 5009047552 bytes
2 heads, 4 sectors/track, 1222912 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md6 doesn't contain a valid partition table

Disk /dev/md5: 5009 MB, 5009047552 bytes
2 heads, 4 sectors/track, 1222912 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/md1: 1011 MB, 1011548160 bytes
2 heads, 4 sectors/track, 246960 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

All partitions are formatted to xfs
I tried to look for a How TO, but most available ressources available are about ext2 partitions
What steps should I follow to resize /home (/dev/md7) and to create the two new partitions


All times are GMT -5. The time now is 06:43 AM.