Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: aussierob on September 16, 2010, 05:38:03 AM
-
Hi forum,
I'm thinking this is a poor question, but it is born out of ignorance,
so advice would be appreciated (I have looked lots of places and am STILL ignorant!)
I installed SME8b5 with RAID1 on a pair of 1TB drives: all was easy [SME rocks].
The result of fdisk -l for both drives, df -k and /proc/mdstat are below.
My questions are
1. it seems that /dev/sda1 is 100MB so is that the filesystem /boot ?
2. this the other filesystem are a small part of /dev/sda2 ?
3. the other filesystems total 22GB, how do I
3a. make a new filesystem to use more (say 400GB for virtual machines)?
and 3b. enlarge an existing filesystem (other than make a new, mv data across and change mounts)?
So TIA to anyone with more knowledge than me and time to reply
Kind Regards Aussierob (downunder)
[root@central ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 121601 976655610 fd Linux raid autodetect
[root@central ~]# fdisk -l /dev/sda
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 121601 976655610 fd Linux raid autodetect
[root@central ~]# df -v
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/main-root 4062912 2314400 1538800 61% /
/dev/mapper/main-tmp 4062912 139464 3713736 4% /tmp
/dev/mapper/main-files 8125880 706052 7000400 10% /home/e-smith/files
/dev/mapper/main-var 4062912 239300 3613900 7% /var
/dev/md1 101018 12137 83665 13% /boot
tmpfs 2071240 0 2071240 0% /dev/shm
[root@central ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]
md2 : active raid1 sdb2[1] sda2[0]
976655488 blocks [2/2] [UU]
unused devices: <none>
-
Hi.
Looks like you've installed your server with sme multipart option. This option will create different LVM logical volume for the following partition: / /tmp /var and /home/e-smith/files. When using this option, all your disk is not used, in order to let the admin put place where he needs. Here are some quick steps to add unused space to /home/e-smith/files (it's an example, and is valid for the other partition as well):
First, you need to check the name of the LVM logical volume your file system is on:
[root@sme ~]# mount | grep '/home/e-smith/files'
/dev/mapper/main-files on /home/e-smith/files type ext3 (rw,usrquota,grpquota,acl)
Here, the FS is on /dev/mapper/main-files. Now, we need to see how much space is available in our LVM volume group (the volume group is main):
[root@sas ~]# vgdisplay main | egrep 'Free.*PE'
Free PE / Size 2248 / 70,25 GB
[root@sas ~]#
In this example, there's 70Go unallocated. So, lets add 50Go to /home/e-smith/files.
[root@sas ~]# lvextend -L+50G main/files
Now that the block device is extended, you also need to extend the file system. This can be done online using resize2fs (or ext2online on SME 7):
[root@sas ~]# resize2fs /home/e-smith/files
Now you can see that your FS is 50GB larger than before. And (thanks to LVM), everything has been done online, without any interruption.
Regards, Daniel
-
Thanks for the good summary, Daniel.
Yes I did install with 'sme multipart' (and sme raid=1 too) - sorry I omitted to mention that.
Please note: after completing, the filesystem was not larger, and on researching the resize2fs,
it seemed I needed to do one more command line
"resize2fs /dev/mapper/main-files"
- which after long wait for 800GB addition, looked the right result
(FYI the filesystem 'grows' incrementally during the process - df -v gives more space every use: this is my first try with LVM and its very good).
I presume this is a valid addition to your advice? if it is no reply is needed, but if I have done wrong I would appreciate knowing.
Thanks again for the good guidance
aussierob
-
Sorry, indeed, resize2fs requires the block device as argument. Only the old (deprecated in sme8) ext2online was also working with the mount point.
Regards, Daniel
-
Sorry, indeed, resize2fs requires the block device as argument
No problem - I am glad I figured it out, and just wanted to pass it back to help the next person.
Just one other thought is that /proc/mdstat still shows below (even after a reboot, in case that updates it)
and I would have expected the md1 blocks to increase
cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]
md2 : active raid1 sdb2[1] sda2[0]
976655488 blocks [2/2] [UU]
even now that df -v shows
df -v
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/main-root 4062912 2313352 1539848 61% /
/dev/mapper/main-tmp 4062912 139476 3713724 4% /tmp
/dev/mapper/main-files 820717408 76158412 702206768 10% /home/e-smith/files
/dev/mapper/main-var 4062912 240112 3613088 7% /var
/dev/md1 101018 12137 83665 13% /boot
tmpfs 2071240 0 2071240 0% /dev/shm
Thanks again for your help - as you can see I'm off and running with 76GB already in my ibay
-
Multipart install is for those that understand lvm and how to grow/split filesystems. If you don't understand how to use lvm and grow/shrink filesystems then you shouldn't be using multipart.
-
Just one other thought is that /proc/mdstat still shows below (even after a reboot, in case that updates it)
and I would have expected the md1 blocks to increase
Why would you expect that? You've done nothing to change it.
/dev/md1 is fixed size, and contains /boot. You don't need to change it.