0511-052 A shared memory error occurred
We have learned that we should use upper-cased letter to specify the unit of block size (bs) in dd command. For example, use 1G instead of 1g and use 1M instead of 1m. This time, I tried to make a 2GB empty file by dd, but it failed with 0511-052 A shared memory error occurred.
[oracle@test oracle]$ dd if=/dev/zero of=file_2g bs=1G count=2
dd: 0511-052 A shared memory error occurred.
dd: 0511-052 A shared memory error occurred.
: : The process file table is full.The process file table is full.
Initially, I used 1GB as the block size and looped 2 times. Maybe 1GB is too big for shared memory to accommodate.
The solution is simple, just use a far lower block size to output the source. For example, 1MB and looped 2048 times.
[oracle@test oracle]$ dd if=/dev/zero of=file_2g bs=1M count=2048
2048+0 records in.
2048+0 records out.
I used 1MB to avoid dd: 0511-052 A shared memory error occurred.
[oracle@test oracle]$ ll file_2g
-rw-r--r-- 1 oracle oinstall 2147483648 Oct 28 20:21 file_2g
In which, 2147483648-byte equals to 2GB.