**Partition preparation [#ve6ea56d]

- fdisk: Linux file system 
 [root@flex scsi]# tcsh
 [rsaito@flex scsi]$ setenv LANG C
 [rsaito@flex scsi]$ fdisk /dev/sdf
 Device contains neither a valid DOS partition table, nor Sun, 
 SGI or OSF  disklabel
 Building a new DOS disklabel. Changes will remain in memory only,
 until you decide to write them. After that, of course, the previous
 content won't be recoverable.
- Message above means partition did not exist yet, so we can continue
 The number of cylinders for this disk is set to 121601.
 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)
 Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
- n = create new partion, and we chose p = primary, no. 1
 Command (m for help): n
 Command action
   e   extended
   p   primary partition (1-4)
 p
 Partition number (1-4): 1
 First cylinder (1-121601, default 1):
 Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-121601, default 121601):
 Using default value 121601
- m to look up more options
 Command (m for help): m
 Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
- let's choose "p" first
 Command (m for help): p
 
 Disk /dev/sdf: 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/sdf1               1      121601   976760001   83  Linux
- then "w"
 Command (m for help): w
 The partition table has been altered!
 
 Calling ioctl() to re-read partition table.
 Syncing disks.

**Partition format [#fe33ed86]
- "mke2fs" and "-j" option for ext3
 [rsaito@flex scsi]$ mke2fs -j /dev/sdf
 mke2fs 1.35 (28-Feb-2004)
 /dev/sdf is entire device, not just one partition!
 Proceed anyway? (y,n) y
 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 122109952 inodes, 244190646 blocks
 12209532 blocks (5.00%) reserved for the super user
 First data block=0
 Maximum filesystem blocks=247463936
 7453 block groups
 32768 blocks per group, 32768 fragments per group
 16384 inodes per group
 Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848
- inode table
 Writing inode tables: 3783/7453
 Writing inode tables: done
 Creating journal (8192 blocks): done
 Writing superblocks and filesystem accounting information: done
 This filesystem will be automatically checked every 29 mounts or
 180 days, whichever comes first.  Use tune2fs -c or -i to override.

**Mount and unmount filesystem [#pa78aaff]
- Go to /mnt and /mkdir, then mount
 [rsaito@flex scsi]$ cd /mnt
 [rsaito@flex /mnt]$ ls
 cdrom  fd  home  home2  root  rsaito-old  samba  sata1  www
 [rsaito@flex /mnt]$ mkdir sata2
 [rsaito@flex /mnt]$ mount /dev/sdf /mnt/sata2
 [rsaito@flex /mnt]$ df
 Filesystem           1K-blocks      Used Available Use% Mounted on
 /dev/mapper/VG-LVroot
                       20642428   6770492  12823488  35% /
 /dev/md0                101018     77539     18263  81% /boot
 none                   2037136         0   2037136   0% /dev/shm
 /dev/mapper/VG-LVrsaito
                       30963708  12565892  16824952  43% /rsaito
 /dev/mapper/VG-LVhome
                      216745980 201390404   4345528  98% /home
 /dev/mapper/VG-LVwww  20642428   5947524  13646328  31% /www
 172.17.4.129:/pmphdd1
                      480719072 161512480 294787392  36% /pmphdd
 /dev/mapper/VG-LVsamba
                       20642428  11212352   8381500  58% /samba
 172.17.4.134:/home1  236347936 201413376  22928784  90% /misc/home1
 /dev/sdf             961434656    110656 912485872   1% /mnt/sata2

- Unmount:
 [rsaito@flex /mnt]$ umount /mnt/sata2
 [rsaito@flex /mnt]$ df
 Filesystem           1K-blocks      Used Available Use% Mounted on
 /dev/mapper/VG-LVroot
                       20642428   6770492  12823488  35% /
 /dev/md0                101018     77539     18263  81% /boot
 none                   2037136         0   2037136   0% /dev/shm
 /dev/mapper/VG-LVrsaito
                       30963708  12565892  16824952  43% /rsaito
 /dev/mapper/VG-LVhome
                      216745980 201390404   4345528  98% /home
 /dev/mapper/VG-LVwww  20642428   5947524  13646328  31% /www
 172.17.4.129:/pmphdd1
                      480719072 161512480 294787392  36% /pmphdd
 /dev/mapper/VG-LVsamba
                       20642428  11212352   8381500  58% /samba
 172.17.4.134:/home1  236347936 201413376  22928784  90% /misc/home1



Front page   New Page list Search Recent changes   Help   RSS of recent changes