Fdisk add partition caused by Linux error:22:invalid argument

Source: Internet
Author: User

[Email protected] ~]# echo "---" >/sys/class/scsi_host/host0/scan
[Email protected] ~]# fdisk-l
disk/dev/sda:584.6 GB, 584646328320 bytes
255 heads, Sectors/track, 71079 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 19441 156151808 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 19441 44937 204796672-up Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 44937 57685 102398336-up Linux
Partition 3 does not end on cylinder boundary.
/DEV/SDA4 57685 71080 107595584 5 Extended
Partition 4 does not end on cylinder boundary.
/dev/sda5 57685 70433 102398336-up Linux
/dev/sda6 70433 70949 4144768, Linux swap
/DEV/SDA7 70949 71080 1052288-up Linux
disk/dev/sdb:146.1 GB, 146156158976 bytes
2 heads, Sectors/track, 5947109 cylinders
Units = cylinders of * = 24576 bytes
Device Boot Start End Blocks Id System
/DEV/SDB1 3 5947064 142729472 Linux
disk/dev/sdc:107.3 GB, 107374182400 bytes
255 heads, Sectors/track, 13054 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Device Boot Start End Blocks Id System
/DEV/SDC1 1 13054 104856223+ Linux
disk/dev/sdd:85.8 GB, 85899345920 bytes
255 heads, Sectors/track, 10443 cylinders
Units = Cylinders of 16065 * 8225280 bytes
DISK/DEV/SDD doesn ' t contain a valid partition table
[Email protected] ~]# FDISK/DEV/SDD
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel. Changes'll remain in memory only,
Until decide to write them. After that, of course, the previous
Content won ' t be recoverable.
The number of cylinders for this disk was set to 10443.
There is nothing wrong with the, 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 the other OSs
(e.g., DOS fdisk, OS/2 fdisk)
Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)
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)
Command (M for help): P
disk/dev/sdd:85.8 GB, 85899345920 bytes
255 heads, Sectors/track, 10443 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Device Boot Start End Blocks Id System
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4): 1
Using Default value 1
Using Default Value 10443
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
[Email protected] ~]# MKFS.EXT3/DEV/SDD1
MKE2FS 1.35 (28-feb-2004)
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
10485760 inodes, 20970841 blocks
1048542 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=20971520
640 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
4096000, 7962624, 11239424, 20480000
Creating Journal (8192 blocks): Done
Writing superblocks and filesystem accounting Information:done
This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
[Email protected] ~]# More/etc/fstab
# This file was edited by Fstab-sync-see ' Man Fstab-sync ' for details
LABEL=/1/EXT3 Defaults 1 1
None/dev/pts devpts gid=5,mode=620 0 0
NONE/DEV/SHM TMPFS Defaults 0 0
NONE/PROC proc Defaults 0 0
None/sys Sysfs Defaults 0 0
Label=/tmp/tmp ext3 Defaults 1 2
label=/u01/u01 ext3 Defaults 1 2
label=/u02/u02 ext3 Defaults 1 2
label=/u03/u03 ext3 Defaults 1 2
Label=swap-sda6 swap swap defaults 0 0
/dev/sdb1/u03/flash_recovery_area ext3 Defaults 1 2
/dev/sdc1/u04 ext3 Defaults 1 2
192.168.4.21:/volume1/nfsforlinux/7222/mnt/nfsbak NFS Defaults 0 0
/dev/hda/media/cdrecorder Auto pamconsole,exec,noauto,managed 0 0
/dev/fd0/media/floppy Auto pamconsole,exec,noauto,managed 0 0
[Email protected] ~]# Vi/etc/fstab
# This file was edited by Fstab-sync-see ' Man Fstab-sync ' for details
LABEL=/1/EXT3 Defaults 1 1
None/dev/pts devpts gid=5,mode=620 0 0
NONE/DEV/SHM TMPFS Defaults 0 0
NONE/PROC proc Defaults 0 0
None/sys Sysfs Defaults 0 0
Label=/tmp/tmp ext3 Defaults 1 2
label=/u01/u01 ext3 Defaults 1 2
label=/u02/u02 ext3 Defaults 1 2
label=/u03/u03 ext3 Defaults 1 2
Label=swap-sda6 swap swap defaults 0 0
/dev/sdb1/u03/flash_recovery_area ext3 Defaults 1 2
/dev/sdc1/u04 ext3 Defaults 1 2
/dev/sdd1/u05 ext3 Defaults 1 2
192.168.7.63:/volume1/nfsforlinux/7222/mnt/nfsbak NFS Defaults 0 0
/dev/hda/media/cdrecorder Auto pamconsole,exec,noauto,managed 0 0
/dev/fd0/media/floppy Auto pamconsole,exec,noauto,managed 0 0
"/etc/fstab" 17L, 1285C written
[Email protected] ~]# mkdir/u05
[Email protected] ~]# mount-a
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/DEV/SDA1 147G 90G 51G 65%/
/dev/sda7 1012M 34M 927M 4%/tmp
/dev/sda5 97G 78G 14G 86%/u01
/dev/sda3 97G 77G 15G 85%/u02
/dev/sda2 193G 165G 18G 91%/u03
/DEV/SDB1 134G 95G 33G 75%/u03/flash_recovery_area
/DEV/SDC1 99G 66G 28G 71%/u04
192.168.7.63:/volume1/nfsforlinux/7222
2.7T 1.9T 839G 70%/mnt/nfsbak
/DEV/SDD1 79G 89M 75G 1%/u05
[Email protected] ~]# chown-r oracle:oinstall/u05
[Email protected] ~]# chmod-r 775/u05

Fdisk add partition caused by Linux error:22:invalid argument

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.