Take the 2-minute tour ×

I want to ask help on how to solve my problem broken pipe when creating the file system through ssh. Here is the result when I issue the create filesystem command in ssh.

[root@6~]# mkfs -t ext3 /dev/sda4
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
236699648 inodes, 473391371 blocks
23669568 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
14447 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
    102400000, 214990848

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: Write failed: Broken pipe

I'm wondering if the problem is caused by internet connection? Or because the partition that I am creating the file system is large (1.5TB)?

I would also like to ask for suggestions on other options. I can only connect thru ssh to the server. I is possible to have the command mkfs -t ext3 /dev/sda4 on a crontab?

Any help would be appreciated. Thanks.

share|improve this question
Why would you put the mkfs command in a crontab? It sure should be possible, I just can't think of any reason to do this. –  Frederik Nielsen Nov 21 '12 at 18:41

2 Answers 2

You may be losing your connection due to an idle timeout somewhere between you and the remote server. This can be firewall, SSH server configuration or any combination of the two on either side of the connection. You may not have the ability to control this, so...

Please perform this work within a screen session.

This will allow you to disconnect from the session or at least keep things running if you lose connectivity.

On the target system, install screen (yum install screen or apt-get install screen, depending on distribution).

From there, you can run your command using screen. Something like the following should work:

screen mkfs -t ext3 /dev/sda4

If you lose your connection, you'll be able to resume the in-progress session by reconnecting to the server and running screen -r.

Here's a basic screen tutorial, but the above should get you through this task...

Also see: Keeping a linux process running after I logout

share|improve this answer
thanks @ewwhite I did even know that screen is already installed. I rerun the command. hope this work. thanks again. –  Mark Nov 21 '12 at 14:35
Were you able to complete this? –  ewwhite Nov 21 '12 at 23:55
i was able complete the command. but i still need to confirm the filesystem is created. need to reboot the server. just take note you need to deattach after issuing the command. because i think the screen would also time out. nevertheless if you deattach and reconnect you can see the progress. –  Mark Nov 22 '12 at 3:38

"Write failed: Broken pipe" it's answer from ssh, you can modified some options of ssh connection, just edit ~/.ssh/config

ServerAliveInterval 60
ServerAliveCountMax 10
share|improve this answer
or you can use screen session: screen -S screenName "mkfs -t ext3 /dev/sda4" ctrl+a d - deattach from screen session scree -r screenName - attach to screen session with name screenName –  alterpub Nov 21 '12 at 14:24

Your Answer


