2

Now the hard disk is 10GB. Added new hard disk with 16GB size.

dev/zero information:

fdisk -l /dev/zero
Disk /dev/zero: 0 MB, 0 bytes, 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト

Have did partition and format on new /dev/sdb:

fdisk /dev/sdb
mkfs.ext4 /dev/sdb

After this didn't mount /dev/sdb to any path.

Then check /dev/sdb:

fdisk -l /dev/sdb
Disk /dev/sdb: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト

Now run zero out:

dd if=/dev/zero of=/dev/sdb bs=1M oflag=direct status=progress
dd: `/dev/sdb' の書き込みエラー: デバイスに空き領域がありません
16385+0 レコード入力
16384+0 レコード出力
17179869184 バイト (17 GB) コピーされました、 53.7352 秒、 320 MB/秒

It said there is no enough space left on /dev/sdb.

Why? Is really the space not enough? So how much is enough? Or something operation mistake?


Edit

Run ls -l /dev/sdb

brw-rw----. 1 root disk 8, 32  7月 20 23:31 /dev/sdb

Run lsblk -a

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0   10G  0 disk
├─sda1        8:1    0    1G  0 part /boot
└─sda2        8:2    0    9G  0 part
  ├─cl-root 253:0    0    8G  0 lvm  /
  └─cl-swap 253:1    0    1G  0 lvm  [SWAP]
sdb           8:32   0   16G  0 disk
sr0          11:0    1 1024M  0 rom
drbd0       147:0    0    2G  0 disk
  • Try ls -l /dev/sdb, what does it show? – metamorphling Jul 21 '17 at 4:19
  • @metamorphling Added result to the bellow of the question. – cloud_cloud Jul 21 '17 at 4:25
  • And show lsblk -a output. The partition layout of the special device /dev/zero tells the 0 byte and not the information of /dev/sdb. – minish Jul 21 '17 at 4:39
  • @minish Added result of lsblk -a. – cloud_cloud Jul 21 '17 at 5:36
  • 3
    Please put LC_ALL=C in front of those commands, so that we get error messages in English and not in Japanese? – Federico Poloni Jul 21 '17 at 11:04
7

dd's "not enough space" message pops out when device you are writing to has no more space. It means, you successfully finished your writing, there is no more space left to write.

[cs-server@cs-server release_script]$ ls /media/182147d8-104d-4194-8d42-d5ccccbd4dd6/
bin  boot  dev  etc  home  lcc  lib  logs  lost+found  media  mnt  nohup.out  proc  rgw.log  run  sbin  srv  sys  tmp  usr  var
[cs-server@cs-server release_script]$ df
Filesystem                      1K-blocks                 Used  Available Use% Mounted on
/dev/mapper/vg_csserver-lv_root
                                 51475068             24206676   24646952  50% /
tmpfs                             8142840                52760    8090080   1% /dev/shm
/dev/sda2                          487652               109408     352644  24% /boot
/dev/sda1                          204580                  264     204316   1% /boot/efi
/dev/mapper/vg_csserver-lv_home
                               1862327048            336197068 1431522620  20% /home
/dev/sdb3                          950168               538000     359740  60% /media/182147d8-104d-4194-8d42-d5ccccbd4dd6
/dev/sdb4            73786976294838108032 73786976294837688900     419132 100% /media/182147d8-104d-4194-8d42-d5ccccbd4dd6_
/dev/sdb1                          253871               189863      50901  79% /media/mel-boot
/dev/sdb2                          999320                 8880     938012   1% /media/mel-data
[cs-server@cs-server release_script]$ sudo dd if=/dev/zero of=/dev/sdb3 bs=8192
[sudo] password for cs-server: 
dd: writing `/dev/sdb3': No space left on device
131073+0 records in
131072+0 records out
1073741824 bytes (1.1 GB) copied, 0.397365 s, 2.7 GB/s
[cs-server@cs-server release_script]$ 
[cs-server@cs-server release_script]$ 
[cs-server@cs-server release_script]$ ls /media/182147d8-104d-4194-8d42-d5ccccbd4dd6/
[cs-server@cs-server release_script]$ 
  • So it's a normal thing? No trouble? – cloud_cloud Jul 21 '17 at 5:37
  • 1
    @cloud_cloud yes, it's normal. – metamorphling Jul 21 '17 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.