Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: thejay on February 28, 2007, 11:09:12 AM
-
My HD is full and i want extend the partition /dev/mapper/mainroot, i have free space in the HD.
Can you help me with this?
see my drive:
"[root@servidor ~]# df
S.ficheros Bloques de 1K Usado Dispon Uso% Montado en
/dev/mapper/main-root
2322240 2322240 0 100% /
/dev/md1 101018 25268 70534 27% /boot
none 257248 0 257248 0% /dev/shm
[root@servidor ~]#"
PD: sorry for my english.
-
thejay,
The 75mb that you have free is on /dev/md1 (/boot) and is required for normal system operation. Besides that it would be hardly worth stuffing around with to gain an extra 75MB of disk space. Why dont you just grab a new drive and replace the old drive? You can find instructions to replace the hard disk here: http://smeserver.sourceforge.net/sme7/tech/Chapter8#h1137-6
Regards, Lloyd
-
No, no, i have 13 Gigabytes unformat free space in the same disk.
-
What is the output of:
#fdisk /dev/hdx
Lloyd
-
number of cylinders for this drive is 2434
Is not wrong, but is > than 1024, and sometimes could cause problems with:
1/ software which works in the start (eg. old versions of lilo)
2/ boot software or partitioning of others SO ( eg. FDISK of DOS, FDISK of OS/2)
..
..
..
Order (m for help):
--------------------------------------------------------
Another outputs
--------------------------------------------------------
login as: root
root@192.168.1.4's password:
Last login: Wed Feb 28 10:05:57 2007 from 192.168.1.6
[root@servidor ~]# df
S.ficheros Bloques de 1K Usado Dispon Uso% Montado en
/dev/mapper/main-root
2322240 2322240 0 100% /
/dev/md1 101018 25268 70534 27% /boot
none 257248 0 257248 0% /dev/shm
[root@servidor ~]#
---------------------------------------------------------------------
login as: root
root@192.168.1.4's password:
Last login: Wed Feb 28 10:50:46 2007 from 192.168.1.6
[root@servidor ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hdc2[0]
3060288 blocks [2/1] [U_]
md1 : active raid1 hdc1[0]
104320 blocks [2/1] [U_]
unused devices: <none>
[root@servidor ~]#
-------------------------------------------------------------------------
login as: root
root@192.168.1.4's password:
Last login: Wed Feb 28 11:09:32 2007 from 192.168.1.6
[root@servidor ~]# vi /etc/mdadm.conf
# mdadm.conf written out by anaconda
DEVICE partitions
MAILADDR root
ARRAY /dev/md2 super-minor=2
ARRAY /dev/md1 super-minor=1
------------------------------------------------------------------------
login as: root
root@192.168.1.4's password:
Last login: Wed Feb 28 11:28:44 2007 from 192.168.1.6
[root@servidor ~]# pvdisplay
--- Physical volume ---
PV Name /dev/md2
VG Name main
PV Size 2,91 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 93
Free PE 1
Allocated PE 92
PV UUID CvfpHA-t1OV-EHf2-kri0-FQUY-HumO-iwb2AQ
[root@servidor ~]# vgdisplay
--- Volume group ---
VG Name main
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 2,91 GB
PE Size 32,00 MB
Total PE 93
Alloc PE / Size 92 / 2,88 GB
Free PE / Size 1 / 32,00 MB
VG UUID FAbg6s-ax1v-Rsv9-u2Z1-MXrR-iMf1-kO7YTH
[root@servidor ~]# lvdisplay
--- Logical volume ---
LV Name /dev/main/root
VG Name main
LV UUID g6Yoko-1oIa-DOW3-XCaC-RcPM-lLTT-LdDpqv
LV Write Access read/write
LV Status available
# open 1
LV Size 2,25 GB
Current LE 72
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/main/swap
VG Name main
LV UUID e5g4GC-3TO7-dLlY-zWDC-3O0r-6q4E-24TZa3
LV Write Access read/write
LV Status available
# open 1
LV Size 640,00 MB
Current LE 20
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
[root@servidor ~]# umount /dev/main/root
umount: /: dispositivo ocupado
umount: /: dispositivo ocupado
[root@servidor ~]# lvextend -L+5G /dev/main/root
Extending logical volume root to 7,25 GB
Insufficient suitable allocatable extents for logical volume root: 159 more
required
[root@servidor ~]#
-----------------------------------------------------------------
-
I need the output of:
fdisk -l /dev/hdc
there were no values for fdisk in the previous post.
Lloyd
-
login as: root
root@192.168.1.4's password:
Last login: Wed Feb 28 13:49:04 2007 from 192.168.1.6
[root@servidor ~]# fdisk -l /dev/hdc
Disco /dev/hdc: 20.0 GB, 20020396032 bytes
255 cabezas, 63 sectores/pista, 2434 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes
Disposit. Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 fd Linux raid autodetect
/dev/hdc2 14 394 3060382+ fd Linux raid autodetect
[root@servidor ~]#
-
BTW, why is your disk attached to the secondary controller (hdc)??. It should really be connected as the master on the primary ide controller (hda). Anyway:
MAKE SURE YOU HAVE A BACKUP BEFORE TRYING THIS!!
repartition /dev/hdc2
#fdisk /dev/hdc
The number of cylinders for this disk is set to 2434.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (14-2434, default 14):
Using default value 14
Last cylinder or +size or +sizeM or +sizeK (14-2434, default 2434):
Using default value 2434
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): fd
Changed system type of partition 2 to fd (Linux raid autodetect)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
boot into rescue mode and recreate the superblock
#mdadm --create /dev/md2 --level 1 --raid-devices=2 /dev/hdc2 missing
reboot into smeserver
mdadm --grow /dev/md2 --size=max (maybe this isnt required, but it wont hurt)
pvresize /dev/md2
lvresize -l +$(vgdisplay -c main | cut -d: -f16) main/root
ext2online -C0 /dev/main/root
Most of this was taken from:
http://forums.contribs.org/index.php?topic=34413.0
and
http://smeserver.sourceforge.net/sme7/tech/Chapter8#h1137-6
Lloyd
-
Thanks a lot for your help.
With this operation, can i conserve all data?
-
With this operation, can i conserve all data?
You shouldn't lose any data using this procedure, but if you've been around computers for a while - you'll know that things can and do go wrong at times and as such you should always have a backup prior to attempting anyhting like this.
Lloyd