Возникла проблема - на большом рейд 5 массиве закончилось свободное место, забэкапить куда-либо 1.5ТБ данных не предоставилось возможности.
Внимательно посмотрев на рейд контроллер удалось установить что он умеет в рабочий массив добавлять диски .
Код: Выделить всё
ftp# dmesg | grep da0
da0 at shasta0 bus 0 target 0 lun 0
da0: <Promise 7 Disk RAID5 1.10> Fixed Direct Access SCSI-2 device
da0: 1831087MB (3750067968 512 byte sectors: 255H 63S/T 233430C)
Код: Выделить всё
ftp# dmesg | grep shasta0
shasta0: <Promise Technology SuperTrak EX Series> mem 0xf68ff000-0xf68fffff irq 16 at device 14.0 on pci3
shasta0: [GIANT-LOCKED]
da0 at shasta0 bus 0 target 0 lun 0
Для наглядности sysinstall --> fdisk смотрим:
Код: Выделить всё
Disk name: da0 FDISK Partition Editor
DISK Geometry: 233430 cyls/255 heads/63 sectors = 3750052950 sectors (1831080MB)
Offset Size(ST) End Name PType Desc Subtype Flags
0 63 62 - 12 unused 0
63 3125044125 3125044187 da0s1 8 freebsd 165
3125044188 625023780 3750067967 - 12 unused 0
The following commands are supported (in upper or lower case):
A = Use Entire Disk G = set Drive Geometry C = Create Slice F = `DD' mode
D = Delete Slice Z = Toggle Size Units S = Set Bootable | = Wizard m.
T = Change Type U = Undo All Changes W = Write Changes
Use F1 or ? to get more help, arrow keys to select.
Нужно отмонтировать все разделы с данного жеского диска и проверить их на ошибки fsck.
Дальше fdisk`om поправляем размер как видит его в система.
Код: Выделить всё
ftp# fdisk -u /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=233430 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=233430 heads=255 sectors/track=63 (16065 blks/cyl)
Do you want to change our idea of what BIOS thinks ? [n]
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 3125044125 (1525900 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 989/ head 0/ sector 63
Do you want to change it? [n] y
Supply a decimal value for "sysid (165=FreeBSD)" [165]
Supply a decimal value for "start" [63]
Supply a decimal value for "size" [-1169923171] 3750067967
fdisk: WARNING: partition does not end on a cylinder boundary
fdisk: WARNING: this may confuse the BIOS or some operating systems
Correct this automatically? [n] y
fdisk: WARNING: adjusting size of partition to 3750052887
Explicitly specify beg/end address ? [n]
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 3750052887 (1831080 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 981/ head 254/ sector 63
Are we happy with this entry? [n] y
The data for partition 2 is:
<UNUSED>
Do you want to change it? [n]
The data for partition 3 is:
<UNUSED>
Do you want to change it? [n]
The data for partition 4 is:
<UNUSED>
Do you want to change it? [n]
Partition 1 is marked active
Do you want to change the active partition? [n]
We haven't changed the partition table yet. This is your last chance.
parameters extracted from in-core disklabel are:
cylinders=233430 heads=255 sectors/track=63 (16065 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=233430 heads=255 sectors/track=63 (16065 blks/cyl)
Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 3750052887 (1831080 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 981/ head 254/ sector 63
2: <UNUSED>
3: <UNUSED>
4: <UNUSED>
Should we write new partition table? [n] y
fdisk: Geom not found
Код: Выделить всё
ftp# fdisk -s /dev/da0
/dev/da0: 233430 cyl 255 hd 63 sec
Part Start Size Type Flags
1: 63 3750052887 0xa5 0x80
Код: Выделить всё
ftp# bsdlabel -e /dev/da0s1
# /dev/da0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 3750052887 0 unused 0 0 # "raw" part, don't edit
d: 3750052887 0 4.2BSD 2048 16384 28552
Код: Выделить всё
ftp# growfs -y /dev/da0s1d
new file systemsize is: 937513221 frags
Warning: 81556 sector(s) cannot be allocated.
growfs: 1831040.7MB (3749971328 sectors) block size 16384, fragment size 2048
using 9964 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
with soft updates
super-block backups (for fsck -b #) at:
-1170116480, -1169740128, -1169363776,
----------------------------------------
Тут куча мусора про измененные сектора.
Ждем пока все пробежит и потом ещё достаточно долгое время в тишине, но не паникуйте, growfs работает, просто молчит.
----------------------------------------
и можем смело монтировать.