Solaris 10 swap device and filesystem


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 10 swap device and filesystem
# 15  
Old 07-21-2016
trash ~= wipe

Quote:
Originally Posted by javanoob
Thanks. Sorry for my poor english, but what do you mean by "trash the filesystem on it" ?
Do you mean to mount the 100GB partition as swap and ignore the fact of the UFS filesystem on it ?
(p.s. the 100GB is already umounted from its original mountpoint)
While as MadeInGermany already rightly stated, the swap command will ignore the fact a file system is present on the raw partition, I would nevertheless recommend to wipe the file system, at least enough for it not to be recognized as such, for example with:

Code:
dd if=/dev/zero of=/dev/xxx bs=128k count=10

With /dev/xxx being the actual device storing the old file system (beware about mistake here!)
This User Gave Thanks to jlliagre For This Post:
# 16  
Old 07-21-2016
Quote:
Originally Posted by jlliagre
trash ~= wipe


While as MadeInGermany already rightly stated, the swap command will ignore the fact a file system is present on the raw partition, I would nevertheless recommend to wipe the file system, at least enough for it not to be recognized as such, for example with:

Code:
dd if=/dev/zero of=/dev/xxx bs=128k count=10

With /dev/xxx being the actual device storing the old file system (beware about mistake here!)
Hi Jilliagre,

Sorry for the late reply and thank you for your advice !
I have already change the swap disk to the partition.

Quote:
swapfile dev swaplo blocks free
/dev/md/dsk/d50 85,3 16 209722592 209722592
Can I still do a dd to it ?
dd if=/dev/zero of=/dev/md/dsk/50 bs=128k count=10

Regards,
Noob
# 17  
Old 07-21-2016
To be 100% sure there is no risk, you should temporarily remove it as a swap device before wiping it.

Code:
swap -d /dev/md/dsk/50 && { dd if=/dev/zero of=/dev/md/dsk/50 bs=128k count=10 ; swap -a /dev/md/dsk/50 ; }

This User Gave Thanks to jlliagre For This Post:
# 18  
Old 07-21-2016
The key thing here is that if you created a UFS filesystem, mounted it, maybe put some files in it, maybe removed some or all of those files, and then decide to use that partition as swap space; you MUST unmount that UFS filesystem before declaring that partition to be swap space. And, after telling the OS it can use that partition as swap space, you MUST assume that that partition can never be mounted as a filesystem again until you tell the OS it can no longer use that partition as swap space AND you use something like newfs to create a new filesystem on that partition before you mount it as a filesystem again.
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

Force unmount of a SWAP filesystem left over from bad Live Upgrade

Hello, Long story short, we built an alternate boot env. back in July and applied the latest CPU to about 15 servers. Of the 15 servers, 7 servers failed to start the zones after the luactivate / reboot. The zones failed to rename from <zone>-<boot_env> back to <zone>. This is fixed in patch... (16 Replies)
Discussion started by: mainegeek
16 Replies

2. 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

3. UNIX for Advanced & Expert Users

translating device to filesystem in solaris10

Greetings, I have a oracle database server and i keep getting grid control message Metric=Disk Device Busy (%) Metric Value=98.66 Disk Device=ssd430 Severity=Critical Message=Disk Device ssd430 is 98.66% busy. so I am trying to correlate the ssd430 to the filesystem. I understand this... (3 Replies)
Discussion started by: p4cldba
3 Replies

4. UNIX for Advanced & Expert Users

Swap Device & Unix Disk Buffer

Does anyone know if when the Swap Device / Page file in unix is carrying out Page / Swap In's and Page / Swap outs, does it go through the Unix Disk Cache ( I am presuming raw partitions are not being used ) ? Therefore if there is paging activity on a system ( measured by sar -p, sar -g and... (0 Replies)
Discussion started by: jimthompson
0 Replies

5. UNIX for Dummies Questions & Answers

device to filesystem?

On a HP-UX box, I can execute the sar command which will give me the device, %busy, etc. I would like to know how to take a given device name and determine on which filesystem it's located when I do a bdf. I've done some searching through the posts but so far have not had any luck in... (2 Replies)
Discussion started by: jimedwards
2 Replies
Login or Register to Ask a Question