Help me to create /backup directory on second drive

zontrakulla

Active Member
Jan 16, 2008
39
0
56
Hello,

Code:
# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00098581

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1306    10485760   fd  Linux raid autodetect
/dev/sda2            1306      121536   965746688   fd  Linux raid autodetect
/dev/sda3          121536      121601      525312   82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006b600

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1306    10485760   fd  Linux raid autodetect
/dev/sdb2            1306      121536   965746688   fd  Linux raid autodetect
/dev/sdb3          121536      121601      525312   82  Linux swap / Solaris
/dev/sdb4          121601      121601         224+  83  Linux

Disk /dev/md2: 988.9 GB, 988924542976 bytes
2 heads, 4 sectors/track, 241436656 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/md1: 10.7 GB, 10737352704 bytes
2 heads, 4 sectors/track, 2621424 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Code:
/dev/md1        /       ext4    errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0      0       1
/dev/md2        /home   ext4    usrjquota=quota.user,jqfmt=vfsv0        0       2
/dev/sda3       none    swap    defaults        0       0
/dev/sdb3       none    swap    defaults        0       0
proc            /proc   proc    defaults                0       0
sysfs           /sys    sysfs   defaults                0       0
tmpfs           /dev/shm        tmpfs   defaults        0       0
devpts          /dev/pts        devpts  defaults        0       0
Code:
df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                9.8G  4.0G  5.4G  43% /
/dev/root             9.8G  4.0G  5.4G  43% /
devtmpfs              3.9G  416K  3.9G   1% /dev
/dev/md2              907G  538M  860G   1% /home
tmpfs                 3.9G     0  3.9G   0% /dev/shm
/dev/loop0            485M   11M  449M   3% /tmp
/dev/loop0            485M   11M  449M   3% /var/tmp
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/etc/named
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/etc/named.rfc1912.zones
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/etc/rndc.key
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/usr/lib64/bind
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/etc/named.iscdlv.key
/dev/root             9.8G  4.0G  5.4G  43% /var/named/chroot/etc/named.root.key
As i can see i'm using the first 1tb storage, i just want to make the other 1tb space empty and mount as a /backup directory
 
Last edited:

zontrakulla

Active Member
Jan 16, 2008
39
0
56
Code:
md1 : active raid1 sda1[0] sdb1[1]
      10485696 blocks [2/2] [UU]

md2 : active raid1 sda2[0] sdb2[1]
      965746624 blocks [2/2] [UU]

unused devices: <none>
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello,

As per the provided information, I can see you have attached 2x1TB HDD to your server and setup raid1 while installing your server OS and due to raid1 setup you can use only 1TB disk for data storage, You have created 2 partition /dev/md2:-988.9GB and /dev/md1:-10.7GB and there is no free space which you can mount it for that backup


Disk /dev/md2: 988.9 GB, 988924542976 bytes
2 heads, 4 sectors/track, 241436656 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/md1: 10.7 GB, 10737352704 bytes
2 heads, 4 sectors/track, 2621424 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Here are the Raid levels tutorial with Diagrams : RAID 0, RAID 1, RAID 5, RAID 10 Explained with Diagrams
 

zontrakulla

Active Member
Jan 16, 2008
39
0
56
That means i need to reinstall the server and use RAID 0 ?

Can i just format my second disk and mount it that way? Or Simply change RAID 1 to RAID 0 without formatting and then deleting all data on second drive?
 
Last edited:

acenetgeorge

Well-Known Member
PartnerNOC
Mar 6, 2008
68
4
58
Southfield, MI
cPanel Access Level
DataCenter Provider
For a backup drive, you probably do not need it in a RAID array. Just add it to the server, and see if you can partition and mount it as /backup. Should be able to do that with software raid.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Another solution is to keep your existing setup and consider backing up your accounts to a remote destination if that's an option for you.

Thank you.