Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, I'm trying to setup a simple swapfile, using the commands shown below, and getting swapfile has holes error. #dd if=/dev/zero of=/swapfile bs=1M count=20 20+0 records in 20+0 records ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    2

    swap file has holes


    Hi all,

    I'm trying to setup a simple swapfile, using the commands shown below, and getting swapfile has holes error.

    #dd if=/dev/zero of=/swapfile bs=1M count=20
    20+0 records in
    20+0 records out

    #mkswap /swapfile

    #swapon /swapfile
    swapon: swapfile has holes
    swapon: /swapfile: Invalid argument

    can any body help to solve this problem?

    Regards
    Ashwani

  2. #2
    Linux User zenwalker's Avatar
    Join Date
    Feb 2010
    Location
    Inland Empire
    Posts
    276
    Quote Originally Posted by ash1412 View Post
    Hi all,

    I'm trying to setup a simple swapfile, using the commands shown below, and getting swapfile has holes error.

    swapon: swapfile has holes

    Ashwani
    Take a look at Creating a swap space

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •