clear swap slice


 
Thread Tools Search this Thread
Operating Systems Solaris clear swap slice
# 1  
Old 05-21-2011
clear swap slice

is there a command that would zero swap slice? I found these instructions:
Quote:
.As for swap, it skips a few blocks at the beginning, so as not to clobber a label
$ swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 10461104 10461104

Remember that if you ever decide to wipe swap to clean up a machine; something like
# dd if=/dev/zero of=/dev/rdsk/c0t0d0s1

(and bs=whatever, etc) is _not_ a good idea; you need an oseek= or somesuch to skip from the start of the slice to swaplo, or you may clobber your disk label.
but hoping there is some swap-specific command
# 2  
Old 05-22-2011
The disk label is not on the swap area but why do you want to clear your swap anyway ?
This User Gave Thanks to jlliagre For This Post:
# 3  
Old 05-22-2011
but according to prtvtoc and other commands, swap slice starts with sector 0Smilie Why does Solaris install set swap start at cylinder 0? - comp.unix.solaris | Computer Group ) and label seems to be there, too. so, I skipped first 256Kb, with dd, just to be sure. I want to clear the swap to keep the disk compressed image smaller.
# 4  
Old 05-22-2011
Indeed, the vtoc might be on the swap area first sectors but that really depends on whether you are on x86 or SPARC, whether you are using UFS or ZFS for the root file system, and whether you are using the default slice layout or not.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Explain the output of swap -s and swap -l

Hi Solaris Folks :), I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands. $swap -s total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available $swap -l swapfile dev swaplo... (6 Replies)
Discussion started by: seenuvasan1985
6 Replies

2. Solaris

Possible to increase swap size for existing UFS-based drive slice?

I like to increase swap size for my current server running solaris 10. Seems like the system is not using it's full 16G of physical memory. #swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,1 16 1058288 1058288 # swap -s total: 4125120k bytes... (17 Replies)
Discussion started by: JT-KGY
17 Replies

3. Solaris

What is the speciality of slice 2?

Part Tag Flag Cylinders Size Blocks 0 root wm 259 - 2666 4.70GB (2408/0/0) 9863168 1 swap wu 3 - 258 512.00MB (256/0/0) 1048576 2 backup wm 0 - 4091 7.99GB (4092/0/0) 16760832 3... (4 Replies)
Discussion started by: chidori
4 Replies

4. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

5. Linux

Expanding slice

Hi all I am testing backupPC as a backup solution for machines, as far as i knew, backuppc cannot combine more than storage from different slices so it have to be in one slice my question is, what is the easy way to offer a virtual logical drive expanded/expandable to backuppc, i mean i want to... (1 Reply)
Discussion started by: XP_2600
1 Replies

6. Solaris

Swap config - Mirror swap or not?

Hello and thanks in advance. I have a Sun box with raid 1 on the O/S disks using solaris svm. I want to unmirror my swap partition, and add the slice on the second disk as an additional swap device. This would give me twice as much swap space. I have been warned not to do this by some... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

7. Solaris

mirroring the boot slice (slice 8) on x86

Hi there I am about to mirror a Solaris 10 x86 box (SunFire X4100) onto a secondary disk using svm (current system is one disk). My question is this, on X86 boxes there is a slice 8 defined as boot partition (and also a slice 9, dunno what its used for tho). Do I need to mirror this boot slice... (0 Replies)
Discussion started by: hcclnoodles
0 Replies

8. UNIX for Dummies Questions & Answers

Add SWAP to free slice

I'm interested in adding more swap space to my current workstation (Solaris 10). I currently have 2 hard drives installed, however the system was only created with 512MB for swap that resides on drive 1. This drive is already sliced up and all slices are being used. The second drive has two... (3 Replies)
Discussion started by: here2learn
3 Replies

9. Filesystems, Disks and Memory

New Sds Slice

Hi, I'd like to add two new disk (mirrored each other) in a machine still on line. The machine is mirrored with SDS. the idea is to add two new disk and mirroring them in order to add a new mount point like "/produit" with only half of the new disk. who could send me exemples or tell me how to... (1 Reply)
Discussion started by: guillaume35
1 Replies

10. UNIX for Dummies Questions & Answers

run fsck on swap slice?

Hi.. i am using sun solaris...and this is the filesystem information... you can see th slice(swap) c0t0d0s1 is giving some absord information......and during rebooting it is asking to run fsck mnually..when i run fsck manually it is giving error incorrect starting and end header...smthing like... (1 Reply)
Discussion started by: Prafulla
1 Replies
Login or Register to Ask a Question