User Tools

Site Tools


добавление_диска_к_системе

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

добавление_диска_к_системе [2009/03/04 11:34]
val created
добавление_диска_к_системе [2013/05/22 13:50]
Line 1: Line 1:
-====== Добавление диска к системе ====== 
- 
-===== Получение информации о слайсах ===== 
-<​code>​ 
-[gX:~] # fdisk 
-******* Working on device /dev/ad0 ******* 
-parameters extracted from in-core disklabel are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-Figures below won't work with BIOS for partitions not in cyl 1 
-parameters to be used for BIOS calculations are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-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 10474317 (5114 Meg), flag 80 (active) 
-        beg: cyl 0/ head 1/ sector 1; 
-        end: cyl 1023/ head 3/ sector 63 
-The data for partition 2 is: 
-<​UNUSED>​ 
-The data for partition 3 is: 
-<​UNUSED>​ 
-The data for partition 4 is: 
-<​UNUSED>​ 
-</​code>​ 
- 
-===== Получение информации о разделах внутри слайса ===== 
-<​code>​ 
-[gX:~] # bsdlabel ad0s1 
-# /dev/ad0s1: 
-8 partitions: 
-#        size   ​offset ​   fstype ​  ​[fsize bsize bps/cpg] 
-  a:  1024000 ​       0    4.2BSD ​    2048 16384 64008  
-  b:  1024000 ​ 1024000 ​   4.2BSD ​    2048 16384 64008  
-  c: 10474317 ​       0    unused ​       0     ​0 ​        # "​raw"​ part, don't edit 
-  d:  6291456 ​ 2048000 ​   4.2BSD ​    2048 16384 28552  
-  e:  2134861 ​ 8339456 ​   4.2BSD ​    2048 16384 28552 
-</​code> ​ 
-===== Создание файла конфигурации описывающий слайс ===== 
-<​code>​ 
-[gX:~] # cat > addsliceconf 
-g c116301 h16 s63 
-p 2 165 10474381 40000000 
-a 1 
-</​code>​ 
- 
-===== Тестирование (-t) файла конфигурации ===== 
-<​code>​ 
-[gX:~] # fdisk -t -f addsliceconf /dev/ad0 
-******* Working on device /dev/ad0 ******* 
-fdisk: WARNING line 1: number of cylinders (116301) may be out-of-range 
-    (must be within 1-1024 for normal BIOS operation, unless the entire disk 
-    is dedicated to FreeBSD) 
-fdisk: WARNING: adjusting start offset of partition 2 
-    from 10474381 to 10474443, to fall on a head boundary 
-fdisk: WARNING: adjusting size of partition 2 from 40000000 to 39999141 
-    to end on a cylinder boundary 
-parameters extracted from in-core disklabel are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-Figures below won't work with BIOS for partitions not in cyl 1 
-parameters to be used for BIOS calculations are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-Information from DOS bootblock is: 
-1: sysid 165 (0xa5),​(FreeBSD/​NetBSD/​386BSD) 
-    start 63, size 10474317 (5114 Meg), flag 80 (active) 
-        beg: cyl 0/ head 1/ sector 1; 
-        end: cyl 1023/ head 3/ sector 63 
-2: sysid 165 (0xa5),​(FreeBSD/​NetBSD/​386BSD) 
-    start 10474443, size 39999141 (19530 Meg), flag 0 
-        beg: cyl 151/ head 5/ sector 1; 
-        end: cyl 920/ head 15/ sector 63 
-3: <​UNUSED>​ 
-4: <​UNUSED>​ 
-</​code>​ 
- 
-===== Внесение изменений ===== 
-<​code>​ 
-[gX:~] # fdisk -f addsliceconf /dev/ad0 
-******* Working on device /dev/ad0 ******* 
-fdisk: WARNING line 1: number of cylinders (116301) may be out-of-range 
-    (must be within 1-1024 for normal BIOS operation, unless the entire disk 
-    is dedicated to FreeBSD) 
-fdisk: WARNING: adjusting start offset of partition 2 
-    from 10474381 to 10474443, to fall on a head boundary 
-fdisk: WARNING: adjusting size of partition 2 from 40000000 to 39999141 
-    to end on a cylinder boundary 
-</​code>​ 
- 
-===== Проверка таблицы слайсов ===== 
-<​code>​ 
-[gX:~] # ls /​dev/​ad0s2 ​ 
-/dev/ad0s2 
- 
-[gX:~] # fdisk  /dev/ad0 
-******* Working on device /dev/ad0 ******* 
-parameters extracted from in-core disklabel are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-Figures below won't work with BIOS for partitions not in cyl 1 
-parameters to be used for BIOS calculations are: 
-cylinders=116301 heads=16 sectors/​track=63 (1008 blks/cyl) 
- 
-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 10474317 (5114 Meg), flag 80 (active) 
-        beg: cyl 0/ head 1/ sector 1; 
-        end: cyl 1023/ head 3/ sector 63 
-The data for partition 2 is: 
-sysid 165 (0xa5),​(FreeBSD/​NetBSD/​386BSD) 
-    start 10474443, size 39999141 (19530 Meg), flag 0 
-        beg: cyl 151/ head 5/ sector 1; 
-        end: cyl 920/ head 15/ sector 63 
-The data for partition 3 is: 
-<​UNUSED>​ 
-The data for partition 4 is: 
-<​UNUSED>​ 
-</​code>​ 
- 
-===== Создание одного раздела (-w - по умолчанию) внутри слайса ===== 
-<​code>​ 
-[gX:~] # bsdlabel ad0s2 
-bsdlabel: /dev/ad0s2: no valid label found 
- 
-[gX:~] # bsdlabel -w ad0s2 
- 
-[gX:~] # bsdlabel ad0s2 
-# /dev/ad0s2: 
-8 partitions: 
-#        size   ​offset ​   fstype ​  ​[fsize bsize bps/cpg] 
-  a: 39999125 ​      ​16 ​   unused ​       0     ​0 ​       
-  c: 39999141 ​       0    unused ​       0     ​0 ​        # "​raw"​ part, don't edit 
-</​code>​ 
- 
-===== Создание файловой системы в разделе ===== 
-<​code>​ 
-[gX:~] # newfs -b 8192 -f 1024 -O 2 -U ad0s2a 
-/​dev/​ad0s2а:​ 19530.8MB (39999140 sectors) block size 8192, fragment size 1024 
-        using 433 cylinder groups of 45.16MB, 5781 blks, 11584 inodes. 
-        with soft updates 
-super-block backups (for fsck -b #) at: 
- 144, 92640, 185136, 277632, 370128, 462624, 555120, 647616, 740112, 832608, 
- ​925104,​ 1017600, 1110096, 1202592, 1295088, 1387584, 1480080, 1572576, 
- ​1665072,​ 1757568, 1850064, 1942560, 2035056, 2127552, 2220048, 2312544, 
-... 
-</​code>​ 
- 
-===== Монтирование нового раздела ===== 
-<​code>​ 
-[gX:~] # mkdir /data 
-[gX:~] # mount /dev/ad0s2a /data 
- 
-[gX:~] # cat >> /etc/fstab 
-/​dev/​ad0s2a ​            /​data ​          ​ufs ​    ​rw ​             1       1 
-</​code>​ 
  
добавление_диска_к_системе.txt · Last modified: 2013/05/22 13:50 (external edit)